Accueil / Adding SOPA blackout to a Drupal Gardens

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.

  1. Navigate to Structure -> Blocks
  2. Click on "Add Block"
  3. In the "Body" use the dropdown to change from "Safe HTML" to "Full HTML" (the buttons will go away)
  4. Make the block show by setting a region.
  5. Copy the following and paste it into the body:

 


<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>

Ajouter un commentaire

Plain text

  • Aucune balise HTML autorisée.
  • Les adresses de pages web et de courriels sont transformées en liens automatiquement.
  • Les lignes et les paragraphes vont à la ligne automatiquement.

Filtered HTML

  • Use [acphone_sales], [acphone_sales_text], [acphone_support], [acphone_international], [acphone_devcloud], [acphone_extra1] and [acphone_extra2] as placeholders for Acquia phone numbers. Add class "acquia-phones-link" to wrapper element to make number a link.
  • Pour publier des morceaux de code, entourez-les avec les balises <code>...</code>. Pour du PHP, utilisez. <?php ... ?>, ce qui va colorier le code en fonction de sa syntaxe.
  • Les adresses de pages web et de courriels sont transformées en liens automatiquement.
  • Tags HTML autorisés : <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <h4> <h5> <h2> <img>
  • Les lignes et les paragraphes vont à la ligne automatiquement.
By submitting this form, you accept the Mollom privacy policy.