Adding SOPA blackout to a Drupal Gardens
If you want to blackout your site in protest of SOPA/PIPA, here's what you gotta do:
(hat tip to http://www.zachstronaut.com for the blackout page).
Important: Keep the url mysite.drupalgardens.com/admin/content handy.
Once you follow these instructions, your site will go dark (if it is January 18th 2012). If you want to get it back, you will need to delete the block later.
- Navigate to Structure -> Blocks
- Click on "Add Block"
- In the "Body" use the dropdown to change from "Safe HTML" to "Full HTML" (the buttons will go away)
- Make the block show by setting a region.
- Copy the following and paste it into the body:
<
div>
<script type="text/javascript">
var a = new Date;
if (18 == a.getDate() && 0 == a.getMonth() && 2012 == a.getFullYear()) {
window.onload = function () {
var cover = document.createElement('div');
cover.style.position = 'fixed';
cover.style.zIndex = 9999999;
cover.style.width = window.innerWidth + 'px';
cover.style.height = window.innerHeight + 'px';
cover.style.top = 0;
cover.style.backgroundColor = '#000';
cover.innerHTML = '<iframe src="http://www.zachstronaut.com/lab/text-shadow-box/stop-sopa.html" width="100%" height="100%" frameBorder="0"></iframe>';
document.body.appendChild(cover);
window.onresize = function () {
cover.style.width = window.innerWidth + 'px';
cover.style.height = window.innerHeight + 'px';
}
}
}
</script>
Tags: