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

Content deleted Content added
No edit summary
No edit summary
Line 46:
}
}
 
// History clearing
var clearHistory = function () {
historyItems = [];
while (historyList.firstChild) {
historyList.removeChild(historyList.firstChild);
}
historyList.appendChild(li(em("No page history")));
return false;
};
 
// Build out the history list
Line 65 ⟶ 75:
a({ href: itemUrl, title: historyItems[n] }, itemLabel)));
}
 
var clearHistoryLink = a({ href: "#" }, "Clear history");
clearHistoryLink.onclick = clearHistory;
historyList.appendChild(li({ style: "padding-top: 1em" }, clearHistoryLink));
}
}