User:Mike Dillon/Scripts/recentpages.js: Difference between revisions

Content deleted Content added
mNo edit summary
No edit summary
Line 54:
for (var n in historyItems) {
var itemUrl = wgArticlePath.replace(/\$1/,
encodeURIComponentencodeURI(historyItems[n]));
 
itemUrl = itemUrl.replace(/%2f/gi, "/");
var itemLabel = historyItems[n].replace(/_/g, " ");
var itemSlash = itemLabel.lastIndexOf("/");
if (itemSlash != -1) itemLabel = itemLabel.substr(itemSlash + 1);
 
historyList.appendChild(li(
a({ href: itemUrl, title: historyItems[n] }, itemLabel)));