r96165 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96164‎ | r96165 | r96166 >
Date:00:02, 3 September 2011
Author:wikinaut
Status:deferred
Tags:
Comment:
one blank between added links is enough
Modified paths:
  • /trunk/tools/viaf/viaf.user.js (modified) (history)

Diff [purge]

Index: trunk/tools/viaf/viaf.user.js
@@ -4,7 +4,7 @@
55 // @require https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
66 // @require http://svn.wikimedia.org/svnroot/mediawiki/trunk/tools/viaf/jquery.cookie.js
77 // @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
99 // @include *
1010 // ==/UserScript==
1111
@@ -32,6 +32,7 @@
3333 * 20110901 moved <span> inside <a> tag to fix the non-colouring problem
3434 * in span class=plainlinks; added blank spans left and right
3535 * of addedlinks for LTR/RTL pages
 36+ * 20110903 less blanks between added links
3637 ***/
3738
3839 // wrapper see http://www.mediawiki.org/wiki/JQuery
@@ -45,7 +46,7 @@
4647 var maxVIAFNumbers = 30;
4748
4849 // Script update checker source: http://a32.me/2009/11/greasemonkey/
49 -var VERSION = "0.205";
 50+var VERSION = "0.206";
5051 var SCRIPT_NAME = "viaf"
5152 var SCRIPT_URL = "http://$$$yourhost$$$/"+SCRIPT_NAME+".user.js"
5253
@@ -137,15 +138,16 @@
138139 var viaf = $this.attr( "viaf" );
139140
140141 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>" ) );
149150
 151+ newLink.unshift( $( "<span> </span>" ) );
150152 for ( i in newLink ) {
151153 $this.after( newLink[i] )
152154 }

Status & tagging log