[hackerspaces] SOPA Blackout 1/18/12
ITechGeek
itg at itechgeek.com
Tue Jan 17 06:29:59 CET 2012
SOPABlackout.org provides a nice little javascript file to present a
notice whenever someone loads a page, but still allows the people to
access that page by clicking anywhere on the blackpage (other then the
SOPA links)
HacDC is planning to participate, so I came up w/ the following code
to add to our main website & wiki site:
If you plan to use this on your site, use:
if (date('Y-m-d') == "2012-01-18") {
echo '<script type="text/javascript"
src="//js.sopablackout.org/sopablackout.js"></script>';
}
The code is simple enough that you should just be able to throw it
into the header of your site w/o breaking things.
On the HacDC site, I modified it slightly in the date to change from
UTC (What the HacDC website is) to EST (Where HacDC is).
I checked and the js.sopablackout.org is hosted on a Linode in
California, so I suggest copying the js file to your local web
provider so that you know if your website is avail, the js file will
be avail (although I've thought about throwing it on my Amazon S3
account, maybe in a Cloudfront enabled bucket for my websites).
If you need the code loading the js file in a language other then php,
I'm sure if you ask someone on the list can help you w/ that.
-ITG
More information about the Discuss
mailing list