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.204 201109010840 |
| 8 | +// @description locate VIAF numbers in texts and urls on web pages. (c) T.Gries Version 0.205 201109012100 |
9 | 9 | // @include * |
10 | 10 | // ==/UserScript== |
11 | 11 | |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | var maxVIAFNumbers = 30; |
47 | 47 | |
48 | 48 | // Script update checker source: http://a32.me/2009/11/greasemonkey/ |
49 | | -var VERSION = "0.204"; |
| 49 | +var VERSION = "0.205"; |
50 | 50 | var SCRIPT_NAME = "viaf" |
51 | 51 | var SCRIPT_URL = "http://$$$yourhost$$$/"+SCRIPT_NAME+".user.js" |
52 | 52 | |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | if ( typeof url != "undefined" && url.match( magicUrlRegExp ) ) { |
125 | 125 | if ( markUrlDetectedItems ) $this.css( markUrlDetectedItemsCSS ); |
126 | 126 | var viaf = RegExp.$1.replace( /[\D]*/g, '' ); |
127 | | - $this.after( $("<span class='viaf viaf-in-url' viaf='"+viaf+"'> "+viaf+"</span>") ); |
| 127 | + $this.parent().after( $("<span class='viaf viaf-in-url' viaf='"+viaf+"'> "+viaf+"</span>") ); |
128 | 128 | } |
129 | 129 | |
130 | 130 | }) |
— | — | @@ -146,9 +146,6 @@ |
147 | 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 | 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>" ) ); |
149 | 149 | |
150 | | - // add a space as the last character after the last added links |
151 | | - newLink.unshift( $("<span> </span>") ); |
152 | | - |
153 | 150 | for ( i in newLink ) { |
154 | 151 | $this.after( newLink[i] ) |
155 | 152 | } |