Jump to content

MediaWiki:Gadget-popups.js and User:Chicocvenancio/popups-test.js: Difference between pages

(Difference between pages)
Content deleted Content added
Amalthea (talk | contribs)
removed "slightly ugly hack" that actually broke what it was meant to fix. I assume this broke when the switch was made from "siteArticlePath()" to "window.wgArticlePath"
 
escaping parenthesis
 
Line 4,414: Line 4,414:
if( typeof h[i]['userhidden'] == "undefined" ) {
if( typeof h[i]['userhidden'] == "undefined" ) {
if( pg.re.ipUser.test(user) ) {
if( pg.re.ipUser.test(user) ) {
col3url=pg.wiki.titlebase + mw.config.get('wgFormattedNamespaces')[pg.nsSpecialId] + ':Contributions&target=' + new Title(user).urlString();
col3url=pg.wiki.titlebase + mw.config.get('wgFormattedNamespaces')[pg.nsSpecialId] + ':' + mw.util.rawurlencode(popupString('Contributions')) +'&target=' + new Title(user).urlString();
} else {
} else {
col3url=pg.wiki.titlebase + mw.config.get('wgFormattedNamespaces')[pg.nsUserId] + ':' + new Title(user).urlString();
col3url=pg.wiki.titlebase + mw.util.rawurlencode(mw.config.get('wgFormattedNamespaces')[pg.nsUserId]) + ':' + new Title(user).urlString();
}
}
col3txt=escapeQuotesHTML(user);
col3txt=escapeQuotesHTML(user);
Line 5,845: Line 5,845:
var sp=nsRe(pg.nsSpecialId);
var sp=nsRe(pg.nsSpecialId);
pg.re.urlNoPopup=RegExp('((title=|/)' + sp + '(?:%3A|:)|section=[0-9]|^#$)') ;
pg.re.urlNoPopup=RegExp('((title=|/)' + sp + '(?:%3A|:)|section=[0-9]|^#$)') ;
pg.re.contribs =RegExp('(title=|/)' + sp + '(?:%3A|:)Contributions' + '(&target=|/|/' + mw.config.get('wgFormattedNamespaces')[pg.nsUserId]+':)(.*)') ;
pg.re.contribs =RegExp('(title=|/)' + sp + '(?:%3A|:)' + mw.util.rawurlencode(popupString('Contributions')) + '(&target=|/|/' + $.escapeRE(mw.config.get('wgFormattedNamespaces')[pg.nsUserId])+':)(.*)') ;
pg.re.email =RegExp('(title=|/)' + sp + '(?:%3A|:)EmailUser' + '(&target=|/|/(?:' + mw.config.get('wgFormattedNamespaces')[pg.nsUserId]+':)?)(.*)') ;
pg.re.email =RegExp('(title=|/)' + sp + '(?:%3A|:)EmailUser' + '(&target=|/|/(?:' + mw.config.get('wgFormattedNamespaces')[pg.nsUserId]+':)?)(.*)') ;
pg.re.backlinks =RegExp('(title=|/)' + sp + '(?:%3A|:)WhatLinksHere' + '(&target=|/)([^&]*)');
pg.re.backlinks =RegExp('(title=|/)' + sp + '(?:%3A|:)WhatLinksHere' + '(&target=|/)([^&]*)');
Line 6,252: Line 6,252:
case 'relatedChanges': this.print=specialLink; this.specialpage='Recentchangeslinked'; break;
case 'relatedChanges': this.print=specialLink; this.specialpage='Recentchangeslinked'; break;
case 'move': this.print=specialLink; this.specialpage='Movepage'; break;
case 'move': this.print=specialLink; this.specialpage='Movepage'; break;
case 'contribs': this.print=specialLink; this.specialpage='Contributions'; break;
case 'contribs': this.print=specialLink; this.specialpage=mw.util.rawurlencode(popupString('Contributions')); break;
case 'deletedContribs':this.print=specialLink; this.specialpage='Deletedcontributions'; break;
case 'deletedContribs':this.print=specialLink; this.specialpage='Deletedcontributions'; break;
case 'email': this.print=specialLink; this.specialpage='EmailUser'; this.sep='/'; break;
case 'email': this.print=specialLink; this.specialpage='EmailUser'; this.sep='/'; break;
Line 7,583: Line 7,583:
'contribs': 'contribs',
'contribs': 'contribs',
'contributions': 'contributions',
'contributions': 'contributions',
'Contributions': 'Contributions',
'deletedContribs': 'deleted contributions',
'deletedContribs': 'deleted contributions',
'DeletedcontributionsHint': 'List deleted edits made by %s',
'DeletedcontributionsHint': 'List deleted edits made by %s',