Created
January 30, 2009 18:25
-
-
Save sidonath/55178 to your computer and use it in GitHub Desktop.
This file contains 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
// ==UserScript== | |
// @name last.fm Numeric Compatibility | |
// @namespace http://z3c.info/ | |
// @description Displays the numeric compatibility with a user | |
// @include http://www.last.fm/user/* | |
// @include http://www.lastfm*/user/* | |
// @exclude http://www.last.fm/user/*/* | |
// @exclude http://www.lastfm*/user/*/* | |
// ==/UserScript== | |
$ = unsafeWindow.$; | |
$$ = unsafeWindow.$$; | |
(function (tom) { | |
if (!tom) return; | |
tom.observe('DOMSubtreeModified', function() { | |
tom.stopObserving('DOMSubtreeModified') | |
.childElements()[0] | |
.insert( | |
"(" + | |
$$('#tasteometer span.bar span')[0] | |
.readAttribute("style") | |
.match(/[0-9]+\.?[0-9]*%/) + | |
")"); | |
}); | |
})($('tasteometer')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment