Created
November 21, 2009 05:11
Revisions
-
cers created this gist
Nov 21, 2009 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ CmdUtils.CreateCommand({ names: ["exercise twitter"], description: "Makes you exercise your neck while reading Twitter.", author: { name: "Christian Sonne", email: "[email protected]", homepage: "http://geeksbynature.dk", }, license: "GPL", homepage: "http://geeksbynature.dk", execute: function execute() { var win = CmdUtils.getWindow(); if (win.location.host.indexOf("twitter.com")==-1) return; var doc = CmdUtils.getDocument(); var offset = -270; var twits = $("li.status",doc).each(function(i) { if (i%7==0) offset += 520; $("ol#timeline",doc).css("padding-top",offset+260); $(this).css({"position": "absolute", "top": offset, "left": -200+(i%7)*78, "-moz-transform-origin":"50%", "-moz-transform": "rotate("+(90+(i%2)*180)+"deg)" }); }); } });