Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Script to push page off screen and add a div with STOP SOPA in the to…

…p left of your original page
  • Loading branch information...
commit b154c99859110b5c14b2fd94d5a20f7bd7245342 0 parents
@estelle authored
Showing with 22 additions and 0 deletions.
  1. +1 −0  README
  2. +21 −0 stopsopa.js
1  README
@@ -0,0 +1 @@
+Add this to your website to make it go blank on January 18th in opposition to SOPA
21 stopsopa.js
@@ -0,0 +1,21 @@
+var stopsopa = {
+ pagebody : document.getElementsByTagName('body')[0],
+ sopaText : "Stop SOPA", // change to whatever you want
+ date : new Date(),
+ blackout : function(){
+ stopsopa.pagebody.style.position = "absolute";
+ stopsopa.pagebody.style.left = "-2000px";
+ var div = document.createElement('div');
+ div.setAttribute('style', 'position:absolute; left: 2000px; top: 0; font-size: 100px; color: red; white-space: nowrap; font-family: arial, san-serif; font-weight: bold;');
+ var text = document.createTextNode(stopsopa.sopaText);
+ div.appendChild(text)
+ stopsopa.pagebody.appendChild(div);
+ },
+
+ actionDate: function(){
+ if(stopsopa.date.getMonth() == 0 && stopsopa.date.getDate() == 18 && stopsopa.date.getYear() == 112){
+ stopsopa.blackout();
+ }
+ }
+}
+stopsopa.actionDate();
Please sign in to comment.
Something went wrong with that request. Please try again.