Content deleted Content added
Mike Dillon (talk | contribs) mNo edit summary |
Mike Dillon (talk | contribs) m use wfMsg; add localizations in English and Spanish |
||
Line 7:
var pageHistoryBeforePorlet;
var pageHistoryExpiresInDays;
/* Messages */
// pageHistoryTitle: title of page history portlet
wfAddMsg("en", "pageHistoryTitle", "Page history");
wfAddMsg("es", "pageHistoryTitle", "Historial de páginas");
// clearHistoryLabel: label of the "clear history" link
wfAddMsg("en", "clearHistoryLabel", "clear history");
wfAddMsg("es", "clearHistoryLabel", "borrar historial");
// clearHistoryTitle: tooltip of the "clear history" link
wfAddMsg("en", "clearHistoryTitle", "Clear page history");
wfAddMsg("es", "clearHistoryTitle", "Borrar historial de páginas");
// noPageHistoryText: text to display when there is no page history
wfAddMsg("en", "noPageHistoryText", "No page history");
wfAddMsg("es", "noPageHistoryText", "Ningún historial de páginas");
addOnloadHook(function () {
Line 18 ⟶ 35:
with (easyDom) {
var historyPortlet = div({ "class": "portlet", "id": "p-history" },
h5(wfMsg("
var historyList = ul();
var historyPBody = div({ "class": "pBody" }, historyList);
Line 60 ⟶ 77:
}
with (easyDom) {
historyList.appendChild(li(em(wfMsg("
}
deleteCookie(pageHistoryCookieName, { path: "/" });
Line 69 ⟶ 86:
with (easyDom) {
if (historyItems.length == 0) {
historyList.appendChild(li(em(wfMsg("
} else {
for (var n in historyItems) {
Line 87 ⟶ 104:
}
var clearHistoryLink = a({ "href": "#", "title": wfMsg("
em(wfMsg("clearHistoryLabel")));
clearHistoryLink.onclick = clearHistory;
historyPBody.appendChild(div(
|