Skip to content

Instantly share code, notes, and snippets.

@mcantelon
Created January 15, 2012 23:49
Show Gist options
  • Save mcantelon/1618064 to your computer and use it in GitHub Desktop.
Save mcantelon/1618064 to your computer and use it in GitHub Desktop.
SOPA JS-only blackout
<html>
<head>
<script>
function sopaRedirect() {
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth() + 1; //months are zero based
var curr_year = d.getFullYear();
var date = curr_year + "-" + curr_month + "-" + curr_date;
if (date == '2012-1-18') {
window.location = 'http://americancensorship.org/';
}
}
sopaRedirect();
</script>
</head>
<body>
Moof!
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment