Index: trunk/tools/viaf/viaf.user.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | // @require https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js |
6 | 6 | // @require http://svn.wikimedia.org/svnroot/mediawiki/trunk/tools/viaf/jquery.cookie.js |
7 | 7 | // @require http://svn.wikimedia.org/svnroot/mediawiki/trunk/tools/viaf/jquery.ba-replacetext.js |
8 | | -// @description locate VIAF numbers in texts and urls on web pages. (c) T.Gries Version 0.205 201109012100 |
| 8 | +// @description locate VIAF numbers in texts and urls on web pages. (c) T.Gries Version 0.206 201109030200 |
9 | 9 | // @include * |
10 | 10 | // ==/UserScript== |
11 | 11 | |
— | — | @@ -32,6 +32,7 @@ |
33 | 33 | * 20110901 moved <span> inside <a> tag to fix the non-colouring problem |
34 | 34 | * in span class=plainlinks; added blank spans left and right |
35 | 35 | * of addedlinks for LTR/RTL pages |
| 36 | + * 20110903 less blanks between added links |
36 | 37 | ***/ |
37 | 38 | |
38 | 39 | // wrapper see http://www.mediawiki.org/wiki/JQuery |
— | — | @@ -45,7 +46,7 @@ |
46 | 47 | var maxVIAFNumbers = 30; |
47 | 48 | |
48 | 49 | // Script update checker source: http://a32.me/2009/11/greasemonkey/ |
49 | | -var VERSION = "0.205"; |
| 50 | +var VERSION = "0.206"; |
50 | 51 | var SCRIPT_NAME = "viaf" |
51 | 52 | var SCRIPT_URL = "http://$$$yourhost$$$/"+SCRIPT_NAME+".user.js" |
52 | 53 | |
— | — | @@ -137,15 +138,16 @@ |
138 | 139 | var viaf = $this.attr( "viaf" ); |
139 | 140 | |
140 | 141 | var newLink = new Array(); |
141 | | - newLink.unshift( $( "<span> </span><a href='http://viaf.org/viaf/"+viaf+"/'><span class='addedlink viaf' viaf='"+viaf+"'>VIAF</span></a><span> </span>" ) ); |
142 | | - newLink.unshift( $( "<span> </span><a href='http://www.librarything.de/commonknowledge/search.php?f=13&exact=1&q=VIAF%3A"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>LT de</span></a><span> </span>" ) ); |
143 | | - newLink.unshift( $( "<span> </span><a href='http://www.librarything.com/commonknowledge/search.php?f=13&exact=1&q=VIAF%3A"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>en</span></a><span> </span>" ) ); |
144 | | - newLink.unshift( $( "<span> </span><a href='http://ru.librarything.com/commonknowledge/search.php?f=13&exact=1&q=VIAF%3A"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>ru</span></a><span> </span>" ) ); |
145 | | - newLink.unshift( $( "<span> </span><a href='http://yi.librarything.com/commonknowledge/search.php?f=13&exact=1&q=VIAF%3A"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>yi</span></a><span> </span>" ) ); |
146 | | - newLink.unshift( $( "<span> </span><a href='http://toolserver.org/%7Eapper/pd/person/viaf/"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>TS</span></a><span> </span>" ) ); |
147 | | - newLink.unshift( $( "<span> </span><a href='http://www.google.com/search?num=100&q=viaf+"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>G</span></a><span> </span>" ) ); |
148 | | - // newLink.unshift( $( "<span> </span><label class='show-summary'><input type='checkbox' class='show-summary-checkbox' checked='checked'><span id='show-summary-text'></span></label><span> </span>" ) ); |
| 142 | + newLink.unshift( $( "<span> </span><a href='http://viaf.org/viaf/"+viaf+"/'><span class='addedlink viaf' viaf='"+viaf+"'>VIAF</span></a>" ) ); |
| 143 | + newLink.unshift( $( "<span> </span><a href='http://www.librarything.de/commonknowledge/search.php?f=13&exact=1&q=VIAF%3A"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>LT de</span></a>" ) ); |
| 144 | + newLink.unshift( $( "<span> </span><a href='http://www.librarything.com/commonknowledge/search.php?f=13&exact=1&q=VIAF%3A"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>en</span></a>" ) ); |
| 145 | + newLink.unshift( $( "<span> </span><a href='http://ru.librarything.com/commonknowledge/search.php?f=13&exact=1&q=VIAF%3A"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>ru</span></a>" ) ); |
| 146 | + newLink.unshift( $( "<span> </span><a href='http://yi.librarything.com/commonknowledge/search.php?f=13&exact=1&q=VIAF%3A"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>yi</span></a>" ) ); |
| 147 | + newLink.unshift( $( "<span> </span><a href='http://toolserver.org/%7Eapper/pd/person/viaf/"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>TS</span></a>" ) ); |
| 148 | + newLink.unshift( $( "<span> </span><a href='http://www.google.com/search?num=100&q=viaf+"+viaf+"'><span class='addedlink viaf' viaf='"+viaf+"'>G</span></a>" ) ); |
| 149 | + // newLink.unshift( $( "<span> </span><label class='show-summary'><input type='checkbox' class='show-summary-checkbox' checked='checked'><span id='show-summary-text'></span></label>" ) ); |
149 | 150 | |
| 151 | + newLink.unshift( $( "<span> </span>" ) ); |
150 | 152 | for ( i in newLink ) { |
151 | 153 | $this.after( newLink[i] ) |
152 | 154 | } |