sidonath (owner)

Revisions

  • f739b8 Damir Z... Fri Jan 30 12:22:35 -0800 2009
  • c07338 sidonath Fri Jan 30 10:25:33 -0800 2009
gist: 55178 Download_button fork
public
Public Clone URL: git://gist.github.com/55178.git
Embed All Files: show embed
numeric-compatibility.user.js #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// ==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'));