23 August 2011

Earthquake Bookmarklet

Earthquakes can be scary. Other times you might not even notice it apart from everyone tweeting about it.

Well, if you fit into the latter group, you can experience your own safe browser-based earthquake with the

» earthquakelet «

Click on it right now to see it’s devastation! …and refresh the page to undo it’s effects. If you wish to wreak havoc on other sites on the web just drag that link into your bookmarks toolbar and click on it while viewing any site.

Also, here’s the code in case you’re interested (it’s a bit hacked together):

(function(w,url,hasjq) {
    if (!(hasjq = w.jQuery)) {
        var s = document.createElement('script');
        s.src = url;
        (document.getElementsByTagName('head')[0] ||
    (function go() {
        if (!w.jQuery) {
            return w.setTimeout(go, 200);
        var $ = w.jQuery;
        if (!hasjq) $ = $.noConflict();
        var $s = $('p,div,img,span,strong,em');
        (function shake() {
            $s.each(function() {
                if (this.shift) this.shift = 0;
                else this.shift = (2*(Math.floor(Math.random() * 2)) - 1) * (Math.floor(Math.random() * 4));
                $(this).css('margin-left', this.shift);
            w.setTimeout(shake, 80);
})(window, '//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');

Comments (2)

1. Harold wrote:


Posted on 23 August 2011 at 11:08 PM  |  permalink

2. peter wrote:

o/\o consider that name changed!

Posted on 24 August 2011 at 12:08 AM  |  permalink

Did you find this helpful or fun? Please donate!

donate via btc or eth

btc: 18jCzwsZDGQYcs6Kyv92pd4683cnnxm1Dd
eth: 0xC285F21Cb271Cb4B3F70c4C47B2f7B26063AF590
paypal: paypal.me/mrcoles

Peter Coles

Peter Coles

is a software engineer who lives in NYC who is working on Superset and also GoFullPagemore »

github · soundcloud · @lethys · rss