Welcome,
In support of those against New Zealands draconian copyright
laws, I wrote a quick jquery javascript to temporarily black
out a web site
If you add the following code into the head section of a
page, it will start out hiding everything and covering
it with black.
As soon as the user moves or clicks the mouse, it will show
the original content.
Hope this helps
steve goodwin
Email Me with questions
twitter
Copy Code Below:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$("body").children().each(function()
{
$(this).hide(); // hide the top level elements
});
var first_time = true;
$("body").append('<div id="protest"><\/div>'); // add a div, and
$("#protest").height(2000).width(2000).css("background-color", "black"); //size it at 2000x2000, and make it black
$("#protest").bind("mousemove click", function() // when user clicks or moves mouse, reveal original content
{
$("protest").unbind(); // unhook mousemove event handler
if (!first_time) return; // ignore subsequent events
first_time = false;
alert("This site has been blacked out in support of those against New Zealands draconian copyright laws ");
$("#protest").remove(); // remove added div
$("body").children().each(function(){
$(this).fadeIn(2500); // reveal child elements over 2.5 sec
});
});
});
</script>