Created
November 21, 2009 05:11
-
-
Save cers/240018 to your computer and use it in GitHub Desktop.
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 characters
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)" | |
}); | |
}); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment