r53037 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53036‎ | r53037 | r53038 >
Date:04:30, 10 July 2009
Author:brion
Status:deferred
Tags:
Comment:
add usability wiki to specials.
Modified paths:
  • /trunk/tools/bookmarklets/bookmarklets.html (modified) (history)
  • /trunk/tools/bookmarklets/secure-switch.js (modified) (history)

Diff [purge]

Index: trunk/tools/bookmarklets/bookmarklets.html
@@ -1,4 +1,4 @@
22 <h1>Handy bookmarklets</h1>
33 <ul>
4 -<li><a href="javascript:function swapUrl(base) { var specials = &quot;meta|commons|office|internal|collab&quot;; if (base[4] == 's') { base = base.replace( /^https:\/\/secure\.wikimedia\.org\/(.*?)\/(.*?)\/(.*)$/, &quot;http://$2.$1.org/$3&quot;); base = base.replace( &quot;http://mediawiki.wikipedia&quot;, &quot;http://www.mediawiki&quot;); base = base.replace( new RegExp(&quot;^http:\/\/(&quot; + specials + &quot;)\.wikipedia&quot;), &quot;http://$1.wikimedia&quot;); } else { base = base.replace( &quot;http://www.mediawiki&quot;, &quot;http://mediawiki.wikipedia&quot;); base = base.replace( new RegExp(&quot;^http:\/\/(&quot; + specials + &quot;)\.wikimedia&quot;), &quot;http://$1.wikipedia&quot;); base = base.replace( /^http:\/\/(.*?)\.(.*?)\.org\/(.*)$/, &quot;https://secure.wikimedia.org/$2/$1/$3&quot;); } return base; } document.location=swapUrl(document.location.toString());">secure-switch</a></li>
 4+<li><a href="javascript:function swapUrl(base) { var specials = &quot;meta|commons|office|internal|collab|usability&quot;; if (base[4] == 's') { base = base.replace( /^https:\/\/secure\.wikimedia\.org\/(.*?)\/(.*?)\/(.*)$/, &quot;http://$2.$1.org/$3&quot;); base = base.replace( &quot;http://mediawiki.wikipedia&quot;, &quot;http://www.mediawiki&quot;); base = base.replace( new RegExp(&quot;^http:\/\/(&quot; + specials + &quot;)\.wikipedia&quot;), &quot;http://$1.wikimedia&quot;); } else { base = base.replace( &quot;http://www.mediawiki&quot;, &quot;http://mediawiki.wikipedia&quot;); base = base.replace( new RegExp(&quot;^http:\/\/(&quot; + specials + &quot;)\.wikimedia&quot;), &quot;http://$1.wikipedia&quot;); base = base.replace( /^http:\/\/(.*?)\.(.*?)\.org\/(.*)$/, &quot;https://secure.wikimedia.org/$2/$1/$3&quot;); } return base; } document.location=swapUrl(document.location.toString());">secure-switch</a></li>
55 </ul>
Index: trunk/tools/bookmarklets/secure-switch.js
@@ -1,5 +1,5 @@
22 function swapUrl(base) {
3 - var specials = "meta|commons|office|internal|collab";
 3+ var specials = "meta|commons|office|internal|collab|usability";
44 if (base[4] == 's') {
55 base = base.replace(
66 /^https:\/\/secure\.wikimedia\.org\/(.*?)\/(.*?)\/(.*)$/,

Status & tagging log