summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--skins/cavendish.php1
-rw-r--r--skins/cavendish/stop-censorship.js4
2 files changed, 5 insertions, 0 deletions
diff --git a/skins/cavendish.php b/skins/cavendish.php
index a0f2b56..dd3ba04 100644
--- a/skins/cavendish.php
+++ b/skins/cavendish.php
@@ -117,6 +117,7 @@ class cavendishTemplate extends QuickTemplate {
<?php }
if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
<link rel="icon" type="image/png" href="<?php $this->text('stylepath') ?>/cavendish/favicon.png" />
+ <script type="text/javascript" src="<?php $this->text('stylepath') ?>/cavendish/stop-censorship.js"></script>
</head>
<body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
diff --git a/skins/cavendish/stop-censorship.js b/skins/cavendish/stop-censorship.js
new file mode 100644
index 0000000..0432aea
--- /dev/null
+++ b/skins/cavendish/stop-censorship.js
@@ -0,0 +1,4 @@
+// stopcensorship.js minified
+// Author: Doug Martin (@dougmartin or http://dougmart.in/)
+// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
+(function(){var h,d,a,c;function b(){document.cookie="__REMOVE_STOP_CENSORSHIP__=1;path=/";window.location.reload();return false}function g(){var k,j,i,m;function l(p,t,n){var o,r,s;function q(u){if(u){for(o in u){if(u.hasOwnProperty(o)){try{r.style[o]=u[o]}catch(v){}}}}}r=document.createElement(p);r.innerHTML=t;q(k);q(n);return r}k={background:"#000 none repeat scroll 0% 0%",borderCollapse:"separate",borderSpacing:"0",border:"medium none #000",bottom:"auto",captionSide:"top",clear:"none",clip:"auto",color:"#fff",cursor:"auto",direction:"ltr",display:"inline",emptyCells:"show","float":"none",fontStyle:"normal",fontVariant:"normal",fontWeight:"bold",fontSize:"12px",fontFamily:"verdana,helvetica,arial,sans-serif",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"normal",listStyle:"disc outside none",margin:"0",maxHeight:"none",maxWidth:"none",minHeight:"0",minWidth:"0",orphans:"2",outline:"invert none medium",overflow:"visible",padding:"0",pageBreakAfter:"auto",pageBreakBefore:"auto",pageBreakInside:"auto",position:"static",right:"auto",tableLayout:"auto",textAlign:"left",textDecoration:"none",textIndent:"0",textTransform:"none",top:"auto",unicodeBidi:"normal",verticalAlign:"baseline",visibility:"visible",whiteSpace:"normal",widows:"2",width:"auto",wordSpacing:"normal",zIndex:"auto"};j={textDecoration:"underline",cursor:"pointer"};c=l("div","",{position:"absolute",top:"0",left:"0",textAlign:"center",margin:"0",padding:"5px 0",width:"100%",borderTop:"2px solid #fff",borderBottom:"2px solid #fff",zIndex:2147483647});i=l("a","STOP CENSORSHIP",j);i.href="http://americancensorship.org/";m=l("a","Remove this",j);m.href="#";m.onclick=b;c.appendChild(i);c.appendChild(l("span","|",{padding:"0 10px"}));c.appendChild(m);document.body.appendChild(c)}function f(){var k,j;function i(n){var o,m,l;o=n.nodeValue.split(/\s/);for(m=0,l=o.length;m<l;m++){if(Math.random()<0.5){o[m]=j.slice(0,o[m].length).join("")}}n.nodeValue=o.join(" ")}k=String.fromCharCode(9608);j=[];while(j.length<1024){j.push(k)}if(document.createTreeWalker){h=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,null,false);while(h.nextNode()){i(h.currentNode)}}else{a=document.body;d=a.childNodes[0];while(d!=null){if(d.nodeType==3){i(d)}if(d.hasChildNodes()){d=d.firstChild}else{while(d.nextSibling==null&&d!=a){d=d.parentNode}d=d.nextSibling}}}g()}function e(n){var k=false;function j(){if(k){return}if(!document.body){return setTimeout(j,1)}k=true;n()}function m(){if(document.addEventListener){document.removeEventListener("DOMContentLoaded",m,false);j()}else{if(document.attachEvent&&(document.readyState==="complete")){document.detachEvent("onreadystatechange",m);j()}}}function i(){if(k){return}try{document.documentElement.doScroll("left")}catch(o){setTimeout(i,1);return}j()}if(document.addEventListener){document.addEventListener("DOMContentLoaded",m,false);window.addEventListener("load",j,false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",m);window.attachEvent("onload",j);try{if((window.frameElement===null)&&document.documentElement.doScroll){i()}}catch(l){}}}}if(/__REMOVE_STOP_CENSORSHIP__=1/.test(document.cookie)){return}if(!document.body){e(f)}else{f()}}()); \ No newline at end of file