autopatrolled, avs, delete, Administrators
745
edits
(Fixed URL formatting.) |
(Improved URL formatting.) |
||
Line 12: | Line 12: | ||
if (mw.config.get('wgAction') === "view") { | if (mw.config.get('wgAction') === "view") { | ||
var apiURL = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php'; | var apiURL = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php'; | ||
var wikiURL = mw. | var wikiURL = mw.util.getUrl(''); | ||
// Fetches the creator of the current page | // Fetches the creator of the current page | ||
Line 57: | Line 57: | ||
var creatorInfo = $('<div>') | var creatorInfo = $('<div>') | ||
.append('Page created by: ') | .append('Page created by: ') | ||
.append($('<a>').attr('href', wikiURL + ' | .append($('<a>').attr('href', wikiURL + 'User:' + encodeURIComponent(creator)).text(creator).css({'color': '#0645ad'})) | ||
.append(' (') | .append(' (') | ||
.append($('<a>').attr('href', wikiURL + ' | .append($('<a>').attr('href', wikiURL + 'Special:Contributions/' + encodeURIComponent(creator)).text(editCount + ' edits').css({'color': '#0645ad'})) | ||
.append(')') | .append(')') | ||
.css({'font-size': '84%', 'color': '#666', 'margin-top': '5px'}); | .css({'font-size': '84%', 'color': '#666', 'margin-top': '5px'}); |