domains/coconuts.co.js
authorAlan Knowles <alan@roojs.com>
Thu, 14 Apr 2016 04:08:57 +0000 (12:08 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 14 Apr 2016 04:08:57 +0000 (12:08 +0800)
domains/cubic.com.js

domains/coconuts.co.js
domains/cubic.com.js

index f1b7f70..9272d91 100644 (file)
@@ -1,71 +1,8 @@
 
 (function (args) {
-     
-    
-    for (var ss = 0; ss < document.styleSheets.length; ss++) {
-        var css =document.styleSheets[ss];
-        console.log("sheet " + ss + '/' + document.styleSheets.length + ": " + css.ownerNode.outerHTML) ;
-        
-        var node = css.ownerNode;
-         ;
-        if (node.nodeName == 'STYLE' && node.getAttribute('media') && node.getAttribute('media').match(/print/)) {
-            node.innerHTML = '';
-            continue;
-        }
-        if (node.nodeName == 'LINK' && node.getAttribute('media') && node.getAttribute('media').match(/print/)) {
-            node.setAttribute('href' , '');
-            node.setAttribute('media' , 'speech');
-            continue;
-        }
-        
-        // now we are dealing with non-print styles...
-        
-        var ar = document.styleSheets[ss].rules;
-        if (!ar) {
-            if (node.nodeName == 'STYLE' ) {
-                node.innerHTML = '';
-                continue;
-            }
-            node.setAttribute('href' , '');
-            continue;
-        }
-        
-        var newsheet = '';
-        
-        
-        for(i=ar.length-1; i > -1; i--){
-            if(ar[i].cssText.indexOf("@media") < 0 ) {
-                newsheet += ar[i].cssText +"\n";
-                continue;
-            }
-            //console.log(ar[i].cssText);
-            if(ar[i].cssText.match(/@media\s+print/)) {
-                continue;
-            }
-            
-            // see if getting rid of 'only' from screen works.
-            if(!ar[i].cssText.match(/only\s+screen/)) {
-                continue;   
-            }
-            var str = ar[i].cssText.replace(/only\s+screen/, 'all');
-            newsheet += str +"\n";
-            
-            
-        }
-        
-        
-        if (node.nodeName == 'STYLE' ) {
-            node.innerHTML = newsheet;
-            continue;
-        }
-        var newnode = document.createElement('STYLE');
-        newnode.innerHTML = newsheet;
-        none.parentNode.replaceChild(newnode,node);
-        
-        
-    
-    }
-
-    
-    
+    document.getElementById('article_viewer').style.overflowY = '';
+    document.getElementById('article_viewer').style.position = 'initial';
+    document.body.className = '';
+    document.body.style.overflow = '';
+    document.body.style.height="auto";
 })(); 
\ No newline at end of file
index e69de29..edd8de9 100644 (file)
@@ -0,0 +1,71 @@
+
+(function (args) {
+     
+    
+    for (var ss = 0; ss < document.styleSheets.length; ss++) {
+        var css =document.styleSheets[ss];
+        console.log("sheet " + ss + '/' + document.styleSheets.length + ": " + css.ownerNode.outerHTML) ;
+        
+        var node = css.ownerNode;
+         ;
+        if (node.nodeName == 'STYLE' && node.getAttribute('media') && node.getAttribute('media').match(/print/)) {
+            node.innerHTML = '';
+            continue;
+        }
+        if (node.nodeName == 'LINK' && node.getAttribute('media') && node.getAttribute('media').match(/print/)) {
+            node.setAttribute('href' , '');
+            node.setAttribute('media' , 'speech');
+            continue;
+        }
+        
+        // now we are dealing with non-print styles...
+        
+        var ar = document.styleSheets[ss].rules;
+        if (!ar) {
+            if (node.nodeName == 'STYLE' ) {
+                node.innerHTML = '';
+                continue;
+            }
+            node.setAttribute('href' , '');
+            continue;
+        }
+        
+        var newsheet = '';
+        
+        
+        for(i=ar.length-1; i > -1; i--){
+            if(ar[i].cssText.indexOf("@media") < 0 ) {
+                newsheet += ar[i].cssText +"\n";
+                continue;
+            }
+            //console.log(ar[i].cssText);
+            if(ar[i].cssText.match(/@media\s+print/)) {
+                continue;
+            }
+            
+            // see if getting rid of 'only' from screen works.
+            if(!ar[i].cssText.match(/only\s+screen/)) {
+                continue;   
+            }
+            var str = ar[i].cssText.replace(/only\s+screen/, 'all');
+            newsheet += str +"\n";
+            
+            
+        }
+        
+        
+        if (node.nodeName == 'STYLE' ) {
+            node.innerHTML = newsheet;
+            continue;
+        }
+        var newnode = document.createElement('STYLE');
+        newnode.innerHTML = newsheet;
+        node.parentNode.replaceChild(newnode,node);
+        
+        
+    
+    }
+
+    
+    
+})(); 
\ No newline at end of file