inliner.js
authorAlan Knowles <alan@roojs.com>
Thu, 12 Nov 2015 05:10:13 +0000 (13:10 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 12 Nov 2015 05:10:13 +0000 (13:10 +0800)
inliner.js

index 05730fb..e20146c 100644 (file)
     function inlinify () {
        
        interpritAppendedStylesheet(document); // apply styles to the document just created
+        var ar = document.getElementsByTagName('style');
+        foreach(var i =0);i< ar.length;i++) {
+            ar[i].parentElement.remove(ar[i]);
+        }
+        
        $tmpDoc.find("style").remove(); // sanitize all style tags present prior to the transformation
        
        var newHTML = $tmpDoc.find("html").html();