View difference between Paste ID: u2vcZqiZ and
SHOW:
|
|
- or go back to the newest paste.
1 | - | |
1 | + | // ==UserScript== |
2 | // @name accept rate details | |
3 | // @namespace stackoverflow | |
4 | // @description Shows more details of accept rate on Stack Exchange sigs. | |
5 | // @include http://stackoverflow.com/* | |
6 | // @include http://meta.stackoverflow.com/* | |
7 | // @include http://superuser.com/* | |
8 | // @include http://meta.superuser.com/* | |
9 | // @include http://serverfault.com/* | |
10 | // @include http://meta.serverfault.com/* | |
11 | // @include http://askubuntu.com/* | |
12 | // @include http://meta.askubuntu.com/* | |
13 | // @include http://answers.onstartups.com/* | |
14 | // @include http://meta.answers.onstartups.com/* | |
15 | // @include http://nothingtoinstall.com/* | |
16 | // @include http://meta.nothingtoinstall.com/* | |
17 | // @include http://seasonedadvice.com/* | |
18 | // @include http://meta.seasonedadvice.com/* | |
19 | // @include http://crossvalidated.com/* | |
20 | // @include http://meta.crossvalidated.com/* | |
21 | // @include http://stackapps.com/* | |
22 | // @include http://*.stackexchange.com/* | |
23 | // @exclude http://chat.stackexchange.com/* | |
24 | // @exclude http://api.*.stackexchange.com/* | |
25 | // @exclude http://data.stackexchange.com/* | |
26 | // @exclude http://area51.stackexchange.com/* | |
27 | // @exclude http://*/reputation | |
28 | // @author Kip Robinson - http://stackoverflow.com/users/18511/kip | |
29 | // @author Yi Jiang - http://stackoverflow.com/users/313758/yi-jiang | |
30 | // ==/UserScript== | |
31 | ||
32 | (function() { | |
33 | var sigDiv = document.querySelectorAll('.accept-rate'); | |
34 | for(var i = 0; i < sigDiv.length; i++){ | |
35 | var matches = sigDiv[i].title.match(/([\d]+) of ([\d]+)/); | |
36 | if(matches.length == 3) { | |
37 | sigDiv[i].textContent += " (" + matches[1] + "/" + matches[2] + ")"; | |
38 | } | |
39 | } | |
40 | })(); |