Skip directly to content

javascript

Adding SOPA blackout to a Drupal Gardens

on January 17th, 2012 at 11:55:53 PM

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

My first Chrome extension - Tab Buffet

on April 28th, 2011 at 3:00:45 PM

This morning I woke with so many tabs open even the icons were hidden.  It was a momment of tab gluttony shame.  I had been at the all-you-can-eat Internet buffet until late in the night, and it got ugly.  

 

So, having put in a stupid long day yesterday, I decided to take a break from DrupalGardens work and build a little Chrome extension to track how many tabs I have open over time.

I present: Tab Buffet

 

It's totally alpha code, but if you want to try it out you can install it here. Fork me on GitHub

Addthis