X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=inliner.js;h=f079dd86cfe9060762b84925b8623e83da5f4530;hb=674d7c0892acbf9e8ccf30744537f59014ce59d4;hp=b5d6b9ff9c1db1b2593b47720d6349b3467bb6a3;hpb=3ffaf7eee4fde9955bbfd283ea8439dee9885f73;p=app.webkitpdf diff --git a/inliner.js b/inliner.js index b5d6b9f..f079dd8 100644 --- a/inliner.js +++ b/inliner.js @@ -1,4 +1,17 @@ - +/** + * + * could this work by findind all the visible text, + * then making them hidden.. + * + * -- make a snapshot of the background.. + * + * -- delete the whole page... + * -- show the image as the background. + * -- then overlay all the text given their calculated positions.. + * + * + * + */ (function(){ @@ -9,7 +22,7 @@ - var fillStyle = function(dom, pstyle), + var fillStyle = function(dom, pstyle) { if (!dom || dom.nodeType != 1) { //console.log("SKIP: " + dom.nodeName); @@ -48,7 +61,9 @@ // pstyle = window.getComputedStyle(dom.parentElement, null); //} - + if (dom.nodeName == 'SPAM') { + pstyle = false; //?? others?? + } //if (dom.nodeName == 'LI') { throw 'done'; } @@ -60,9 +75,9 @@ //returns[camel] = val; // idea... if the parent has the same style.. then do not apply it to the child? - //if (pstyle && pstyle[prop] == val) { - // continue; - //} + if (pstyle && pstyle[prop] == val) { + continue; + } //console.log(prop + '=' + val); dom.style[camel] = val; @@ -100,5 +115,6 @@ } changeit(); + console.log("done"); })(); \ No newline at end of file