r96026 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96025‎ | r96026 | r96027 >
Date:18:55, 1 September 2011
Author:wikinaut
Status:deferred
Tags:
Comment:
follow-up to r95940 which was not correctly working because links were not set
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.204 201109010840
 8+// @description locate VIAF numbers in texts and urls on web pages. (c) T.Gries Version 0.205 201109012100
99 // @include *
1010 // ==/UserScript==
1111
@@ -45,7 +45,7 @@
4646 var maxVIAFNumbers = 30;
4747
4848 // Script update checker source: http://a32.me/2009/11/greasemonkey/
49 -var VERSION = "0.204";
 49+var VERSION = "0.205";
5050 var SCRIPT_NAME = "viaf"
5151 var SCRIPT_URL = "http://$$$yourhost$$$/"+SCRIPT_NAME+".user.js"
5252
@@ -123,7 +123,7 @@
124124 if ( typeof url != "undefined" && url.match( magicUrlRegExp ) ) {
125125 if ( markUrlDetectedItems ) $this.css( markUrlDetectedItemsCSS );
126126 var viaf = RegExp.$1.replace( /[\D]*/g, '' );
127 - $this.after( $("<span class='viaf viaf-in-url' viaf='"+viaf+"'>&nbsp;"+viaf+"</span>") );
 127+ $this.parent().after( $("<span class='viaf viaf-in-url' viaf='"+viaf+"'>&nbsp;"+viaf+"</span>") );
128128 }
129129
130130 })
@@ -146,9 +146,6 @@
147147 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>" ) );
148148 // 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>" ) );
149149
150 - // add a space as the last character after the last added links
151 - newLink.unshift( $("<span> </span>") );
152 -
153150 for ( i in newLink ) {
154151 $this.after( newLink[i] )
155152 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95940new version 0.204 fixes the non-colouring problem in class=plainlinks span ta...wikinaut06:44, 1 September 2011

Status & tagging log