MediaWiki:RecentChangesMultiple/core.js

// ";                   +" ";                    // RCMModal.showModal({ title:tTitle, content:tModalContent, rcm_buttons:tButtons });                    RCMModal_1["default"].setModalContent(tModalContent);                },            });        });    };    // STATIC - https://www.mediawiki.org/wiki/API:Imageinfo    // TODO - error support?    RCData.previewImages = function (pAjaxUrl, pImageNames, pArticlePath) {        var tImagesInLog = pImageNames.slice;        var size = 210; // Must match in CSS - Logic: (1000-~40[for internal wrapper width]) / 4 - (15 * 2 [padding])        pAjaxUrl += "&iiurlwidth=" + size + "&iiurlheight=" + size;        var tCurAjaxUrl = pAjaxUrl + "&titles=" + tImagesInLog.splice(0, 50).join("|");        mw.log("http:" + tCurAjaxUrl.replace("&format=json", "&format=jsonfm"), pImageNames);        var tTitle = i18n_1["default"]("awc-metrics-images");        var tButtons = []; var tAddLoadMoreButton = function { if (tImagesInLog.length > 0) { mw.log("Over 50 images to display; Extra images must be loaded later."); var tModal = document.querySelector("#" + RCMModal_1["default"].MODAL_CONTENT_ID); var tGallery_1 = tModal.querySelector(".rcm-gallery"); var tCont_1 = Utils_1["default"].newElement("center", { style: 'margin-bottom: 8px;' }, tModal); var tButton = Utils_1["default"].newElement("button", { innerHTML: i18n_1["default"]('specialvideos-btn-load-more') }, tCont_1); tButton.addEventListener("click", function {                    tCurAjaxUrl = pAjaxUrl + "&titles=" + tImagesInLog.splice(0, 50).join("|");                    mw.log("http:" + tCurAjaxUrl.replace("&format=json", "&format=jsonfm"));                    tCont_1.innerHTML = ConstantsApp_1["default"].getLoader(25);                    $.ajax({ type: 'GET', dataType: 'jsonp', data: {}, url: tCurAjaxUrl, success: function (pData) { Utils_1["default"].removeElement(tCont_1); tGallery_1.innerHTML += RCData.previewImages_getGalleryItemsFromData(pData.query.pages, pArticlePath, size); tAddLoadMoreButton; },                   });                });            }        };        RCMModal_1["default"].showLoadingModal({ title: tTitle, rcm_buttons: tButtons }, function  {            $.ajax({ type: 'GET', dataType: 'jsonp', data: {}, url: tCurAjaxUrl, success: function (pData) { if (!RCMModal_1["default"].isModalOpen) { return; }                   var tModalContent = '' + '' + RCData.previewImages_getGalleryItemsFromData(pData.query.pages, pArticlePath, size) + ' ';                   RCMModal_1["default"].setModalContent(tModalContent); tAddLoadMoreButton; },           });        });    };    RCData.previewImages_getGalleryItemsFromData = function (pData, pArticlePath, pSize) { var tReturnText = ""; for (var key in pData) { tReturnText += RCData.previewImages_getGalleryItem(pData[key], pArticlePath, pSize); }       return tReturnText; };   RCData.previewImages_getGalleryItem = function (pPage, pArticlePath, pSize) { var tTitle = pPage.title, tPageTitleNoNS = tTitle.indexOf(":") > -1 ? tTitle.split(":")[1] : tTitle, tImage = pPage.imageinfo ? pPage.imageinfo[0] : null, tInvalidImage = null; if (pPage.missing == "") { tInvalidImage = { thumbHref: pArticlePath + Utils_1["default"].escapeCharactersLink(tTitle), thumbText: i18n_1["default"]('filedelete-success', tTitle) };       }        else if (tImage == null) { tInvalidImage = { thumbHref: pArticlePath + Utils_1["default"].escapeCharactersLink(tTitle), thumbText: i18n_1["default"]('shared_help_was_redirect', tTitle) };       }        else if (Utils_1["default"].isFileAudio(tTitle)) { tInvalidImage = { thumbHref: tImage.url, thumbText: ' ' + tTitle };       }        else if (tImage.thumburl == "" || (tImage.width == 0 && tImage.height == 0)) { tInvalidImage = { thumbHref: tImage.url, thumbText: tTitle };       }        var tRCM_galleryItemTemplate = function (_a) { var wrapperStyle = _a.wrapperStyle, image = _a.image, imageHref = _a.imageHref, imageStyle = _a.imageStyle, isLightbox = _a.isLightbox, caption = _a.caption; wrapperStyle = wrapperStyle ? "style=\"" + wrapperStyle + "\"" : ""; var lightBoxClass = isLightbox ? "image-no-lightbox" : "image lightbox"; return ' ' + ' '               + ("") + ("") + image + '' + ' '               + ' '                + ' '                + caption + ' '               + ' ';        };        if (tInvalidImage) { // Display text instead of image return tRCM_galleryItemTemplate({ isLightbox: false, wrapperStyle: null,               image: tInvalidImage.thumbText,                imageHref: tInvalidImage.thumbHref,                imageStyle: "height:" + pSize + "px; width:" + pSize + "px; line-height:inherit;",                caption: tPageTitleNoNS,            }); }       else { // Returned thumb width/height calculates to fit within size requested at fetch, even if the wiki doesn't return scaled down image. var tOffsetY = pSize / 2 - tImage.thumbheight / 2; var tScaledWidth = tImage.thumbwidth; return tRCM_galleryItemTemplate({ isLightbox: true,               wrapperStyle: "position: relative; width:" + tScaledWidth + "px; top:" + tOffsetY + "px;",                image: "",                imageHref: tImage.url,                imageStyle: "width:" + tScaledWidth + "px;",                caption: "" + tPageTitleNoNS + "",            }); }   };    RCData.previewPage = function (pAjaxUrl, pPageName, pPageHref, pServerLink) { mw.log("http:" + pAjaxUrl); var tTitle = "" + pPageName; var tButtons = [ {               value: i18n_1["default"]('wikiaPhotoGallery-conflict-view'), event: "diff", callback: function { window.open(pPageHref, '_blank'); }, }       ];        RCMModal_1["default"].showLoadingModal({ title: tTitle, rcm_buttons: tButtons }, function  {            // Retrieve the diff table.            // TODO - error support?            $.ajax({ type: 'GET', dataType: 'jsonp', data: {}, url: pAjaxUrl, success: function (pData) { if (!RCMModal_1["default"].isModalOpen) { return; }                   var tContentText = pData.parse.text["*"]; var tModalContent = '' + " "                       + " "                        + " "                        + " "                        + tContentText + " "                       + " "                        + " "                        + " ";                    RCMModal_1["default"].setModalContent(tModalContent); var tModalCont = document.querySelector("#" + RCMModal_1["default"].MODAL_CONTENT_ID); var tCont = document.querySelector("#" + RCMModal_1["default"].MODAL_CONTENT_ID + " #mw-content-text"); if (tCont.attachShadow) { // Setup Shadow dom RCMModal_1["default"].setModalContent(""); tModalCont = tModalCont.attachShadow({ mode: "open" }); tModalCont.innerHTML = tModalContent; tCont = tModalCont.querySelector("#mw-content-text"); tCont.innerHTML = ""; // Convert tags (not supported in shadow dom) to tags via @import (bad, but neccisary) // Do it for current wiki head first (since shadow dom strips all css) var tCurPageHead = document.querySelector("head").cloneNode(true); Utils_1["default"].forEach(tCurPageHead.querySelectorAll("link[rel=stylesheet]"), function (o, i, a) {                           tCont.innerHTML += " @import url(" + o.href + "); "; //o.outerHTML;                        }); // Prevent warnings from poping up about shadow dom not supporting. Utils_1["default"].forEach(tCurPageHead.querySelectorAll("link"), function (o, i, a) { Utils_1["default"].removeElement(o); }); // Add page info var tPreviewHead = Utils_1["default"].newElement("div", { innerHTML: pData.parse.headhtml["*"] }); Utils_1["default"].forEach(tPreviewHead.querySelectorAll("link[rel=stylesheet]"), function (o, i, a) {                           tCont.innerHTML += " @import url(" + o.href + "); "; //o.outerHTML;                        }); // Prevent warnings from poping up about shadow dom not supporting. Utils_1["default"].forEach(tPreviewHead.querySelectorAll("link"), function (o, i, a) { Utils_1["default"].removeElement(o); }); tCont.innerHTML += tCurPageHead.innerHTML; tCont.innerHTML += "\n\n"; tCont.innerHTML += tPreviewHead.innerHTML; tCont.innerHTML += tContentText; }                   else if ("scoped" in document.createElement("style")) { var tPreviewHead = Utils_1["default"].newElement("div", { innerHTML: pData.parse.headhtml["*"] }); Utils_1["default"].forEach(tPreviewHead.querySelectorAll("link[rel=stylesheet]"), function (o, i, a) {                           tCont.innerHTML += " @import url(" + o.href + "); "; //o.outerHTML;                        }); }                   // Fix all local links to point to wiki. Utils_1["default"].forEach(tCont.querySelectorAll("a[href^='/']"), function (o, i, a) {                       o.href = pServerLink + o.getAttribute("href");                    }); mw.hook('wikipage.content').fire($(tCont)); // Makes sure infoboxes tabs/section collapsing works. },           });        });    };    return RCData; }); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = RCData;

},{"./ConstantsApp":1,"./RCMModal":6,"./RC_TYPE":10,"./Utils":12,"./i18n":14}],4:[function(require,module,exports){ "use strict"; var RCData_1 = require("./RCData"); var Utils_1 = require("./Utils"); var i18n_1 = require("./i18n"); var RC_TYPE_1 = require("./RC_TYPE"); var ConstantsApp_1 = require("./ConstantsApp"); var $ = window.jQuery; var mw = window.mediaWiki; //###################################### // #### Recent Change List #### // * Contains one or more RCData objects. Formats list as needed. //###################################### var RCList = (function {    // Constructor    function RCList(pManager) {        this.manager = pManager;        this.list = [];        // this.removeListeners= [];    }    Object.defineProperty(RCList.prototype, "newest", { // Properties get: function { return this.list[0]; }, enumerable: true, configurable: true });   Object.defineProperty(RCList.prototype, "oldest", { get: function { return this.list[this.list.length - 1]; }, enumerable: true, configurable: true });   Object.defineProperty(RCList.prototype, "date", { get: function { return this.newest.date; }, enumerable: true, configurable: true });   Object.defineProperty(RCList.prototype, "wikiInfo", { get: function { return this.newest.wikiInfo; }, enumerable: true, configurable: true });   Object.defineProperty(RCList.prototype, "type", { get: function { return this.newest.type; }, enumerable: true, configurable: true });   RCList.prototype.dispose = function  {        delete this.manager;        for (var i = 0; i < this.list.length; i++) {            this.list[i].dispose;            this.list[i] = null;        }        this.list = null;        // // Remove event listeners.        // for(let i=0; i < this.removeListeners.length; i++) {        // 	this.removeListeners[i];        // 	this.removeListeners[i] = null;        // }        // this.removeListeners = null;        this.htmlNode = null;    };    RCList.prototype.addRC = function (pNewRC) {        this.list.push(pNewRC);        this.list.sort(function (a, b) { return b.date.valueOf - a.date.valueOf; }); // More efficent and dependable than doing it manually.        return this; // Return self for chaining or whatnot.    };    // Removes and disposes    RCList.prototype.removeRC = function (pRC) {        var tDataInListI = this.list.indexOf(pRC); if (tDataInListI > -1) { this.list.splice(tDataInListI, 1)[0].dispose; }       else { mw.log("[RCList](removeRC) Data did not exist in list, and thus could not be removed.", pRC); }   };    RCList.prototype.shouldGroupWith = function (pRC) { if (this.wikiInfo.servername == pRC.wikiInfo.servername           && this.type == pRC.type            && Utils_1["default"].getMonth(this.date) == Utils_1["default"].getMonth(pRC.date)            && Utils_1["default"].getDate(this.date) == Utils_1["default"].getDate(pRC.date)) { switch (this.type) { case RC_TYPE_1["default"].LOG: { if (this.newest.logtype == pRC.logtype) { return true; }                   break; }               default: { if (this.newest.uniqueID == pRC.uniqueID) { return true; }                   break; }           }        }        return false; };   // Returns a url that compares the edits of two RCs (can be the same one twice, since a RC has info on the current and previous edit). // If "pToRC" is null, it will link to newest edit. RCList.prototype.getLink = function (pRC, pDiff, pOldId) { return pRC.hrefFS + "curid=" + pRC.pageid + (pDiff || pDiff == 0 ? "&diff=" + pDiff : "") + (pOldId ? "&oldid=" + pOldId : ""); };   // Returns a url that compares the edits of two RCs (can be the same one twice, since a RC has info on the current and previous edit). // If "pToRC" is null, it will link to newest edit. RCList.prototype.getDiffLink = function (pFromRC, pToRC) { return pFromRC.hrefFS + "curid=" + pFromRC.pageid + "&diff=" + (pToRC ? pToRC.revid : 0) + "&oldid=" + pFromRC.old_revid; };   RCList.prototype._diffHist = function (pRC) { var diffLink = i18n_1["default"]('diff'); if (pRC.isNewPage == false) { diffLink = "" + diffLink + "" + this.getAjaxDiffButton; }       if (this.type == RC_TYPE_1["default"].NORMAL && pRC.namespace == 6) { diffLink += this.getAjaxImageButton; }       return "(" + (diffLink + i18n_1["default"]("pipe-separator")) + "" + i18n_1["default"]('hist') + ")"; };   // Calculates the size difference between the recent change(s), and returns formatted text to appear in HTML. RCList.prototype._diffSizeText = function (pToRC, pFromRC) { var tDiffSize = pToRC.newlen - (pFromRC ? pFromRC : pToRC).oldlen; var tDiffSizeText = mw.language.convertNumber(tDiffSize); var html = "{1} "; if (tDiffSize > 0) { return Utils_1["default"].formatString(html, "mw-plusminus-pos", i18n_1["default"]('parentheses', "+" + tDiffSizeText)); }       else if (tDiffSize < 0) { // The negative is part of the number, so no reason to add it. return Utils_1["default"].formatString(html, "mw-plusminus-neg", i18n_1["default"]('parentheses', tDiffSizeText)); }       else { return Utils_1["default"].formatString(html, "mw-plusminus-null", i18n_1["default"]('parentheses', tDiffSizeText)); }   };    // TODO: Convert to a Map once ES6 is used. RCList.prototype._contributorsCountText = function { var _this = this; var contribs = {}, indx; this.list.forEach(function (rc) {           if (contribs.hasOwnProperty(rc.author)) {                contribs[rc.author].count++;            }            else {                contribs[rc.author] = { count: 1, userEdited: rc.userEdited };                contribs[rc.author].avatar = (rc.type == RC_TYPE_1["default"].DISCUSSION ? rc.getAvatarImg : "");           }        }); var returnText = "[", total = 0, tLength = this.list.length; Object.keys(contribs).forEach(function (key) {           returnText += _this._userPageLink(key, contribs[key].userEdited, contribs[key].avatar) + (contribs[key].count > 1 ? " (" + contribs[key].count + "&times;)" : "");           total += contribs[key].count;            if (total < tLength) {                returnText += "; ";            }        }, this); return returnText + "]"; };   // For use with comments / normal pages RCList.prototype._changesText = function { var returnText = i18n_1["default"]("nchanges", this.list.length); if (this.type == RC_TYPE_1["default"].NORMAL && this.oldest.isNewPage == false) { returnText = "" + returnText + "" + this.getAjaxDiffButton; }       if (this.type == RC_TYPE_1["default"].NORMAL && this.newest.namespace == 6) { returnText += this.getAjaxImageButton; }       return returnText; };   RCList.prototype._userPageLink = function (pUsername, pUserEdited, pAvatar) { if (pUserEdited) { return pAvatar + "" + pUsername + "</a>"; }       else { return "" + pUsername + "</a>"; }   };    RCList.prototype.getExistingThreadTitle = function  { var tTitle = null; this.list.some(function (rc) {           if (rc.threadTitle) {                tTitle = rc.threadTitle;                return true;            }            return false;        }); return tTitle; };   // Check each entry for "threadTitle", else return default text. RCList.prototype.getThreadTitle = function { var _this = this; var tTitle = this.getExistingThreadTitle; var tReturnText = tTitle; if (this.manager.extraLoadingEnabled) { var tElemID_1 = Utils_1["default"].uniqID; tReturnText = "<span id='" + tElemID_1 + "'>" + (tTitle ? tTitle : i18n_1["default"]('rcm-unknownthreadname')) + " "; // These ajax requests are done here to condense number of requests; title is only needed per list, not per RCData. if (this.type != RC_TYPE_1["default"].DISCUSSION) { this.manager.secondaryWikiData.push({                   url: this.wikiInfo.scriptpath + "/api.php?action=query&format=json&prop=revisions&titles=" + this.newest.uniqueID + "&rvprop=content",                    callback: function (data) {                        var tSpan = document.querySelector("#" + tElemID_1);                        // for(var tPageIndex in data.query.pages)                        // var tPage = data.query.pages[tPageIndex];                        var tPage = Utils_1["default"].getFirstItemFromObject(data.query.pages);                        tSpan.parentNode.href = _this.wikiInfo.articlepath + "Thread:" + tPage.pageid;                        var tTitleData = /.*?<\/ac_metadata>/g.exec(tPage.revisions[0]["*"]);                        if (tTitleData != null) {                            tSpan.innerHTML = tTitleData[1];                        } }               });            }            else {                if (tTitle == null) {                    var tRC = this.newest;                    this.manager.secondaryWikiData.push({ // https://github.com/Wikia/app/blob/b03df0a89ed672697e9c130d529bf1eb25f49cda/lib/Swagger/src/Discussion/Api/ThreadsApi.php url: "https://services.wikia.com/discussion/" + this.wikiInfo.wikiaCityID + "/threads/" + tRC.threadId, dataType: "json", callback: function (data) { _this.newest.threadTitle = data.title || (data.rawContent.slice(0, 35).trim + "..."); // If no title, use part of original message. var tSpan = document.querySelector("#" + tElemID_1); if (tSpan) { tSpan.innerHTML = _this.newest.threadTitle; var tIcons = ""; if (data.isLocked) { tIcons += ConstantsApp_1["default"].getSymbol("rcm-lock"); }                               if (data.isReported) { tIcons += ConstantsApp_1["default"].getSymbol("rcm-report"); }                               if (tIcons) { tSpan.parentNode.insertBefore(Utils_1["default"].newElement("span", { innerHTML: tIcons }), tSpan); }                           }                        }                    });                }                else {                    tReturnText = tTitle;                }            }        }        else {            if (tReturnText == null) {                tReturnText = "" + i18n_1["default"]('rcm-unknownthreadname') + "";            }        }        return tReturnText;    };    RCList.prototype.getAjaxDiffButton = function  {        return " <span class=\"rcm-ajaxIcon rcm-ajaxDiff\">" + ConstantsApp_1["default"].getSymbol("rcm-columns") + " ";    };    RCList.prototype.getAjaxImageButton = function  {        return " <span class=\"rcm-ajaxIcon rcm-ajaxImage\">" + ConstantsApp_1["default"].getSymbol("rcm-picture") + " ";    };    RCList.prototype.getAjaxPagePreviewButton = function  {        return " <span class=\"rcm-ajaxIcon rcm-ajaxPage\">" + ConstantsApp_1["default"].getSymbol("rcm-preview") + " "; };   // https://www.mediawiki.org/wiki/API:Revisions RCList.prototype.addPreviewDiffListener = function (pElem, pFromRC, pToRC) { if (pElem) { if (pToRC == undefined) { pToRC = pFromRC; }           // Initializing here since "rc" may be nulled by the time the event is triggered. var pageName = pFromRC.title; var pageID = pFromRC.pageid; var ajaxLink = this.wikiInfo.scriptpath + ("/api.php?action=query&format=json&prop=revisions|info&rvprop=size|user|parsedcomment|timestamp|flags&rvdiffto=" + pToRC.revid + "&revids=" + pFromRC.old_revid); var diffLink = pFromRC.hrefFS + "curid=" + pFromRC.pageid + "&diff=" + pToRC.revid + "&oldid=" + pFromRC.old_revid; var undoLink = pFromRC.hrefFS + "curid=" + pFromRC.pageid + "&undo=" + pToRC.revid + "&undoafter=" + pFromRC.old_revid + "&action=edit"; // var rollbackLink = null; // if(this.wikiInfo.user.hasRollbackRight) { // 	ajaxLink += "&rvtoken=rollback"; // 	// Token provided upon results returned from ajaxLink. // 	rollbackLink = Utils.formatString( "{0}action=rollback&from={1}&token=", pFromRC.hrefFS, pFromRC.author ); // }           var diffTableInfo = { wikiInfo: pFromRC.wikiInfo, hrefFS: pFromRC.hrefFS, newRev: { user: pToRC.userDetails, summary: pToRC.getSummary, date: pToRC.date, minor: pToRC.isMinorEdit }, };           this._addAjaxClickListener(pElem, function  { RCData_1["default"].previewDiff(pageName, pageID, ajaxLink, diffLink, undoLink, diffTableInfo); }); pFromRC = null; pToRC = null; }   };    // https://www.mediawiki.org/wiki/API:Imageinfo RCList.prototype.addPreviewImageListener = function (pElem, pImageRCs) { if (Object.prototype.toString.call(pImageRCs) !== '[object Array]') { pImageRCs = [pImageRCs]; }       pImageRCs = pImageRCs; if (pElem) { var tImageNames = []; for (var i = 0; i < pImageRCs.length; i++) { if (tImageNames.indexOf(pImageRCs[i].hrefTitle) < 0) { tImageNames.push(pImageRCs[i].hrefTitle); }           }            var ajaxLink = this.wikiInfo.scriptpath + "/api.php?action=query&prop=imageinfo&format=json&redirects&iiprop=url|size"; var articlepath = this.wikiInfo.articlepath; this._addAjaxClickListener(pElem, function { RCData_1["default"].previewImages(ajaxLink, tImageNames, articlepath); }); // tImageNames = null; pImageRCs = null; }   };    // https://www.mediawiki.org/wiki/API:Parsing_wikitext#parse RCList.prototype.addPreviewPageListener = function (pElem, pRC) { if (pElem) { // Initializing here since "rc" may be nulled by the time the event is triggered. var ajaxLink_1 = this.wikiInfo.scriptpath + ("/api.php?action=parse&format=json&pageid=" + pRC.pageid + "&prop=text|headhtml&disabletoc=true"); var pageName = pRC.title; var pageHref_1 = pRC.href; if (pRC.type == RC_TYPE_1["default"].WALL || pRC.type == RC_TYPE_1["default"].BOARD || pRC.type == RC_TYPE_1["default"].COMMENT) { // TODO: This isn't -exactly- true, but it gives better results than just linking to the href (as of writing this). pageHref_1 = this.wikiInfo.articlepath + "Thread:" + pRC.pageid; }           var serverLink_1 = this.wikiInfo.server; this._addAjaxClickListener(pElem, function { RCData_1["default"].previewPage(ajaxLink_1, pageName, pageHref_1, serverLink_1); }); }   };    RCList.prototype._addAjaxClickListener = function (pElem, pCallback) { var tRCM_AjaxIconClickHandler = function (e) { e.preventDefault; pCallback; };       pElem.addEventListener("click", tRCM_AjaxIconClickHandler); // this.removeListeners.push( => { pElem.removeEventListener("click", tRCM_AjaxIconClickHandler); }); };   // private _addRollbackLink(pRC) { // 	if(this.extraLoadingEnabled == false) { return ""; } // 	var tRollback = Utils.newElement("span", { className:"mw-rollback-link" }); // 	tRollback.appendChild(document.createTextNode(" ")); // 	var tRollbackLink = Utils.newElement("a", { innerHTML:i18n("rollbacklink") }, tRollback); // 	tRollback.appendChild(document.createTextNode("]")); // 	// Initializing here since "rc" may be nulled by the time the event is triggered. // 	var tScriptDir = this.wikiInfo.scriptpath; // 	var tVersion = this.wikiInfo.mwversion; // 	var tPageName = this.title; // 	var tPageID = this.pageid; // 	var tRollbackLink = this.hrefFS+"action=rollback&from="+pRC.author+"&token="; // 	var tRCM_rollback = => { // 		RCList.ajaxRollback(tScriptDir, tVersion, tPageName, tPageID, tRollbackLink); // 		tRollbackLink.removeEventListener("click", tRCM_rollback); // 	}   // 	tRollbackLink.addEventListener("click", tRCM_rollback); // 	this.removeListeners.push( => { tRollbackLink.removeEventListener("click", tRCM_rollback); }); // 	pRC = null; // 	return ; // }   // Provide the element appropriate to a given abbreviated flag with the appropriate class. // Returns a non-breaking space if flag not set. RCList.prototype._flag = function (pFlag, pRC, pEmpty) { var tI18nLetter = "", tI18nTooltip = ""; switch (pFlag) { case "newpage": { if (pRC.isNewPage) { tI18nLetter = "newpageletter"; tI18nTooltip = "recentchanges-label-newpage"; }               break; }           case "minoredit": { if (pRC.isMinorEdit) { tI18nLetter = "minoreditletter"; tI18nTooltip = "recentchanges-label-minor"; }               break; }           case "botedit": { if (pRC.isBotEdit) { tI18nLetter = "boteditletter"; tI18nTooltip = "recentchanges-label-bot"; }               break; }       }        if (tI18nLetter == "") { return pEmpty; }       else { return "" + i18n_1["default"](tI18nLetter) + " "; }   };    RCList.prototype._getFlags = function (pRC, pEmpty, pData) { pData = pData || {}; return "" + this._flag("newpage", pRC, pEmpty) + (pData.ignoreminoredit ? pEmpty : this._flag("minoredit", pRC, pEmpty)) + this._flag("botedit", pRC, pEmpty) + pEmpty //this._flag("unpatrolled", this.oldest) ;   };    RCList.prototype._showFavicon = function  { return this.manager.chosenWikis.length > 1; };   RCList.prototype._getBackgroundClass = function  { return this._showFavicon ? "rcm-tiled-favicon" : ""; };   // An RC that is NOT part of a "block" of related changes (logs, edits to same page, etc) RCList.prototype._toHTMLSingle = function (pRC) { if (this.list.length > 1) { return this._toHTMLBlock; }       var html = ""; switch (pRC.type) { case RC_TYPE_1["default"].LOG: { html += pRC.logTitleLink; if (pRC.logtype == "upload") { html += this.getAjaxImageButton; }               html += RCList.SEP; html += pRC.logActionText; break; }           case RC_TYPE_1["default"].WALL: case RC_TYPE_1["default"].BOARD: { if (pRC.isWallBoardAction) { html += RCList.SEP; html += pRC.userDetails; html += pRC.wallBoardActionMessageWithSummary(this.getThreadTitle); }               else { html += pRC.wallBoardTitleText(this.getThreadTitle); html += this.getAjaxPagePreviewButton; html += " " + this._diffHist(pRC); html += RCList.SEP; html += this._diffSizeText(pRC); html += RCList.SEP; html += pRC.userDetails; html += pRC.getSummary; }               break; }           case RC_TYPE_1["default"].DISCUSSION: { var tRC = pRC; html += tRC.getThreadStatusIcons; html += tRC.discusssionTitleText(this.getThreadTitle); html += RCList.SEP; html += tRC.userDetails; html += tRC.getSummary; break; }           case RC_TYPE_1["default"].COMMENT: case RC_TYPE_1["default"].NORMAL: default: { html += pRC.pageTitleTextLink; html += this.getAjaxPagePreviewButton; html += " " + this._diffHist(pRC); html += RCList.SEP; html += this._diffSizeText(pRC); html += RCList.SEP; html += pRC.userDetails; html += pRC.getSummary; // if(this.type == RC_TYPE.NORMAL && this.isNewPage == false && this.wikiInfo.user.hasRollbackRight) { // html += " [rollback</a>]"; // }               break; }       }        var tTable = Utils_1["default"].newElement("table", { className: "mw-enhanced-rc " + pRC.wikiInfo.rcClass + " " + pRC.getNSClass }); Utils_1["default"].newElement("caption", { className: this._getBackgroundClass }, tTable); // Needed for CSS background. var tRow = Utils_1["default"].newElement("tr", {}, tTable); if (this._showFavicon) { Utils_1["default"].newElement("td", { innerHTML: pRC.wikiInfo.getFaviconHTML(true) }, tRow); }       Utils_1["default"].newElement("td", { className: "mw-enhanced-rc", innerHTML: ""                + '<img src="https://images.wikia.nocookie.net/__cb1422546004/common/skins/common/images/Arr_.png" width="12" height="12" alt=" " title="">'                + this._getFlags(pRC, " ")                + " "                + pRC.time                + " "        }, tRow); Utils_1["default"].newElement("td", { innerHTML: html }, tRow); this.addPreviewDiffListener(tTable.querySelector(".rcm-ajaxDiff"), pRC); this.addPreviewImageListener(tTable.querySelector(".rcm-ajaxImage"), pRC); this.addPreviewPageListener(tTable.querySelector(".rcm-ajaxPage"), pRC); if (this.manager.makeLinksAjax) { this.addPreviewDiffListener(tTable.querySelector(".rc-diff-link"), pRC); if (tTable.querySelector(".rcm-ajaxImage")) { this.addPreviewImageListener(tTable.querySelector(".rc-log-link"), pRC); this.addPreviewImageListener(tTable.querySelector(".rc-pagetitle"), pRC); }       }        return tTable; };   // An RCList that IS a "block" of related changes (logs, edits to same page, etc) RCList.prototype._toHTMLBlock = function { if (this.list.length == 1) { return this._toHTMLSingle(this.newest); }       var tBlockHead = this._toHTMLBlockHead; for (var i = 0; i < this.list.length; i++) { tBlockHead.querySelector("tbody").appendChild(this._toHTMLBlockLine(this.list[i])); }       // Make "blocks" collapsible - for this to work, make sure neither this NOR IT'S PARENT is modified via innerHTML after this has been added (to avoid event being "eaten"). if ($(tBlockHead).makeCollapsible) { $(tBlockHead).makeCollapsible; }       return tBlockHead; };   // The first line of a RC "group" RCList.prototype._toHTMLBlockHead = function { var html = ""; switch (this.type) { case RC_TYPE_1["default"].LOG: { html += this.newest.logTitleLink; if (this.newest.logtype == "upload") { html += this.getAjaxImageButton; }               break; }           case RC_TYPE_1["default"].NORMAL: { html += "" + this.newest.title + "</a>"; html += this.getAjaxPagePreviewButton; html += " (" + this._changesText + i18n_1["default"]("pipe-separator") + "" + i18n_1["default"]("hist") + "</a>)"; html += RCList.SEP; html += this._diffSizeText(this.newest, this.oldest); break; }           case RC_TYPE_1["default"].WALL: { html += this.newest.wallBoardTitleText(this.getThreadTitle); html += " (" + this._changesText + ")"; break; }           case RC_TYPE_1["default"].BOARD: { html += this.newest.wallBoardTitleText(this.getThreadTitle); html += " (" + this._changesText + ")"; break; }           case RC_TYPE_1["default"].DISCUSSION: { html += this.newest.discusssionTitleText(this.getThreadTitle, true); html += " (" + this._changesText + ")"; break; }           case RC_TYPE_1["default"].COMMENT: { // Link to comments sections on main page. If in main namespace, add the namespace to the page (if requested, custom namespaces can have comments) var tNameSpaceText = this.newest.namespace == 1 ? "" : this.wikiInfo.namespaces[String(this.newest.namespace - 1)]["*"] + ":"; html += i18n_1["default"].wiki2html(i18n_1["default"].MESSAGES["article-comments-rc-comments"].replace("$1", "$3|$1"), tNameSpaceText + this.newest.titleNoNS, undefined, this.wikiInfo.articlepath + tNameSpaceText + this.newest.titleNoNS + "#WikiaArticleComments"); html += " (" + this._changesText + ")"; // html += SEP // html += this._diffSizeText(this.newest, this.oldest); break; }       }        html += RCList.SEP; html += this._contributorsCountText; var tTable = Utils_1["default"].newElement("table", { className: "mw-collapsible mw-enhanced-rc mw-collapsed " + this.newest.wikiInfo.rcClass + " " + this.newest.getNSClass }); // mw-made-collapsible Utils_1["default"].newElement("caption", { className: this._getBackgroundClass }, tTable); // Needed for CSS background. var tTbody = Utils_1["default"].newElement("tbody", {}, tTable); // tbody is needed for $.makeCollapsible to work. var tRow = Utils_1["default"].newElement("tr", {}, tTbody); if (this._showFavicon) { Utils_1["default"].newElement("td", { innerHTML: this.newest.wikiInfo.getFaviconHTML(true) }, tRow); }       var td1 = Utils_1["default"].newElement("td", {}, tRow); Utils_1["default"].newElement("span", { className: "mw-collapsible-toggle", innerHTML: ''               + ' ' // href="#"                + '<img width="12" height="12" title="' + i18n_1["default"]("rc-enhanced-expand") + '" alt="+" src="https://images.wikia.nocookie.net/__cb1422546004/common/skins/common/images/Arr_r.png">'                + '</a> '                + ' ' // href="#"                + '<img width="12" height="12" title="' + i18n_1["default"]("rc-enhanced-hide") + '" alt="-" src="https://images.wikia.nocookie.net/__cb1422546004/common/skins/common/images/Arr_d.png">'                + '</a> ' }, td1); Utils_1["default"].newElement("td", { className: "mw-enhanced-rc", innerHTML: ""               + this._getFlags(this.oldest, " ", { ignoreminoredit: true })                + " "                + this.newest.time                + " "        }, tRow); Utils_1["default"].newElement("td", { innerHTML: html }, tRow); this.addPreviewDiffListener(tTable.querySelector(".rcm-ajaxDiff"), this.oldest, this.newest); this.addPreviewImageListener(tTable.querySelector(".rcm-ajaxImage"), this.list); this.addPreviewPageListener(tTable.querySelector(".rcm-ajaxPage"), this.newest); if (this.manager.makeLinksAjax) { this.addPreviewDiffListener(tTable.querySelector(".rc-diff-link, .rc-changes-link"), this.oldest, this.newest); if (tTable.querySelector(".rcm-ajaxImage")) { this.addPreviewImageListener(tTable.querySelector(".rc-log-link"), this.list); this.addPreviewImageListener(tTable.querySelector(".rc-pagetitle"), this.list); }       }        return tTable; };   // The individual lines of a RC "group" RCList.prototype._toHTMLBlockLine = function (pRC) { var html = ""; switch (pRC.type) { case RC_TYPE_1["default"].LOG: { html += " " + pRC.time + " "; if (pRC.logtype == "upload") { html += this.getAjaxImageButton; }               html += RCList.SEP; html += pRC.logActionText; break; }           case RC_TYPE_1["default"].WALL: case RC_TYPE_1["default"].BOARD: { if (pRC.isWallBoardAction) { html += " " + pRC.time + " "; html += RCList.SEP; html += pRC.userDetails; html += pRC.wallBoardActionMessageWithSummary(this.getThreadTitle); }               else { html += " " + pRC.time + "</a> "; html += " (" + i18n_1["default"]("cur") + "</a>";                   html += this.getAjaxPagePreviewButton;                    if (pRC.isNewPage == false) {                        html += i18n_1["default"]("pipe-separator") + "" + i18n_1["default"]("last") + "</a>" + this.getAjaxDiffButton;                    }                    html += ")"; html += RCList.SEP; html += this._diffSizeText(pRC); html += RCList.SEP; html += pRC.userDetails; html += pRC.getSummary; }               break; }           case RC_TYPE_1["default"].DISCUSSION: { var tRC = pRC; html += " " + tRC.time + "</a> "; html += tRC.getThreadStatusIcons; html += tRC.getUpvoteCount; html += RCList.SEP; html += pRC.userDetails; html += pRC.getSummary; break; }           case RC_TYPE_1["default"].COMMENT: case RC_TYPE_1["default"].NORMAL: { html += " " + pRC.time + "</a> "; html += " (" + i18n_1["default"]("cur") + "</a>";               if (pRC.type == RC_TYPE_1["default"].COMMENT) {                    html += this.getAjaxPagePreviewButton;                }                if (pRC.isNewPage == false) {                    html += i18n_1["default"]("pipe-separator") + "" + i18n_1["default"]("last") + "</a>" + this.getAjaxDiffButton;                }                html += ")"; html += RCList.SEP; html += this._diffSizeText(pRC); html += RCList.SEP; html += pRC.userDetails; html += pRC.getSummary; break; }       }        var tRow = Utils_1["default"].newElement("tr", { style: "display: none;" }); if (this._showFavicon) { Utils_1["default"].newElement("td", {}, tRow); } // Blank spot for where favicon would be on a normal table Utils_1["default"].newElement("td", {}, tRow); // Blank spot for where collapsing arrow would be on the table Utils_1["default"].newElement("td", { className: "mw-enhanced-rc", innerHTML: ""               + this._getFlags(pRC, " ")                + " "        }, tRow); Utils_1["default"].newElement("td", { className: "mw-enhanced-rc-nested", innerHTML: html }, tRow); this.addPreviewDiffListener(tRow.querySelector(".rcm-ajaxDiff"), pRC); this.addPreviewImageListener(tRow.querySelector(".rcm-ajaxImage"), pRC); this.addPreviewPageListener(tRow.querySelector(".rcm-ajaxPage"), pRC); if (this.manager.makeLinksAjax) { this.addPreviewDiffListener(tRow.querySelector(".rc-diff-link"), pRC); }       return tRow; };   RCList.prototype._toHTMLNonEnhanced = function (pRC, pIndex) { var html = ""; switch (pRC.type) { case RC_TYPE_1["default"].LOG: { html += pRC.logTitleLink; if (pRC.logtype == "upload") { html += this.getAjaxImageButton; }               html += i18n_1["default"]("semicolon-separator") + pRC.time; html += RCList.SEP; html += pRC.logActionText; break; }           case RC_TYPE_1["default"].WALL: case RC_TYPE_1["default"].BOARD: { if (pRC.isWallBoardAction) { html += pRC.wallBoardHistoryLink; html += i18n_1["default"]("semicolon-separator") + pRC.time; html += RCList.SEP; html += pRC.userDetails; html += pRC.wallBoardActionMessageWithSummary(this.getThreadTitle); }               else { html += this._diffHist(pRC); html += RCList.SEP; html += this._getFlags(pRC, "") + " "; html += pRC.wallBoardTitleText(this.getThreadTitle); html += this.getAjaxPagePreviewButton; html += i18n_1["default"]("semicolon-separator") + pRC.time; html += RCList.SEP; html += this._diffSizeText(pRC); html += RCList.SEP; html += pRC.userDetails; html += pRC.getSummary; }               break; }           case RC_TYPE_1["default"].DISCUSSION: { var tRC = pRC; html += tRC.getThreadStatusIcons; html += tRC.discusssionTitleText(this.getThreadTitle); html += i18n_1["default"]("semicolon-separator") + pRC.time; html += RCList.SEP; html += tRC.userDetails; html += tRC.getSummary; break; }           case RC_TYPE_1["default"].COMMENT: case RC_TYPE_1["default"].NORMAL: default: { html += this._diffHist(pRC); html += RCList.SEP; html += this._getFlags(pRC, "") + " "; html += pRC.pageTitleTextLink; html += this.getAjaxPagePreviewButton; html += i18n_1["default"]("semicolon-separator") + pRC.time; html += RCList.SEP; html += this._diffSizeText(pRC); html += RCList.SEP; html += pRC.userDetails; html += pRC.getSummary; break; }       }        var tLi = Utils_1["default"].newElement("li", { className: (pIndex % 2 == 0 ? "mw-line-even" : "mw-line-odd") + " " + pRC.wikiInfo.rcClass + " " + pRC.getNSClass }); Utils_1["default"].newElement("div", { className: this._getBackgroundClass }, tLi); ;       if (this._showFavicon) { tLi.innerHTML += pRC.wikiInfo.getFaviconHTML(true) + " "; }       tLi.innerHTML += html; this.addPreviewDiffListener(tLi.querySelector(".rcm-ajaxDiff"), pRC); this.addPreviewImageListener(tLi.querySelector(".rcm-ajaxImage"), pRC); this.addPreviewPageListener(tLi.querySelector(".rcm-ajaxPage"), pRC); if (this.manager.makeLinksAjax) { this.addPreviewDiffListener(tLi.querySelector(".rc-diff-link"), pRC); if (tLi.querySelector(".rcm-ajaxImage")) { this.addPreviewImageListener(tLi.querySelector(".rc-log-link"), pRC); this.addPreviewImageListener(tLi.querySelector(".rc-pagetitle"), pRC); }       }        return tLi; };   RCList.prototype.toHTML = function (pIndex) { if (this.manager.rcParams.hideenhanced) { return this.htmlNode = this._toHTMLNonEnhanced(this.newest, pIndex); }       else { if (this.list.length > 1) { return this.htmlNode = this._toHTMLBlock; }           else { return this.htmlNode = this._toHTMLSingle(this.newest); }       }    };    // Static Constants RCList.SEP = " . . "; return RCList; }); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = RCList;

},{"./ConstantsApp":1,"./RCData":3,"./RC_TYPE":10,"./Utils":12,"./i18n":14}],5:[function(require,module,exports){ "use strict"; var Main_1 = require("./Main"); var RCMWikiPanel_1 = require("./RCMWikiPanel"); var RCMOptions_1 = require("./RCMOptions"); var ConstantsApp_1 = require("./ConstantsApp"); var RCMModal_1 = require("./RCMModal"); var WikiData_1 = require("./WikiData"); var RCData_1 = require("./RCData"); var RCMWikiaDiscussionData_1 = require("./RCMWikiaDiscussionData"); var RCList_1 = require("./RCList"); var Utils_1 = require("./Utils"); var i18n_1 = require("./i18n"); var RC_TYPE_1 = require("./RC_TYPE"); var Notification = window.Notification; var $ = window.jQuery; var mw = window.mediaWiki; //###################################### // #### RCMManager - Module core #### // * This is what actually parses a "rc-content-multiple" div, and loads the respective information. // * Uses RCList to actually format the RecentChanges info. //###################################### var RCMManager = (function {    // Constructor    function RCMManager(pWrapper, pModID) {        this.modID = "rcm" + pModID;        this.resultCont = pWrapper;        this.makeLinksAjax = false;        this.ajaxID = 0;        this.autoRefreshLocalStorageID = ConstantsApp_1["default"].AUTO_REFRESH_LOCAL_STORAGE_ID + "-" + this.modID;        this.extraLoadingEnabled = true;        this.flagWikiDataIsLoaded = false;        this.isHardRefresh = true;        this._parseWikiList;    }    RCMManager.prototype.dispose = function  {        this.resultCont = null;        this.optionsNode.dispose;        this.optionsNode = null;        this.statusNode = null;        this.wikisNode.dispose;        this.wikisNode = null;        this.resultsNode = null;        this.footerNode = null;        this.rcmNewChangesMarker = null;        this.rcmNoNewChangesMarker = null; this.hideusers = null; this.onlyshowusers = null; this.rcData = null; this.newRecentChangesEntries = null; if (this.recentChangesEntries) { for (var i = 0; i < this.recentChangesEntries.length; i++) { this.recentChangesEntries[i].dispose; this.recentChangesEntries[i] = null; }           this.recentChangesEntries = null; }       this.ajaxCallbacks = null; this.erroredWikis = null; this.secondaryWikiData = null; this.lastLoadDateTime = null; };   ;    // Should only be called once per RCMManager. RCMManager.prototype._parseWikiList = function { var _this = this; /***************************       * Data provided to script ***************************/       var tDataset = this.resultCont.dataset; this.rcParamsBase = $.extend({}, Main_1["default"].rcParamsURL, this.parseRCParams(tDataset.params, "&", "=")); this.rcParams = $.extend(this.getDefaultRCParams, this.rcParamsBase); this.autoRefreshEnabledDefault = tDataset.autorefreshEnabled == "true" ? true : false; this.autoRefreshTimeoutNum = (tDataset.autorefresh ? parseInt(tDataset.autorefresh) : 60) * 1000; // {int} number of milliseconds to wait before refreshing. this.autoRefreshEvenOnFocus = tDataset.autorefreshEvenonfocus == "false" ? false : true; this.discussionsEnabled = tDataset.discussionsEnabled !== "false"; // List of users to hide across whole RCMManager this.hideusers = []; // {array} if (tDataset.hideusers) { this.hideusers = tDataset.hideusers.replace(/_/g, " ").split(","); }       // if(this.rcParams.hidemyself) { // 	var tUsername = ConstantsApp.username; // 	if(tUsername) { this.hideusers.push(tUsername); } // }       this.hideusers.forEach(function (o, i, a) { a[i] = Utils_1["default"].ucfirst(a[i].trim); }); this.notificationsHideusers = []; if (tDataset.notificationsHideusers) { this.notificationsHideusers = tDataset.notificationsHideusers.replace(/_/g, " ").split(","); }       this.notificationsHideusers.forEach(function (o, i, a) { a[i] = Utils_1["default"].ucfirst(a[i].trim); }); // Only show these users' edits across whole RCMManager this.onlyshowusers = []; // {array} if (tDataset.onlyshowusers) { this.onlyshowusers = tDataset.onlyshowusers.replace(/_/g, " ").split(","); }       this.onlyshowusers.forEach(function (o, i, a) { a[i] = Utils_1["default"].ucfirst(a[i].trim); }); this.extraLoadingEnabled = tDataset.extraLoadingEnabled == "false" ? false : true; this.makeLinksAjax = tDataset.ajaxlinks == "true" ? true : false; // Wikis for the script to load this.chosenWikis = []; Utils_1["default"].forEach(this.resultCont.querySelectorAll("li"), function (pNode) {           _this.chosenWikis.push(new WikiData_1["default"](_this).initListData(pNode));        }); // Remove duplicates this.chosenWikis = Utils_1["default"].uniq_fast_key(this.chosenWikis, "servername"); tDataset = null; this.resultCont.innerHTML = ""; };   // Adds core elements. Should only be called once per RCMManager. RCMManager.prototype.init = function { this.resultCont.innerHTML = ""; this.resultCont.className += " " + this.modID; this.modID = "." + this.modID; this.rcData = []; this.recentChangesEntries = []; /***************************       * HTML Elements/Nodes ***************************/       this.optionsNode = new RCMOptions_1["default"](this).init(Utils_1["default"].newElement("div", { className: "rcm-options" }, this.resultCont)); this.statusNode = Utils_1["default"].newElement("div", { className: "rcm-status" }, this.resultCont); this.wikisNode = new RCMWikiPanel_1["default"](this).init(Utils_1["default"].newElement("div", { className: "rcm-wikis" }, this.resultCont)); this.resultsNode = Utils_1["default"].newElement("div", { className: "rcm-results rc-conntent" }, this.resultCont); this.footerNode = Utils_1["default"].newElement("div", { className: "rcm-footer" }, this.resultCont); /***************************       * Setup ***************************/       // Footer never changes, so set here var tEndNewMessageDate = new Date(ConstantsApp_1["default"].lastVersionDateString); tEndNewMessageDate.setDate(tEndNewMessageDate.getDate + 3); var tNewVersion = tEndNewMessageDate > new Date ? '<sup class="rcm-new-version">' + i18n_1["default"]("wikifeatures-promotion-new") + ' ' : ""; this.footerNode.innerHTML = "[RecentChangesMultiple</a>] " + i18n_1["default"]('rcm-footer', "<a href='https://github.com/fewfre/RecentChangesMultiple/blob/master/changelog'>" + ConstantsApp_1["default"].version + "</a>" + tNewVersion, "<img src='http://fewfre.com/images/avatar.jpg?tag=rcm' width='14' height='14' /> <a href='http://fewfre.wikia.com/wiki/Fewfre_Wiki'>Fewfre</a>"); $(this.resultsNode).on("click", ".rcm-favicon-goto-button", this.wikisNode.goToAndOpenInfo); // Now start the app this._startWikiDataLoad; return this; };   ;    /***************************    * Loading ***************************/   RCMManager.prototype._load = function (pWikiData, pUrl, pDataType, pTries, pID, pCallback, pDelayNum) { if (pDelayNum === void 0) { pDelayNum = 0; } ++pTries; // A timeout is used instead of loading 1 at a time to save time, as it allows some loading overlap. // A timeout is needed since Wikia wikis share a "request overload" detector, which can block your account from making more requests for awhile. setTimeout(function {            $.ajax({ type: 'GET', dataType: pDataType, data: {}, timeout: 15000, url: pUrl, success: function (data) { pCallback(data, pWikiData, pTries, pID, null); }, error: function (data, status) { pCallback(null, pWikiData, pTries, pID, status); }, });       }, pDelayNum); };   RCMManager.prototype._retryOrError = function (pWikiData, pTries, pID, pFailStatus, pLoadCallback, pHandleErrorCallback) { mw.log("Error loading " + pWikiData.servername + " (" + pTries + "/" + this.loadingErrorRetryNum + " tries)"); if (pTries < this.loadingErrorRetryNum) { pLoadCallback(pWikiData, pTries, pID, 0); }       else { if (this.erroredWikis.length === 0) { var tMessage = pFailStatus == null ? "rcm-error-loading-syntaxhang" : "rcm-error-loading-connection"; pHandleErrorCallback(pWikiData, pTries, pID, tMessage, RCMManager.LOADING_ERROR_RETRY_NUM_INC); }           else { this.erroredWikis.push({ wikiInfo: pWikiData, tries: pTries, id: pID }); this.statusNode.querySelector(".errored-wiki").innerHTML += ", " + pWikiData.servername; }       }    };    // After a wiki is loaded, check if ALL wikis are loaded // If so add results; if not, load the next wiki, or wait for next wiki to return data. RCMManager.prototype._onParsingFinished = function (pCallback) { var _this = this; this.wikisLeftToLoad--; document.querySelector(this.modID + " .rcm-load-perc").innerHTML = this.calcLoadPercent + "%"; //.toFixed(3) + "%"; if (this.wikisLeftToLoad > 0) { if (this.ajaxCallbacks.length > 0) { this.ajaxCallbacks.shift; // Parse next wiki in queue (if there is one), or wait for next wiki. if (this.ajaxCallbacks.length > 0) { setTimeout(function { _this.ajaxCallbacks[0]; }, 0); }           }        }        else { pCallback; }   };    /***************************    * Setup WikiData classes - Various wiki data needs to be loaded before the script can properly run. * These should only be called at the begining of the script; once data is retrieved, does not need to be loaded again. ***************************/   RCMManager.prototype._startWikiDataLoad = function  { var _this = this; this.erroredWikis = []; this.ajaxCallbacks = []; this.ajaxID++; this.loadingErrorRetryNum = RCMManager.LOADING_ERROR_RETRY_NUM_INC; if (this.chosenWikis.length > 0) { Utils_1["default"].forEach(this.chosenWikis, function (tWikiData, i) {               _this._loadWikiData(tWikiData, 0, _this.ajaxID, (i + 1) * ConstantsApp_1["default"].loadDelay);            }); this.totalItemsToLoad = this.chosenWikis.length; this.wikisLeftToLoad = this.totalItemsToLoad; this.statusNode.innerHTML = ConstantsApp_1["default"].getLoader + " " + i18n_1["default"]('app-loading') + " ( 0% )"; }       else { // If the RCM has no wikis listed, there is nothing to run, and the user should be informed. Utils_1["default"].removeElement(this.statusNode); Utils_1["default"].removeElement(this.wikisNode.root); this.resultsNode.innerHTML = " " + i18n_1["default"]("wikiacuratedcontent-content-empty-section") + " "; }   };    RCMManager.prototype._loadWikiData = function (pWikiData, pTries, pID, pDelayNum) { if (pDelayNum === void 0) { pDelayNum = 0; } this._load(pWikiData, pWikiData.getWikiDataApiUrl, 'jsonp', pTries, pID, this._onWikiDataLoaded.bind(this), pDelayNum); };   RCMManager.prototype._onWikiDataLoaded = function (pData, pWikiData, pTries, pID, pFailStatus) { // Make sure this isn't something loaded before the script was last refreshed. if (pID != this.ajaxID) { return; }       // Make sure results are valid if (!!pData && pData.error && pData.query == null) { console.error(pData, pData.error, pData.query == null); this.statusNode.innerHTML = " ERROR: " + pWikiData.servername + " " + JSON.stringify(pData.error) + " "; throw "Wiki returned error"; }       else if (pFailStatus == "timeout") { this._handleWikiDataLoadError(pWikiData, pTries, pID, "rcm-error-loading-syntaxhang", 1); return; }       else if (pData == null || pData.query == null || pData.query.general == null) { // mw.log("Error loading "+pWikiData.servername+" ("+pTries+"/"+this.loadingErrorRetryNum+" tries)"); // //mw.log(pData); // if(pTries < this.loadingErrorRetryNum) { // 	this._loadWikiData(pWikiData, pTries, pID, 0); // } else { // 	if(this.erroredWikis.length === 0) { // 		var tMessage = pFailStatus==null ? "rcm-error-loading-syntaxhang" : "rcm-error-loading-connection"; // 		this._handleWikiDataLoadError(pWikiData, pTries, pID, tMessage, RCMManager.LOADING_ERROR_RETRY_NUM_INC); // 	} else { // 		this.erroredWikis.push({wikiInfo:pWikiData, tries:pTries, id:pID}); // 		this.statusNode.querySelector(".errored-wiki").innerHTML += ", "+pWikiData.servername; // 	}           // }            this._retryOrError(pWikiData, pTries, pID, pFailStatus, this._loadWikiData.bind(this), this._handleWikiDataLoadError.bind(this)); return; }       if (pData && pData.warning) { mw.log("WARNING: ", pData.warning); }       // Store wiki-data retrieved that's needed before wiki parsing pWikiData.initAfterLoad(pData.query); this._onWikiDataParsingFinished(pWikiData); };   RCMManager.prototype._handleWikiDataLoadError = function (pWikiData, pTries, pID, pErrorMessage, pInc) { var _this = this; this.statusNode.innerHTML = " " + i18n_1["default"](pErrorMessage, " " + pWikiData.servername + " ", pTries) + " "; var tHandler = function (pEvent) { _this.loadingErrorRetryNum += pInc; if (pEvent) { pEvent.target.removeEventListener("click", tHandler); }           tHandler = null; _this.erroredWikis.forEach(function (obj) {               // mw.log(obj);                _this._loadWikiData(obj.wikiInfo, obj.tries, obj.id);            }); _this.erroredWikis = []; _this.statusNode.innerHTML = ConstantsApp_1["default"].getLoader + " " + i18n_1["default"]('rcm-loading') + " ( " + _this.calcLoadPercent + "% )"; };       Utils_1["default"].newElement("button", { innerHTML: i18n_1["default"]("rcm-error-trymoretimes", pInc) }, this.statusNode).addEventListener("click", tHandler); var tHandlerRemove = function (pEvent) { if (pEvent) { pEvent.target.removeEventListener("click", tHandlerRemove); }           tHandlerRemove = null; _this.chosenWikis.splice(_this.chosenWikis.indexOf(pWikiData), 1); _this.statusNode.innerHTML = ConstantsApp_1["default"].getLoader + " " + i18n_1["default"]('rcm-loading') + " ( " + _this.calcLoadPercent + "% )"; _this._onWikiDataParsingFinished(null); };       Utils_1["default"].addTextTo(" ", this.statusNode); Utils_1["default"].newElement("button", { innerHTML: i18n_1["default"]("wikia-hubs-remove") }, this.statusNode).addEventListener("click", tHandlerRemove); this.erroredWikis.push({ wikiInfo: pWikiData, tries: pTries, id: pID }); };   RCMManager.prototype._onWikiDataParsingFinished = function (pWikiData) { var _this = this; this._onParsingFinished(function { _this._onAllWikiDataParsed; }); };   // Should only be called once. RCMManager.prototype._onAllWikiDataParsed = function { this.flagWikiDataIsLoaded = true; // Add some run-time CSS classes var tCSS = ""; this.chosenWikis.forEach(function (wikiInfo) {           // bgcolor should be used if specified, otherwise tile favicon as background. But not both.            tCSS += ("\n." + wikiInfo.rcClass + " .rcm-tiled-favicon {")               + (wikiInfo.bgcolor != null ? "background: " + wikiInfo.bgcolor + ";" : "background-image: url(" + wikiInfo.favicon + ");")               + " }";        }); mw.util.addCSS(tCSS); this._start(true); };   /***************************    * Discussion Loading ***************************/   RCMManager.prototype._startDiscussionLoading = function (pID) { var _this = this; if (!this.discussionsEnabled) { return; }       this.ajaxCallbacks = []; this.loadingErrorRetryNum = RCMManager.LOADING_ERROR_RETRY_NUM_INC; this.totalItemsToLoad = 0; Utils_1["default"].forEach(this.chosenWikis, function (tWikiData, i) {           if (tWikiData.usesWikiaDiscussions !== false) {                _this.totalItemsToLoad++;                _this._loadWikiaDiscussions(tWikiData, 0, pID, _this.totalItemsToLoad * ConstantsApp_1["default"].loadDelay);            }        }); // If no discussions are being loaded, skip it and tell manager to not even bother in the future. if (this.totalItemsToLoad <= 0) { this.discussionsEnabled = false; this.rcmChunkStart; return; }       this.wikisLeftToLoad = this.totalItemsToLoad; this.statusNode.innerHTML = ConstantsApp_1["default"].getLoader + " " + i18n_1["default"]('embeddable-discussions-loading') + " ( 0% )"; };   RCMManager.prototype._loadWikiaDiscussions = function (pWikiData, pTries, pID, pDelayNum) { if (pDelayNum === void 0) { pDelayNum = 0; } this._load(pWikiData, pWikiData.getWikiDiscussionUrl, 'json', pTries, pID, this._onWikiDiscussionLoaded.bind(this), pDelayNum); };   RCMManager.prototype._onWikiDiscussionLoaded = function (pData, pWikiData, pTries, pID, pFailStatus) { var _this = this; // Make sure this isn't something loaded before the script was last refreshed. if (pID != this.ajaxID) { return; }       if (pFailStatus == null && pData && pData["_embedded"] && pData["_embedded"]["doc:posts"]) { pWikiData.usesWikiaDiscussions = true; this.ajaxCallbacks.push(function {                _this._parseWikiDiscussions(pData["_embedded"]["doc:posts"], pWikiData);            }); if (this.ajaxCallbacks.length === 1) { this.ajaxCallbacks[0]; }       }        else { if (pWikiData.usesWikiaDiscussions === true) { mw.log("Error loading " + pWikiData.servername + " (" + pTries + "/" + this.loadingErrorRetryNum + " tries)"); //mw.log(pData); if (pTries < this.loadingErrorRetryNum && pFailStatus == "timeout") { this._loadWikiaDiscussions(pWikiData, pTries, pID, 0); }               else { // Don't do any fancy error catching. just fail. this._onDiscussionParsingFinished(pWikiData); }               return; }           else { if (pFailStatus != "timeout") { mw.log("[RCMManager](loadWikiDiscussions) " + pWikiData.servername + " has no discussions."); pWikiData.usesWikiaDiscussions = false; }               this._onDiscussionParsingFinished(pWikiData); }       }    };    RCMManager.prototype._parseWikiDiscussions = function (pData, pWikiData) { var _this = this; // Check if wiki doesn't have any recent changes if (pData.length <= 0) { this._onDiscussionParsingFinished(pWikiData); return; }       // A sort is needed since they are sorted by creation, not last edit. pData.sort(function (a, b) {           return (a.modificationDate || a.creationDate).epochSecond < (b.modificationDate || b.creationDate).epochSecond ? 1 : -1;        }); pWikiData.updateLastDiscussionDate(Utils_1["default"].getFirstItemFromObject(pData)); var tNewRC, tDate, tChangeAdded; // Add each entry from the wiki to the list in a sorted order pData.forEach(function (pRCData) {           var tUser = pRCData.createdBy.name;            // Skip if user is hidden for whole script or specific wiki            if (tUser && _this.hideusers.indexOf(tUser) > -1 || (pWikiData.hideusers && pWikiData.hideusers.indexOf(tUser) > -1)) {                return;            }            // Skip if user is NOT a specified user to show for whole script or specific wiki            if (tUser && (_this.onlyshowusers.length != 0 && _this.onlyshowusers.indexOf(tUser) == -1)) {                return;            }            if (tUser && (pWikiData.onlyshowusers != undefined && pWikiData.onlyshowusers.indexOf(tUser) == -1)) {                return;            }            // If hideself set            if (pWikiData.rcParams.hidemyself && ConstantsApp_1["default"].username == tUser) {                return;            }            // Skip if goes past the RC "changes in last _ days" value. if ((pRCData.modificationDate || pRCData.creationDate).epochSecond < Math.round(pWikiData.getEndDate.getTime / 1000)) { return; }           _this.itemsToAddTotal++; tNewRC = new RCMWikiaDiscussionData_1["default"](pWikiData, _this); tNewRC.init(pRCData); _this._addRCDataToList(tNewRC); pWikiData.discussionsCount++; // tChangeAdded = false; // this.recentChangesEntries.every((pRCList:RCList, i:number) => {           // 	if(tNewRC.date > pRCList.date) {            // 		this.recentChangesEntries.splice(i, 0, new RCList(this).addRC(tNewRC));            // 		tChangeAdded = true;            // 		return false;            // 	} else {            // 		if(this.rcParams.hideenhanced == false && pRCList.shouldGroupWith(tNewRC)) {            // 			pRCList.addRC(tNewRC);            // 			tChangeAdded = true;            // 			return false;            // 		}            // 	}            // 	return true;            // }); // if(!tChangeAdded || this.recentChangesEntries.length == 0) { this.recentChangesEntries.push( new RCList(this).addRC(tNewRC) ); } });       mw.log("Discussions:", pWikiData.servername, pData);        this._onDiscussionParsingFinished(pWikiData);    };    RCMManager.prototype._onDiscussionParsingFinished = function (pWikiData) {        var _this = this;        this._onParsingFinished(function  { _this.rcmChunkStart; });    };    /***************************    * Main RecentChanges loading methods    ***************************/    RCMManager.prototype._start = function (pUpdateParams) {        var _this = this;        if (pUpdateParams === void 0) { pUpdateParams = false; }        clearTimeout(this.autoRefreshTimeoutID);        this.wikisNode.populate;        this.newRecentChangesEntries = [];        this.ajaxCallbacks = [];        this.erroredWikis = [];        this.secondaryWikiData = [];        this.ajaxID++;        this.loadingErrorRetryNum = RCMManager.LOADING_ERROR_RETRY_NUM_INC;        this.itemsAdded = this.itemsToAddTotal = 0; this.chosenWikis.forEach(function (tWikiData, i) {           if (pUpdateParams) {                tWikiData.setupRcParams;            } // Encase it was changed via RCMOptions            _this._loadWiki(tWikiData, 0, _this.ajaxID, (i + 1) * ConstantsApp_1["default"].loadDelay);        }); this.totalItemsToLoad = this.chosenWikis.length; this.wikisLeftToLoad = this.totalItemsToLoad; this.statusNode.innerHTML = ConstantsApp_1["default"].getLoader + " " + i18n_1["default"]('rcm-loading') + " ( 0% )"; };   // Refresh and add new changes to top RCMManager.prototype.refresh = function (pUpdateParams) { if (pUpdateParams === void 0) { pUpdateParams = false; } if (this.chosenWikis.length == 0 || !this.flagWikiDataIsLoaded) { return; }       this.isHardRefresh = false; this.statusNode.innerHTML = ""; // this.resultsNode.innerHTML = ""; this.wikisNode.clear; // Remove except if auto refresh is on, window doesn't have focus, and the window wasn't clicked and then lost focus again (by checking lastLoadDateTime) if (this.rcmNewChangesMarker && (!this.isAutoRefreshEnabled || (document.hasFocus || this.lastLoadDateTime >= this.recentChangesEntries[0].date))) { Utils_1["default"].removeElement(this.rcmNewChangesMarker); this.rcmNewChangesMarker = null; }       if (this.rcmNoNewChangesMarker) { Utils_1["default"].removeElement(this.rcmNoNewChangesMarker); this.rcmNoNewChangesMarker = null; }       // if(this.recentChangesEntries != null) { // 	for (var i = 0; i < this.recentChangesEntries.length; i++) { // 		this.recentChangesEntries[i].dispose; // 		this.recentChangesEntries[i] = null; // 	}       // 	this.recentChangesEntries = null; // }       this.ajaxCallbacks = null; this.secondaryWikiData = null; RCMModal_1["default"].closeModal; this._start(pUpdateParams); };   // Refresh and fetch all data again. RCMManager.prototype.hardRefresh = function (pUpdateParams) { if (pUpdateParams === void 0) { pUpdateParams = false; } if (this.chosenWikis.length == 0 || !this.flagWikiDataIsLoaded) { return; }       this.isHardRefresh = true; this.statusNode.innerHTML = ""; this.resultsNode.innerHTML = ""; this.rcmNewChangesMarker = null; this.rcmNoNewChangesMarker = null; this.wikisNode.clear; this.chosenWikis.forEach(function (tWikiData) {           tWikiData.lastChangeDate = tWikiData.getEndDate;            tWikiData.lastDiscussionDate = tWikiData.getEndDate;            tWikiData.resultsCount = 0;            tWikiData.discussionsCount = 0;        }); // if(this.rcData != null) { // 	for (var i = 0; i < this.rcData.length; i++) { // 		this.rcData[i].list.dispose; // 		this.rcData[i] = null; // 	}       // 	this.rcData = null; // }       this.rcData = []; if (this.recentChangesEntries != null) { for (var i = 0; i < this.recentChangesEntries.length; i++) { this.recentChangesEntries[i].dispose; this.recentChangesEntries[i] = null; }           this.recentChangesEntries = null; }       this.recentChangesEntries = []; this.ajaxCallbacks = null; this.secondaryWikiData = null; RCMModal_1["default"].closeModal; this._start(pUpdateParams); };   // Separate method so that it can be reused if the loading failed RCMManager.prototype._loadWiki = function (pWikiData, pTries, pID, pDelayNum) { if (pDelayNum === void 0) { pDelayNum = 0; } this._load(pWikiData, pWikiData.getApiUrl, 'jsonp', pTries, pID, this._onWikiLoaded.bind(this), pDelayNum); };   /* Called after a wiki is loaded; will add it to queue, and run it if no other callbacks running. */   RCMManager.prototype._onWikiLoaded = function (pData, pWikiData, pTries, pID, pFailStatus) { var _this = this; // Make sure this isn't something loaded before the script was last refreshed. if (pID != this.ajaxID) { return; }       // Make sure results are valid if (!!pData && pData.error && pData.query == null) { this.statusNode.innerHTML = " ERROR: " + pWikiData.servername + " " + JSON.stringify(pData.error) + " "; this.addRefreshButtonTo(this.statusNode); throw "Wiki returned error"; }       else if (pFailStatus == "timeout") { this._handleWikiLoadError(pWikiData, pTries, pID, "rcm-error-loading-syntaxhang", 1); return; }       else if (pData == null || pData.query == null || pData.query.recentchanges == null) { this._retryOrError(pWikiData, pTries, pID, pFailStatus, this._loadWiki.bind(this), this._handleWikiLoadError.bind(this)); return; }       if (pData && pData.warning) { mw.log("WARNING: ", pData.warning); }       // Store wiki-data retrieved that's needed before wiki parsing // pWikiData.initAfterLoad(pData.query); this.ajaxCallbacks.push(function {            _this._parseWiki(pData.query.recentchanges, pData.query.logevents, pWikiData);        }); // Directly call next callback if this is the only one in it. Otherwise let script handle it. if (this.ajaxCallbacks.length === 1) { this.ajaxCallbacks[0]; }   };    RCMManager.prototype._handleWikiLoadError = function (pWikiData, pTries, pID, pErrorMessage, pInc) { var _this = this; clearTimeout(this.loadErrorTimeoutID); this.loadErrorTimeoutID = null; this.statusNode.innerHTML = " " + i18n_1["default"](pErrorMessage, " " + pWikiData.servername + " ", pTries) + " "; this.addRefreshButtonTo(this.statusNode); var tHandler = function (pEvent) { clearTimeout(_this.loadErrorTimeoutID); _this.loadErrorTimeoutID = null; _this.loadingErrorRetryNum += pInc; if (pEvent) { pEvent.target.removeEventListener("click", tHandler); }           tHandler = null; _this.erroredWikis.forEach(function (obj) {               // mw.log(obj);                _this._loadWiki(obj.wikiInfo, obj.tries, obj.id);            }); _this.erroredWikis = []; _this.statusNode.innerHTML = ConstantsApp_1["default"].getLoader + " " + i18n_1["default"]('rcm-loading') + " ( " + _this.calcLoadPercent + "% )"; };       Utils_1["default"].newElement("button", { innerHTML: i18n_1["default"]("rcm-error-trymoretimes", pInc) }, this.statusNode).addEventListener("click", tHandler); this.erroredWikis.push({ wikiInfo: pWikiData, tries: pTries, id: pID }); if (this.isAutoRefreshEnabled) { this.loadErrorTimeoutID = window.setTimeout(function { if (tHandler) {                tHandler(null);            } }, 20000); }   };    /* Check wiki data one at a time, either as it's returned, or after the current data is done being processed. */   RCMManager.prototype._parseWiki = function (pData, pLogData, pWikiData) { var _this = this; // Check if wiki doesn't have any recent changes if (pData.length <= 0) { this._onWikiParsingFinished(pWikiData); return; }       mw.log(pWikiData.servername, pData); pWikiData.updateLastChangeDate(Utils_1["default"].getFirstItemFromObject(pData)); var tNewRC, tDate, tChangeAdded; // Add each entry from the wiki to the list in a sorted order pData.forEach(function (pRCData) {           // Skip if user is hidden for whole script or specific wiki            if (pRCData.user && _this.hideusers.indexOf(pRCData.user) > -1 || (pWikiData.hideusers && pWikiData.hideusers.indexOf(pRCData.user) > -1)) {                return;            }            // Skip if user is NOT a specified user to show for whole script or specific wiki            if (pRCData.user && (_this.onlyshowusers.length != 0 && _this.onlyshowusers.indexOf(pRCData.user) == -1)) {                return;            }            if (pRCData.user && (pWikiData.onlyshowusers != undefined && pWikiData.onlyshowusers.indexOf(pRCData.user) == -1)) {                return;            }            _this.itemsToAddTotal++;            tNewRC = new RCData_1["default"](pWikiData, _this).init(pRCData, pLogData);            _this._addRCDataToList(tNewRC);            pWikiData.resultsCount++; // tChangeAdded = false; // this.recentChangesEntries.every((pRCList:RCList, i:number) => {           // 	if(tNewRC.date > pRCList.date) {            // 		this.recentChangesEntries.splice(i, 0, new RCList(this).addRC(tNewRC));            // 		tChangeAdded = true;            // 		return false;            // 	} else {            // 		if(this.rcParams.hideenhanced == false && pRCList.shouldGroupWith(tNewRC)) {            // 			pRCList.addRC(tNewRC);            // 			tChangeAdded = true;            // 			return false;            // 		}            // 	}            // 	return true;            // }); // if(!tChangeAdded || this.recentChangesEntries.length == 0) { // 	this.recentChangesEntries.push( new RCList(this).addRC(tNewRC) ); // }       });        this._onWikiParsingFinished(pWikiData);    };    ;    // TODO: Make it more efficient if using hideenhanced by ignoring some calls.    RCMManager.prototype._addRCDataToList = function (pNewRC) {        var _this = this;        var tNewRcCombo = { data: pNewRC, list: null };        this.rcData.push(tNewRcCombo); // Just push it in, we'll sort it in rcmChunkStart use array.sort (less intensive than doing it manually).        var tResultsIsEmpty = this.resultsNode.innerHTML == "", tNewList, tNoChangeAdded;        if (this.rcParams.hideenhanced) {            tNoChangeAdded = true; // No reason to do fancy stuff, we'll just call array.sort in rcmChunkStart        }        else if (tResultsIsEmpty) {            tNoChangeAdded = this.recentChangesEntries.every(function (pRCList, i) { // No reason to check further for groupings than anything older than self (would be end of the list anyways, if not for other wiki entries) if (pNewRC.date > pRCList.date) { _this.recentChangesEntries.splice(i, 0, tNewList = new RCList_1["default"](_this).addRC(pNewRC)); return false; }               else if (pRCList.shouldGroupWith(pNewRC)) { tNewList = pRCList.addRC(pNewRC); return false; }               return true; });       }        else {            var tIndexToAddAt_1 = -1, tNewTimeStamp_1 = Utils_1["default"].formatWikiTimeStamp(pNewRC.date, false);            tNoChangeAdded = this.recentChangesEntries.every(function (pRCList, i) { // No reason to check further for groupings than anything older than self (would be end of the list anyways, if not for other wiki entries) // If results in not empty, then we do want to keep checking (by setting tIndexToAddAt) since previous groupings have already been made. if (tIndexToAddAt_1 == -1 && pNewRC.date > pRCList.date) { // if(tResultsIsEmpty) { // 	this.recentChangesEntries.splice(i, 0, tNewList = new RCList(this).addRC(pNewRC)); // 	return false; // } else { tIndexToAddAt_1 = i;                   // Encase the grouping is the first thing on the list if (pRCList.shouldGroupWith(pNewRC)) { tNewList = pRCList.addRC(pNewRC); // this.recentChangesEntries.splice(i, 1); // i is higher than tIndexToAddAt, so removing it won't mess up order. // this.recentChangesEntries.splice(tIndexToAddAt, 0, pRCList); return false; }               }                else { if (pRCList.shouldGroupWith(pNewRC)) { tNewList = pRCList.addRC(pNewRC); if (tIndexToAddAt_1 > -1) { _this.recentChangesEntries.splice(i, 1); // i is higher than tIndexToAddAt, so removing it won't mess up order. _this.recentChangesEntries.splice(tIndexToAddAt_1, 0, pRCList); }                       return false; }                   else if (tIndexToAddAt_1 > -1 && tNewTimeStamp_1 != Utils_1["default"].formatWikiTimeStamp(pRCList.date, false)) { _this.recentChangesEntries.splice(tIndexToAddAt_1, 0, tNewList = new RCList_1["default"](_this).addRC(pNewRC)); return false; }               }                return true; });       }        if (tNoChangeAdded) {            this.recentChangesEntries.push(tNewList = new RCList_1["default"](this).addRC(pNewRC));        }        tNewRcCombo.list = tNewList;    };    // /* Check wiki data one at a time, either as it's returned, or after the current data is done being processed. */    // private _parseWikiOld(pData, pLogData, pWikiData:WikiData) : void {    // 	// Check if wiki doesn't have any recent changes    // 	if(pData.length <= 0) {    // 		this._onWikiParsingFinished(pWikiData);    // 		return;    // 	}    //    // 	mw.log(pWikiData.servername, pData);    //    // 	var tNewRC, tDate, tChangeAdded;    // 	// Add each entry from the wiki to the list in a sorted order    // 	pData.forEach((pRCData) => { // 		// Skip if user is hidden for whole script or specific wiki // 		if(pRCData.user && this.hideusers.indexOf(pRCData.user) > -1 || (pWikiData.hideusers && pWikiData.hideusers.indexOf(pRCData.user) > -1)) { return; } // 		// Skip if user is NOT a specified user to show for whole script or specific wiki // 		if(pRCData.user && (this.onlyshowusers.length != 0 && this.onlyshowusers.indexOf(pRCData.user) == -1)) { return; } // 		if(pRCData.user && (pWikiData.onlyshowusers != undefined && pWikiData.onlyshowusers.indexOf(pRCData.user) == -1)) { return; } //   // 		this.itemsToAddTotal++; // 		tNewRC = new RCData( pWikiData, this ).init(pRCData, pLogData); // 		tChangeAdded = false; // 		this.recentChangesEntries.every((pRCList:RCList, i:number) => {   // 			if(tNewRC.date > pRCList.date) {    // 				this.recentChangesEntries.splice(i, 0, new RCList(this).addRC(tNewRC));    // 				tChangeAdded = true;    // 				return false;    // 			} else {    // 				if(this.rcParams.hideenhanced == false && pRCList.shouldGroupWith(tNewRC)) {    // 					pRCList.addRC(tNewRC);    // 					tChangeAdded = true;    // 					return false;    // 				}    // 			}    // 			return true;    // 		}); // 		if(!tChangeAdded || this.recentChangesEntries.length == 0) { this.recentChangesEntries.push( new RCList(this).addRC(tNewRC) ); } // 	});   //    // 	this._onWikiParsingFinished(pWikiData);    // };    // After a wiki is loaded, check if ALL wikis are loaded; if so add results; if not, load the next wiki, or wait for next wiki to return data.    RCMManager.prototype._onWikiParsingFinished = function (pWikiData) {        var _this = this;        this.wikisNode.addWiki(pWikiData);        this._onParsingFinished(function  { _this._onAllWikisParsed; });    };    RCMManager.prototype._onAllWikisParsed = function  {        if (this.discussionsEnabled) {            this._startDiscussionLoading(this.ajaxID);        }        else {            this.rcmChunkStart;        }    };    /***************************    * Display Results    ***************************/    // All wikis are loaded    RCMManager.prototype.rcmChunkStart = function  {        var _this = this;        var tDate = new Date;        this.statusNode.innerHTML = i18n_1["default"]('rcm-download-timestamp', "<tt>" + Utils_1["default"].pad(Utils_1["default"].getHours(tDate), 2) + ":" + Utils_1["default"].pad(Utils_1["default"].getMinutes(tDate), 2) + "</tt>"); this.statusNode.innerHTML += " " + i18n_1["default"]('rcm-download-changesadded', " 0 / " + this.itemsToAddTotal) + " "; // Using array sort after as it's more efficient than doing it manually. this.rcData.sort(function (a, b) { return b.data.date.valueOf - a.data.date.valueOf; }); if (this.rcParams.hideenhanced) { this.recentChangesEntries.sort(function (a, b) { return b.date.valueOf - a.date.valueOf; }); }       this.removeOldResults(tDate); // New changes to add to page this.newRecentChangesEntries = []; var tResultsIsEmpty = this.resultsNode.innerHTML == ""; this.recentChangesEntries.every(function (pRCList, i) {           if (pRCList.date > _this.lastLoadDateTimeActual || tResultsIsEmpty) {                _this.newRecentChangesEntries.push(pRCList);                return true;            }            return false;        }); // Remove except if auto refresh is on, window doesn't have focus, and the window wasn't clicked and then lost focus again (by checking lastLoadDateTime) // if(this.rcmNewChangesMarker && (!this.isAutoRefreshEnabled || (document.hasFocus || this.recentChangesEntries[0].date < this.lastLoadDateTime))) { // 	Utils.removeElement(this.rcmNewChangesMarker); // 	this.rcmNewChangesMarker = null; // }       // Remove this before laoding starts. // if(this.rcmNoNewChangesMarker) { Utils.removeElement(this.rcmNoNewChangesMarker); this.rcmNoNewChangesMarker = null; } if (this.recentChangesEntries.length == 0 || (this.lastLoadDateTime != null && this.recentChangesEntries[0].date <= this.lastLoadDateTime)) { if (!this.rcmNewChangesMarker) this.rcmNoNewChangesMarker = this.resultsNode.insertBefore(Utils_1["default"].newElement("div", { className: "rcm-noNewChanges", innerHTML: " " + i18n_1["default"]('rcm-nonewchanges') + " " }), this.resultsNode.firstChild); }       else { if (!this.rcmNewChangesMarker && this.newRecentChangesEntries.length > 0 && this.lastLoadDateTime != null && this.resultsNode.innerHTML != "") { var tRcSection = this.resultsNode.querySelector("div, ul"); this.rcmNewChangesMarker = tRcSection.insertBefore(Utils_1["default"].newElement("div", { className: "rcm-previouslyLoaded", innerHTML: " " + i18n_1["default"]('rcm-previouslyloaded') + " " }), tRcSection.firstChild); tRcSection = null; }           if (this.lastLoadDateTimeActual != null && this.isAutoRefreshEnabled && !document.hasFocus) { if (this.recentChangesEntries[0].date > this.lastLoadDateTimeActual) { this.notifyUserOfChange; }           }        }        this.rcmChunk(0, 99, 99, null, this.ajaxID); };   // // All wikis are loaded // rcmChunkStartOld : void { // 	let tDate:Date = new Date; // 	this.statusNode.innerHTML = i18n('rcm-download-timestamp', "<tt>"+Utils.pad(Utils.getHours(tDate),2)+":"+Utils.pad(Utils.getMinutes(tDate),2)+"</tt>"); // 	this.statusNode.innerHTML += " "+i18n('rcm-download-changesadded', " 0 / "+this.itemsToAddTotal)+" " // 	this.resultsNode.innerHTML = ""; //   // 	// mw.log(this.recentChangesEntries); // 	if(this.recentChangesEntries.length == 0 || (this.lastLoadDateTime != null && this.recentChangesEntries[0].date <= this.lastLoadDateTime)) { // 		Utils.newElement("div", { className:"rcm-noNewChanges", innerHTML:" "+i18n('rcm-nonewchanges')+" " }, this.resultsNode); // 	}   // 	else if(this.lastLoadDateTimeActual != null && this.isAutoRefreshEnabled && !document.hasFocus) { // 		if(this.recentChangesEntries[0].date > this.lastLoadDateTimeActual) { // 			this.notifyUserOfChange; // 		}   // 	}    // 	this.rcmChunk(0, 99, 99, null, this.ajaxID); // }   // Remove old items past "limit" and "days" // All need to be looped through since grouped changes can cause older results to be at the top. RCMManager.prototype.removeOldResults = function (pDate) { var _this = this; if (this.resultsNode.innerHTML == "") { return; }       var tWikisToCheck = this.chosenWikis.slice(0); var tRcCombo, tDirtyLists = [], tWikiI; // Remove all old RCDatas, and mark changed lists as "dirty" for (var i = this.rcData.length - 1; i >= 0; i--) { tRcCombo = this.rcData[i]; if ((tWikiI = tWikisToCheck.indexOf(tRcCombo.data.wikiInfo)) == -1) { continue; }           // First remove items past "days" (needs to be done first since it can change number allowed by "limit") if (tRcCombo.data.shouldBeRemoved(pDate)) { if (tRcCombo.data.type != RC_TYPE_1["default"].DISCUSSION) { tRcCombo.data.wikiInfo.resultsCount--; }               else { tRcCombo.data.wikiInfo.discussionsCount--; }               // if(this.rcData[i].data != tRcCombo.list.list[tRcCombo.list.list.length-1]) { // 	mw.log("MISMATCH:", tRcCombo.list.list.indexOf(tRcCombo.data), tRcCombo.list.list.length-1, this.rcData[i].data.wikiInfo, this.rcData[i], tRcCombo.list.list[tRcCombo.list.list.length-1], tRcCombo.list.list); // }               this.rcData[i] = null; this.rcData.splice(i, 1); tRcCombo.list.removeRC(tRcCombo.data); //tRcCombo.list.list.pop.dispose; // The last item in a list -should- always be the one we care about // Mark changed lists as dirty. Edit / remove them after encase multiple datas were removed. if (this.rcParams.hideenhanced || tDirtyLists.indexOf(tRcCombo.list) == -1) { tDirtyLists.push(tRcCombo.list); }               tRcCombo.data == null; tRcCombo.list = null; }           else if (tRcCombo.data.wikiInfo.resultsCount <= tRcCombo.data.wikiInfo.rcParams.limit && tRcCombo.data.wikiInfo.discussionsCount <= Math.min(tRcCombo.data.wikiInfo.rcParams.limit, 50)) { // Stop checking a specific wiki, and if all have been checked exit (for efficency when dealing with high numbers of results). tWikisToCheck.splice(tWikiI, 1); if (tWikisToCheck.length == 0) { break; }           }        }        tRcCombo = null; tWikisToCheck = null; // Now remove or update dirty lists. var tNewRCList, tOldNode, tListI; tDirtyLists.forEach(function (pRCList) {           tListI = _this.recentChangesEntries.indexOf(pRCList);            if (tListI > -1) {                if (pRCList.list.length <= 0) {                    if (pRCList.htmlNode) {                        Utils_1["default"].removeElement(pRCList.htmlNode);                    }                    _this.recentChangesEntries[tListI].dispose;                    _this.recentChangesEntries[tListI] = null;                    _this.recentChangesEntries.splice(tListI, 1);                }                else {                    if (pRCList.htmlNode) {                        tOldNode = pRCList.htmlNode;                        Utils_1["default"].insertAfter(pRCList.toHTML(tListI), tOldNode);                        Utils_1["default"].removeElement(tOldNode);                    }                }            }            else {                console.warn("[RCMManager](removeOldResults) Failed to remove old list."); }       });        tNewRCList = null;        tOldNode = null;        tDirtyLists = null;        // If there are any blank rc sections left over from removed items, remove them.        Utils_1["default"].forEach(this.resultsNode.querySelectorAll(".rcm-rc-cont"), function (o) { if (o.innerHTML == "") { Utils_1["default"].removeElement(o.previousSibling); Utils_1["default"].removeElement(o); }       });        // // First remove items past "days" (needs to be done first since it can change number allowed by "limit")        // let tRCList:RCList, tNewRCList:RCList, tOldNode:HTMLElement, tDirty:boolean;        // for(let i = this.recentChangesEntries.length-1; i >= 0; i--) { tRCList = this.recentChangesEntries[i];        // 	tDirty = false;        // 	// Loop through all in list encase more than one is to old.        // 	do {        // 		if(tRCList.type != RC_TYPE.DISCUSSION) {        // 			tDirty = true;        // 			tRCList.wikiInfo.resultsCount--;        // 			tRCList.list.pop.dispose;        // 		} else {        // 			tRCList.wikiInfo.discussionsCount--;        // 			// TODO: Discussions        // 			break;        // 		}        // 	} while(tRCList.list.length > 0 && tRCList.oldest.shouldBeRemoved(pDate));        // 	if(tDirty) {        // 		if(tRCList.list.length <= 0) { // 			if(tRCList.htmlNode) { Utils.removeElement(tRCList.htmlNode); } // 			this.recentChangesEntries[i].dispose; // 			this.recentChangesEntries[i] = null; // 			this.recentChangesEntries.splice(i, 1); // 		} else { // 			if(tRCList.htmlNode) { // 				tOldNode = tRCList.htmlNode; // 				Utils.insertAfter(tRCList.toHTML(i), tOldNode); // 				Utils.removeElement(tOldNode); // 			}       // 		}        // 	}        // }        // tRCList = null; tNewRCList = null; tOldNode = null; };   RCMManager.prototype.notifyUserOfChange = function  { var tMostRecentEntry = this.recentChangesEntries[0].newest; // Skip if user is hidden for whole script or specific wiki var tDontNotify = this.notificationsHideusers.indexOf(tMostRecentEntry.author) > -1 || (tMostRecentEntry.wikiInfo.notificationsHideusers && tMostRecentEntry.wikiInfo.notificationsHideusers.indexOf(tMostRecentEntry.author) > -1) || !tMostRecentEntry.wikiInfo.notificationsEnabled; if (!tDontNotify) { // Find number of changes since page last visited. var tNumNewChanges = 0, tNumNewChangesWiki = 0; for (var i = 0; i < this.recentChangesEntries.length; i++) { if (this.recentChangesEntries[i].date > this.lastLoadDateTime) { for (var j = 0; j < this.recentChangesEntries[i].list.length; j++) { if (this.recentChangesEntries[i].list[j].date > this.lastLoadDateTime) { tNumNewChanges++; if (this.recentChangesEntries[i].wikiInfo.servername == tMostRecentEntry.wikiInfo.servername) { tNumNewChangesWiki++; }                       }                        else { break; }                   }                }                else { break; }           }            Main_1["default"].blinkWindowTitle(i18n_1["default"]("wikifeatures-promotion-new") + "! " + i18n_1["default"]("nchanges", tNumNewChanges)); var tEditTitle = tMostRecentEntry.title; if (tMostRecentEntry.type == RC_TYPE_1["default"].LOG) { tEditTitle = tMostRecentEntry.logTitle + (tEditTitle ? " - " + tEditTitle : ""); }           else if (tEditTitle == null) { tEditTitle = this.recentChangesEntries[0].getExistingThreadTitle; tEditTitle = tEditTitle ? i18n_1["default"]('discussions') + " - " + tEditTitle : i18n_1["default"]('discussions'); }           tEditTitle = tEditTitle ? tEditTitle + "\n" : ""; var tEditSummary = !tMostRecentEntry.unparsedComment ? "" : "\n" + i18n_1["default"]("edit-summary") + ": " + tMostRecentEntry.unparsedComment; Main_1["default"].addNotification(i18n_1["default"]("nchanges", tNumNewChanges) + " - " + tMostRecentEntry.wikiInfo.sitename + (tNumNewChangesWiki != tNumNewChanges ? " (" + tNumNewChangesWiki + ")" : ""), {               body: tEditTitle + Utils_1["default"].ucfirst(i18n_1["default"]("myhome-feed-edited-by", tMostRecentEntry.author)) + tEditSummary            }); }       tMostRecentEntry = null; };   // Add a single change at a time, with a timeout before the next one to prevents script from locking up browser. RCMManager.prototype.rcmChunk = function (pIndex, pLastDay, pLastMonth, pContainer, pID) { var _this = this; if (pID != this.ajaxID) { return; } // If the script is refreshed (by auto refresh) while entries are adding, stop adding old entries. if (this.newRecentChangesEntries.length == 0) { this.finishScript; return; }       var date = this.newRecentChangesEntries[pIndex].date; // Add new date grouping if necessary. if (Utils_1["default"].getDate(date) != pLastDay || Utils_1["default"].getMonth(date) != pLastMonth) { pLastDay = Utils_1["default"].getDate(date); pLastMonth = Utils_1["default"].getMonth(date); var tTimestamp = Utils_1["default"].formatWikiTimeStamp(date, false); var tNewContainer = void 0; // Re-use existing container if there is one if (tNewContainer = this.resultsNode.querySelector("[data-timestamp=\"" + tTimestamp + "\"]")) { pContainer = tNewContainer; }           else { var tNewHeading = Utils_1["default"].newElement("h4", { innerHTML: tTimestamp }); tNewContainer = this.rcParams.hideenhanced == false ? Utils_1["default"].newElement("div", { className: "rcm-rc-cont" }) : Utils_1["default"].newElement("ul", { className: "special rcm-rc-cont" }); tNewContainer.dataset["timestamp"] = tTimestamp; if (!pContainer) { if (this.isHardRefresh) { this.resultsNode.appendChild(tNewHeading); this.resultsNode.appendChild(tNewContainer); }                   else { // Utils.prependChild(tNewContainer, this.resultsNode); Utils_1["default"].prependChild(tNewHeading, this.resultsNode); Utils_1["default"].insertAfter(tNewContainer, tNewHeading); }               }                else { Utils_1["default"].insertAfter(tNewHeading, pContainer); Utils_1["default"].insertAfter(tNewContainer, tNewHeading); }               pContainer = tNewContainer; tNewHeading = null; }           tNewContainer = null; }       // // Show at what point new changes start at. // if(this.lastLoadDateTime != null && pIndex-1 >= 0 && date <= this.lastLoadDateTime && this.newRecentChangesEntries[pIndex-1].date > this.lastLoadDateTime) { // 	this.rcmNewChangesMarker = Utils.newElement("div", { className:"rcm-previouslyLoaded", innerHTML:" "+i18n('rcm-previouslyloaded')+" " }, pContainer); // }       // Add to page if (this.rcmNewChangesMarker) { if (this.newRecentChangesEntries[pIndex].htmlNode) { Utils_1["default"].removeElement(this.newRecentChangesEntries[pIndex].htmlNode); }           var tRcNode = this.newRecentChangesEntries[pIndex].toHTML(pIndex); if (pContainer.innerHTML == "") { pContainer.appendChild(tRcNode); }           else if (pIndex == 0) { // pContainer.insertBefore(tRcNode, pContainer.firstChild); // For some odd reason this sometimes says pContainer.firstChild is not a child of pContainer pContainer.firstChild.parentNode.insertBefore(tRcNode, pContainer.firstChild); }           else { // pContainer.insertBefore(tRcNode, this.rcmNewChangesMarker); // Kinda hacky but doesn't occassionally fail. if (this.newRecentChangesEntries[pIndex - 1].htmlNode.parentNode != pContainer) { pContainer.appendChild(tRcNode); }               else { Utils_1["default"].insertAfter(tRcNode, this.newRecentChangesEntries[pIndex - 1].htmlNode); }           }            tRcNode = null; }       else { pContainer.appendChild(this.newRecentChangesEntries[pIndex].toHTML(pIndex)); }       this.itemsAdded += this.newRecentChangesEntries[pIndex].list.length; if (++pIndex < this.newRecentChangesEntries.length) { document.querySelector(this.modID + " .rcm-content-loading-num").innerHTML = this.itemsAdded.toString; // Only do a timeout every few changes (timeout to prevent browser potentially locking up, only every few to prevent it taking longer than necessary) if (pIndex % 5 == 0) { setTimeout(function { _this.rcmChunk(pIndex, pLastDay, pLastMonth, pContainer, pID); }); }           else { this.rcmChunk(pIndex, pLastDay, pLastMonth, pContainer, pID); }       }        else { this.finishScript; }   };    ;    // // Add a single change at a time, with a timeout before the next one to prevents script from locking up browser. // rcmChunkOld(pIndex:number, pLastDay:number, pLastMonth:number, pContainer:HTMLElement, pID:number) : void { // 	if(pID != this.ajaxID) { return; } // If the script is refreshed (by auto refresh) while entries are adding, stop adding old entries. //   // 	if(this.recentChangesEntries.length == 0) { this.finishScript; return; } //   // 	var date = this.recentChangesEntries[pIndex].date; // 	// Add new date grouping if necessary. // 	if(Utils.getDate(date) != pLastDay || Utils.getMonth(date) != pLastMonth) { // 		pLastDay = Utils.getDate(date); // 		pLastMonth = Utils.getMonth(date); // 		Utils.newElement("h4", { innerHTML:Utils.formatWikiTimeStamp(date, false) }, this.resultsNode); //   // 		pContainer = this.rcParams.hideenhanced==false ? Utils.newElement("div", { }, this.resultsNode) : Utils.newElement("ul", { className:"special" }, this.resultsNode); // 	}   // 	// Show at what point new changes start at. // 	if(this.lastLoadDateTime != null && pIndex-1 >= 0 && date <= this.lastLoadDateTime && this.recentChangesEntries[pIndex-1].date > this.lastLoadDateTime) { // 		this.rcmNewChangesMarker = Utils.newElement("div", { className:"rcm-previouslyLoaded", innerHTML:" "+i18n('rcm-previouslyloaded')+" " }, pContainer); // 	}   //    // 	// Add to page // 	pContainer.appendChild(this.recentChangesEntries[pIndex].toHTML(pIndex)); // 	this.itemsAdded += this.recentChangesEntries[pIndex].list.length; //   // 	if(++pIndex < this.recentChangesEntries.length) { // 		document.querySelector(this.modID+" .rcm-content-loading-num").innerHTML = this.itemsAdded.toString; // 		// Only do a timeout every few changes (timeout to prevent browser potentially locking up, only every few to prevent it taking longer than necessary) // 		if(pIndex%5 == 0) { // 			setTimeout( => { this.rcmChunk(pIndex, pLastDay, pLastMonth, pContainer, pID); }); // 		} else { // 			this.rcmChunk(pIndex, pLastDay, pLastMonth, pContainer, pID); // 		}   // 	}    // 	else { this.finishScript; } // };   RCMManager.prototype.finishScript = function  { Utils_1["default"].removeElement(document.querySelector(this.modID + " .rcm-content-loading")); this.addRefreshButtonTo(this.statusNode); this.addAutoRefreshInputTo(this.statusNode); // If auto-refresh is on and window doesn't have focus, then don't update the position of "previously loaded" message. if (this.lastLoadDateTime == null || !this.isAutoRefreshEnabled || document.hasFocus) { this.lastLoadDateTime = this.recentChangesEntries.length > 0 ? this.recentChangesEntries[0].date : null; //new Date; }       this.lastLoadDateTimeActual = this.recentChangesEntries.length > 0 ? this.recentChangesEntries[0].date : null; //new Date; // Removing this all remove event handlers // for (var i = 0; i < this.recentChangesEntries.length; i++) { // 	this.recentChangesEntries[i].dispose; // 	this.recentChangesEntries[i] = null; // }       // this.recentChangesEntries = null; this.startAutoRefresh; //$( "#rc-content-multiple .mw-collapsible" ).each(function{ $(this).makeCollapsible; }); (window.ajaxCallAgain || []).forEach(function (cb) { cb; }); // Secondary info if (this.extraLoadingEnabled) { // Check here instead of adding as they come up to condense calls. this.chosenWikis.forEach(function (wd) { wd.checkForSecondaryLoading; }); this._loadExtraInfo(this.ajaxID); }   };    ;    RCMManager.prototype.startAutoRefresh = function  { var _this = this; if (!this.isAutoRefreshEnabled) { return; }       this.autoRefreshTimeoutID = window.setTimeout(function  {            if (RCMModal_1["default"].isModalOpen || (_this.autoRefreshEvenOnFocus == false && document.hasFocus)) {                _this.startAutoRefresh;                return;            }            _this.refresh;        }, this.autoRefreshTimeoutNum); };   ;    RCMManager.prototype._loadExtraInfo = function (pID) { var _this = this; if (pID != this.ajaxID) { return; }       if (this.secondaryWikiData.length == 0) { mw.log("[RCMManager](_loadExtraInfo) All loading finished."); return; }       var tUrl = this.secondaryWikiData[0].url; var tCallback = this.secondaryWikiData[0].callback; var tDataType = this.secondaryWikiData[0].dataType || "jsonp"; this.secondaryWikiData.splice(0, 1); $.ajax({           type: 'GET',            dataType: tDataType,            data: {},            url: tUrl,            success: function  {                var pArgs = [];                for (var _i = 0; _i < arguments.length; _i++) {                    pArgs[_i - 0] = arguments[_i];                }                if (pID != _this.ajaxID) {                    return;                }                tCallback.apply(_this, pArgs);            },        }); setTimeout(function { _this._loadExtraInfo(pID); }, ConstantsApp_1["default"].loadDelay); };   /***************************    * Specific Helper Methods ***************************/   RCMManager.prototype.addRefreshButtonTo = function (pParent) { var self = this; pParent.appendChild(document.createTextNode(" ")); Utils_1["default"].newElement("button", { innerHTML: i18n_1["default"]('rcm-refresh') }, pParent).addEventListener("click", function tHandler(e) {           e.target.removeEventListener("click", tHandler);            self.refresh;        }); };   ;    RCMManager.prototype.addAutoRefreshInputTo = function (pParent) { var self = this; pParent.appendChild(document.createTextNode(" ")); var autoRefresh = Utils_1["default"].newElement("span", { className: "rcm-autoRefresh" }, pParent); Utils_1["default"].newElement("label", { htmlFor: "rcm-autoRefresh-checkbox", innerHTML: i18n_1["default"]('rcm-autorefresh'), title: i18n_1["default"]('rcm-autorefresh-tooltip', Math.floor(self.autoRefreshTimeoutNum / 1000)) }, autoRefresh); var checkBox = Utils_1["default"].newElement("input", { className: "rcm-autoRefresh-checkbox", type: "checkbox" }, autoRefresh); checkBox.checked = this.isAutoRefreshEnabled; checkBox.addEventListener("click", function tHandler(e) {           if (document.querySelector(self.modID + " .rcm-autoRefresh-checkbox").checked) {                localStorage.setItem(self.autoRefreshLocalStorageID, true.toString);                self.refresh;                Notification.requestPermission;            }            else {                localStorage.setItem(self.autoRefreshLocalStorageID, false.toString);                clearTimeout(self.autoRefreshTimeoutID);            }        }); };   ;    RCMManager.prototype.isAutoRefreshEnabled = function  { return localStorage.getItem(this.autoRefreshLocalStorageID) == "true" || this.autoRefreshEnabledDefault; };   RCMManager.prototype.calcLoadPercent = function  { return Math.round((this.totalItemsToLoad - this.wikisLeftToLoad) / this.totalItemsToLoad * 100); };   ;    // take a "&" seperated list of RC params, and returns a Object with settings. // NOTE: Script does not currently support: "from" and "namespace" related fields (like invert) RCMManager.prototype.parseRCParams = function (pData, pExplodeOn, pSplitOn) { var tRcParams = {}; var paramStringArray = []; if (!pData) { return tRcParams; }       var tRcParamsRawData = pData.split(pExplodeOn); var tRcParamsDataSplit; // Split of raw data for (var i = 0; i < tRcParamsRawData.length; i++) { tRcParamsDataSplit = tRcParamsRawData[i].split(pSplitOn); if (tRcParamsDataSplit.length > 1) { if (tRcParamsDataSplit[0] == "limit" && tRcParamsDataSplit[1]) { tRcParams["limit"] = parseInt(tRcParamsDataSplit[1]); }               else if (tRcParamsDataSplit[0] == "days" && tRcParamsDataSplit[1]) { tRcParams["days"] = parseInt(tRcParamsDataSplit[1]); }               else if (tRcParamsDataSplit[0] == "namespace" && (tRcParamsDataSplit[1] || tRcParamsDataSplit[1] === "0")) { tRcParams["namespace"] = tRcParamsDataSplit[1]; }               else if (tRcParamsDataSplit[1]) { tRcParams[tRcParamsDataSplit[0]] = tRcParamsDataSplit[1] == "1"; }               paramStringArray.push(tRcParamsDataSplit[0] + "=" + tRcParamsDataSplit[1]); }       }        tRcParams.paramString = paramStringArray.join("&"); paramStringArray = null; return tRcParams; };   RCMManager.prototype.getDefaultRCParams = function  { return { paramString: "", limit: 50, days: 7, hideminor: false, hidebots: true, hideanons: false, hideliu: false, hidemyself: false, hideenhanced: false, hidelogs: false, namespace: null, };   };    // Static Constants RCMManager.LOADING_ERROR_RETRY_NUM_INC = 5; return RCMManager; }); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = RCMManager;

},{"./ConstantsApp":1,"./Main":2,"./RCData":3,"./RCList":4,"./RCMModal":6,"./RCMOptions":7,"./RCMWikiPanel":8,"./RCMWikiaDiscussionData":9,"./RC_TYPE":10,"./Utils":12,"./WikiData":13,"./i18n":14}],6:[function(require,module,exports){ "use strict"; var ConstantsApp_1 = require("./ConstantsApp"); var i18n_1 = require("./i18n"); var $ = window.jQuery; var mw = window.mediaWiki; //###################################### // #### Modal Manager #### // This is a STATIC class. This is a helper class for using Wikia modals, as RCM has some specific requirements. //###################################### var RCMModal = (function {    function RCMModal {    }    // pData = { title:String, content:String, rcm_buttons:Array<{ value:String, event:String, callback:Event->Void, closeOnClick:Boolean=true }>, rcm_onModalShown:Void->Void, vars:Object }    // 'vars' is same as `wikia.ui.factory` modal.    RCMModal.showModal = function (pData) {        // Re-open modal so that it gets re-positioned based on new content size.        RCMModal.closeModal;        // Prepare content for modal        var tModalDataOptions = { type: "default", vars: $.extend({ id: RCMModal.MODAL_ID, title: pData.title, content: '<div id="' + RCMModal.MODAL_CONTENT_ID + '">' + pData.content + ' ', size: 'auto', buttons: [], }, pData.vars) };       var tModalData = tModalDataOptions.vars;        tModalData.buttons.unshift({ vars: { value: i18n_1["default"]('flags-edit-modal-close-button-text'), data: { key: "event", value: "close_button" }, } });       if (pData.rcm_buttons) {            pData.rcm_buttons.forEach(function (o, i, a) { tModalData.buttons.push({ vars: {                       value: o.value,                        classes: ['normal', 'primary'],                        data: { key: "event", value: o.event },                    } }); });       }        RCMModal.createModalComponent(tModalDataOptions, function (modal) { // cancel - user clicked 'Cancel' modal.bind("close_button", function (e) { modal.trigger("close"); }); if (pData.rcm_buttons) { pData.rcm_buttons.forEach(function (o, i, a) {                   if (o.event && o.callback) {                        modal.bind(o.event, function (e) { o.callback(e); if (o.closeOnClick !== false) { modal.trigger("close"); }                       });                    }                });            }            // show modal modal.show; if (pData.rcm_onModalShown) { // setTimeout(pData.rcm_onModalShown, 100); pData.rcm_onModalShown; }       });    };    RCMModal.createModalComponent = function (pData, pCallback) {        if (RCMModal.modalFactory) {            RCMModal.createModalComponentWithExistingFactory(pData, pCallback);        }        else {            window.require(['wikia.ui.factory'], function (ui) { ui.init(['modal']).then(function (modal) {                   RCMModal.modalFactory = modal;                    RCMModal.createModalComponentWithExistingFactory(pData, pCallback);                }); });       }    };    RCMModal.createModalComponentWithExistingFactory = function (pData, pCallback) {        RCMModal.modalFactory.createComponent(pData, function (obj) { RCMModal.modal = obj; obj.bind("close", function (e) { RCMModal.modal = null; }); pCallback(obj); });   };    // Give same title and buttons as showModal    RCMModal.showLoadingModal = function (pData, pOnModalShown) {        // While we are waiting for results, open diff window to acknowledge user's input        if (!RCMModal.isModalOpen) {            pData.content = " " + ConstantsApp_1["default"].getLoaderLarge + " ";            pData.rcm_onModalShown = pOnModalShown;            RCMModal.showModal(pData);        }    };    RCMModal.setModalContent = function (pHTML) {        document.querySelector("#" + RCMModal.MODAL_CONTENT_ID).innerHTML = pHTML;    };    RCMModal.isModalOpen = function  {        return !!RCMModal.modal;    };    RCMModal.closeModal = function  {        if (RCMModal.isModalOpen) {            RCMModal.modal.trigger("close");        }    };    RCMModal.MODAL_ID = "rcm-modal";    RCMModal.MODAL_CONTENT_ID = "rcm-modal-content";    RCMModal.modalFactory = null; RCMModal.modal = null; return RCMModal; }); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = RCMModal;

},{"./ConstantsApp":1,"./i18n":14}],7:[function(require,module,exports){ "use strict"; var ConstantsApp_1 = require("./ConstantsApp"); var Utils_1 = require("./Utils"); var i18n_1 = require("./i18n"); var $ = window.jQuery; var mw = window.mediaWiki; //###################################### // #### Run-time Options #### // * Custom version of RC "options" section, using url params to keep track of options. //###################################### var RCMOptions = (function {    // Constructor    function RCMOptions(pManager) {        this.manager = pManager;        this.localStorageID = ConstantsApp_1["default"].OPTIONS_SETTINGS_LOCAL_STORAGE_ID + "-" + pManager.modID.replace(".", "");    }    RCMOptions.prototype.dispose = function  {        this.removeEventListeners;        this.manager = null;        this.root = null;        this.rcParams = null;        this.settingsSaveCookieCheckbox = null;        this.settingsShowDiscussionsCheckbox = null;        this.limitField = null;        this.daysField = null;        this.minorEditsCheckbox = null;        this.botsCheckbox = null;        this.anonsCheckbox = null;        this.usersCheckbox = null;        this.myEditsCheckbox = null;        this.groupedChangesCheckbox = null;        this.logsCheckbox = null;    };    RCMOptions.prototype.init = function (pElem) { this.root = pElem; var tSave = this.getSave; this.rcParams = tSave.options || {}; //$.extend({}, this.manager.rcParamsBase); this.manager.rcParams = $.extend(this.manager.rcParams, this.rcParams); this.discussionsEnabled = tSave.discussionsEnabled; if (this.discussionsEnabled != null) { this.manager.discussionsEnabled = this.discussionsEnabled; }       this._addElements; return this; };   RCMOptions.prototype._addElements = function  { var tFieldset = Utils_1["default"].newElement("fieldset", { className: "rcoptions collapsible" }, this.root); Utils_1["default"].newElement("legend", { innerHTML: i18n_1["default"]('recentchanges-legend') }, tFieldset); var tContent = Utils_1["default"].newElement("div", { className: "rc-fieldset-content" }, tFieldset); /***************************        * RCMOptions settings ***************************/       var tSettingsPanel = Utils_1["default"].newElement("aside", { className: "rcm-options-settings" }, tContent); tSettingsPanel.innerHTML = ConstantsApp_1["default"].getSymbol("rcm-settings-gear", 19); tSettingsPanel.querySelector("svg").style.cssText = "vertical-align: top;"; var tSettingsPanelContent = Utils_1["default"].newElement("div", { className: "rcm-options-settings-cont" }, tSettingsPanel); this.settingsSaveCookieCheckbox = this._createNewSettingsOption(i18n_1["default"]('rcm-optionspanel-savewithcookie'), this.isSaveEnabled, tSettingsPanelContent); this.settingsShowDiscussionsCheckbox = this._createNewSettingsOption(i18n_1["default"]('discussions'), this.manager.discussionsEnabled, tSettingsPanelContent); /***************************        * First line of choices (numbers) ***************************/       var tRow1Text = i18n_1["default"]('rclinks').split(" ")[0].split("$3")[0].split(/\$1|\$2/); var tRow1 = Utils_1["default"].newElement("div", {}, tContent); Utils_1["default"].addTextTo(tRow1Text[0], tRow1); this.limitField = Utils_1["default"].newElement("select", {}, tRow1); Utils_1["default"].addTextTo(tRow1Text[1], tRow1); this.daysField = Utils_1["default"].newElement("select", {}, tRow1); Utils_1["default"].addTextTo(tRow1Text[2] || "", tRow1); /***************************        * Second line of choices (checkboxes) ***************************/       var tRow2 = Utils_1["default"].newElement("div", {}, tContent); var t1Text = ""; //i18n('show'); this.minorEditsCheckbox = this._newCheckbox(i18n_1["default"]('rcshowhideminor', t1Text), tRow2); Utils_1["default"].addTextTo(" | ", tRow2); this.botsCheckbox = this._newCheckbox(i18n_1["default"]('rcshowhidebots', t1Text), tRow2); Utils_1["default"].addTextTo(" | ", tRow2); this.anonsCheckbox = this._newCheckbox(i18n_1["default"]('rcshowhideanons', t1Text), tRow2); Utils_1["default"].addTextTo(" | ", tRow2); this.usersCheckbox = this._newCheckbox(i18n_1["default"]('rcshowhideliu', t1Text), tRow2); Utils_1["default"].addTextTo(" | ", tRow2); this.myEditsCheckbox = this._newCheckbox(i18n_1["default"]('rcshowhidemine', t1Text), tRow2); if (ConstantsApp_1["default"].username && this.manager.hideusers.indexOf(ConstantsApp_1["default"].username) != -1) { this.myEditsCheckbox.disabled = true; this.myEditsCheckbox.checked = false; this.myEditsCheckbox.title = i18n_1["default"]('rcm-optionspanel-hideusersoverride'); }       Utils_1["default"].addTextTo(" | ", tRow2); this.groupedChangesCheckbox = this._newCheckbox(i18n_1["default"]('rcshowhideenhanced', t1Text), tRow2); Utils_1["default"].addTextTo(" | ", tRow2); this.logsCheckbox = this._newCheckbox(i18n_1["default"]('rcshowhidelogs', t1Text), tRow2); /***************************        * Finish - make this work! ***************************/       this.addEventListeners; this.refresh; return this; };   RCMOptions.prototype._newCheckbox = function (pText, pParent) { var tLabel = Utils_1["default"].newElement("label", null, pParent); var tCheckbox = Utils_1["default"].newElement("input", { type: "checkbox" }, tLabel); Utils_1["default"].addTextTo(pText, tLabel); return tCheckbox; };   RCMOptions.prototype._createNewSettingsOption = function (pText, pChecked, pParent) { var tCheckbox = this._newCheckbox(pText, pParent); tCheckbox.checked = pChecked; return tCheckbox; };   // Add / set the values of the fields. RCMOptions.prototype.refresh = function { /***************************        * Limit - max changes returned ***************************/       this.limitField.innerHTML = ""; var tLimit = this.manager.rcParams.limit; var tLimitValues = [25, 50, 75, 100, 200, 350, 500]; // If rcParam value is unique, add it to list if (tLimitValues.indexOf(tLimit) == -1) { tLimitValues.push(tLimit); tLimitValues.sort(function (a, b) { return a - b; }); }       for (var i = 0; i < tLimitValues.length; i++) { Utils_1["default"].newElement("option", { value: tLimitValues[i], innerHTML: tLimitValues[i], selected: (tLimit == tLimitValues[i] ? "selected" : undefined) }, this.limitField); }       /***************************         * Days - max changes returned up to _ days before ***************************/       this.daysField.innerHTML = ""; var tDays = this.manager.rcParams.days; var tDayValues = [1, 3, 7, 14, 30]; // If rcParam value is unique, add it to list if (tDayValues.indexOf(tDays) == -1) { tDayValues.push(tDays); tDayValues.sort(function (a, b) { return a - b; }); }       for (var i = 0; i < tDayValues.length; i++) { Utils_1["default"].newElement("option", { value: tDayValues[i], innerHTML: tDayValues[i], selected: (tDays == tDayValues[i] ? "selected" : undefined) }, this.daysField); }       /***************************         * Checkboxes ***************************/       this.minorEditsCheckbox.checked = !this.manager.rcParams.hideminor; this.botsCheckbox.checked = !this.manager.rcParams.hidebots; this.anonsCheckbox.checked = !this.manager.rcParams.hideanons; this.usersCheckbox.checked = !this.manager.rcParams.hideliu; this.myEditsCheckbox.checked = !this.manager.rcParams.hidemyself; this.groupedChangesCheckbox.checked = !this.manager.rcParams.hideenhanced; this.logsCheckbox.checked = !this.manager.rcParams.hidelogs; };   RCMOptions.prototype.addEventListeners = function  { this.settingsSaveCookieCheckbox.addEventListener("change", this._onChange_settingsSaveCookie.bind(this)); this.settingsShowDiscussionsCheckbox.addEventListener("change", this._onChange_settingsShowDiscussions.bind(this)); this.limitField.addEventListener("change", this._onChange_limit.bind(this)); this.daysField.addEventListener("change", this._onChange_days.bind(this)); this.minorEditsCheckbox.addEventListener("change", this._onChange_hideminor.bind(this)); this.botsCheckbox.addEventListener("change", this._onChange_hidebots.bind(this)); this.anonsCheckbox.addEventListener("change", this._onChange_hideanons.bind(this)); this.usersCheckbox.addEventListener("change", this._onChange_hideliu.bind(this)); this.myEditsCheckbox.addEventListener("change", this._onChange_hidemyself.bind(this)); this.groupedChangesCheckbox.addEventListener("change", this._onChange_hideenhanced.bind(this)); this.logsCheckbox.addEventListener("change", this._onChange_hidelogs.bind(this)); };   RCMOptions.prototype.removeEventListeners = function  { this.settingsSaveCookieCheckbox.removeEventListener("change", this._onChange_settingsSaveCookie.bind(this)); this.settingsShowDiscussionsCheckbox.removeEventListener("change", this._onChange_settingsShowDiscussions.bind(this)); this.limitField.removeEventListener("change", this._onChange_limit); this.daysField.removeEventListener("change", this._onChange_days); this.minorEditsCheckbox.removeEventListener("change", this._onChange_hideminor); this.botsCheckbox.removeEventListener("change", this._onChange_hidebots); this.anonsCheckbox.removeEventListener("change", this._onChange_hideanons); this.usersCheckbox.removeEventListener("change", this._onChange_hideliu); this.myEditsCheckbox.removeEventListener("change", this._onChange_hidemyself); this.groupedChangesCheckbox.removeEventListener("change", this._onChange_hideenhanced); this.logsCheckbox.removeEventListener("change", this._onChange_hidelogs); };   /***************************     * Events ***************************/   RCMOptions.prototype._onChange_limit = function (pEvent) { this.afterChangeNumber("limit", parseInt(pEvent.target.value)); };   RCMOptions.prototype._onChange_days = function (pEvent) { this.afterChangeNumber("days", parseInt(pEvent.target.value)); };   RCMOptions.prototype._onChange_hideminor = function (pEvent) { this.afterChangeBoolean("hideminor", !pEvent.target.checked); };   RCMOptions.prototype._onChange_hidebots = function (pEvent) { this.afterChangeBoolean("hidebots", !pEvent.target.checked); };   RCMOptions.prototype._onChange_hideanons = function (pEvent) { // Both "hideanons" and "hideliu" cannot be true if (pEvent.target.checked == false && this.usersCheckbox.checked == false) { this.manager.rcParams["hideliu"] = false; this.usersCheckbox.checked = true; }       this.afterChangeBoolean("hideanons", !pEvent.target.checked); };   RCMOptions.prototype._onChange_hideliu = function (pEvent) { // Both "hideanons" and "hideliu" cannot be true if (pEvent.target.checked == false && this.anonsCheckbox.checked == false) { this.manager.rcParams["hideanons"] = false; this.anonsCheckbox.checked = true; }       this.afterChangeBoolean("hideliu", !pEvent.target.checked); };   RCMOptions.prototype._onChange_hidemyself = function (pEvent) { this.afterChangeBoolean("hidemyself", !pEvent.target.checked); };   RCMOptions.prototype._onChange_hideenhanced = function (pEvent) { this.afterChangeBoolean("hideenhanced", !pEvent.target.checked); };   RCMOptions.prototype._onChange_hidelogs = function (pEvent) { this.afterChangeBoolean("hidelogs", !pEvent.target.checked); };   RCMOptions.prototype._onChange_settingsSaveCookie = function (pEvent) { if (pEvent.target.checked) { this.save; }       else { localStorage.removeItem(this.localStorageID); }   };    RCMOptions.prototype._onChange_settingsShowDiscussions = function (pEvent) { this.discussionsEnabled = pEvent.target.checked; this.manager.discussionsEnabled = pEvent.target.checked; this.manager.hardRefresh(true); this.save; };   /***************************     * Helper Methods ***************************/   // Will add / edit the url param & script value with details entered. RCMOptions.prototype.afterChangeNumber = function (pKey, pVal, pHardRefresh) { if (pHardRefresh === void 0) { pHardRefresh = false; } this.rcParams[pKey] = pVal; this.manager.rcParams[pKey] = pVal; this.manager.hardRefresh(true); this.save; };   RCMOptions.prototype.afterChangeBoolean = function (pKey, pVal, pHardRefresh) { if (pHardRefresh === void 0) { pHardRefresh = false; } this.rcParams[pKey] = pVal; this.manager.rcParams[pKey] = pVal; this.manager.hardRefresh(true); this.save; };   RCMOptions.prototype.save = function  { if (this.settingsSaveCookieCheckbox.checked) { localStorage.setItem(this.localStorageID, JSON.stringify({ options: this.rcParams, discussionsEnabled: this.discussionsEnabled })); }   };    RCMOptions.prototype.getSave = function  { return localStorage.getItem(this.localStorageID) ? JSON.parse(localStorage.getItem(this.localStorageID)) : {};   };    RCMOptions.prototype.isSaveEnabled = function  { return localStorage.getItem(this.localStorageID) != null; };   return RCMOptions; }); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = RCMOptions;

},{"./ConstantsApp":1,"./Utils":12,"./i18n":14}],8:[function(require,module,exports){ "use strict"; var ConstantsApp_1 = require("./ConstantsApp"); var Utils_1 = require("./Utils"); var i18n_1 = require("./i18n"); var $ = window.jQuery; var mw = window.mediaWiki; //###################################### // #### Wiki Panel #### // * Show the current loaded wikis, as well as any information pertaining to them.s //###################################### var RCMWikiPanel = (function {    // Constructor    function RCMWikiPanel(pManager) {        this.manager = pManager;        this.singleWiki = this.manager.chosenWikis.length == 1;        this.count = 0;    }    RCMWikiPanel.prototype.dispose = function  {        this.manager = null;        this.root = null;        this.listNode = null;        this.infoNode = null;    };    // Should only be called once.    RCMWikiPanel.prototype.init = function (pElem) {        this.root = pElem;        if (!this.singleWiki)            this.listNode = Utils_1["default"].newElement("span", { className: "rcm-wikis-list" }, this.root);        this.infoNode = Utils_1["default"].newElement("div", { className: "rcm-wikis-info" }, this.root);        return this;    };    // Clear panel (on refresh).    RCMWikiPanel.prototype.populate = function  {        if (!this.singleWiki) {            this.listNode.innerHTML = i18n_1["default"]('rcm-wikisloaded'); }   };    // Clear panel (on refresh). RCMWikiPanel.prototype.clear = function { if (!this.singleWiki) { this.listNode.innerHTML = ""; this.infoNode.innerHTML = ""; }       this.count = 0; };   // Clear panel (on refresh). RCMWikiPanel.prototype.addWiki = function (pWikiInfo) { var _this = this; if (this.singleWiki) { if (!this.infoNode.innerHTML) this.onIconClick(pWikiInfo, null); }       else { if (this.count > 0) { Utils_1["default"].addTextTo(":", this.listNode); }           var favicon = Utils_1["default"].newElement("span", { id: pWikiInfo.infoID, className: "favicon", innerHTML: pWikiInfo.getFaviconHTML }, this.listNode); favicon.addEventListener("click", function (e) { _this.onIconClick(pWikiInfo, e); }); }       this.count++; };   RCMWikiPanel.prototype.onIconClick = function (pWikiInfo, e) { var infoBanner = this.infoNode.querySelector(".banner-notification"); // If already open for that wiki, then close it. if (infoBanner && infoBanner.dataset.wiki == pWikiInfo.servername && e && (e.screenX != 0 && e.screenY != 0)) { this.closeInfo; }       else { // Front page|Site name - RecentChanges - New pages – New files – Logs – Insights this.infoNode.innerHTML = "" + ("<div class='banner-notification warn' data-wiki='" + pWikiInfo.servername + "'>") + (this.singleWiki ? "" : "<button class='close wikia-chiclet-button'> ") + " "               + " "                + " "                + " "                + " "                + " ";            +" ";            if (!this.singleWiki) { this.infoNode.querySelector(".banner-notification .close").addEventListener("click", this.closeInfo.bind(this)); }       }    };    RCMWikiPanel.prototype.closeInfo = function  { $(this.infoNode.querySelector(".banner-notification")).animate({ height: "toggle", opacity: "toggle" }, 200, function {            $(this).remove;        }); };   RCMWikiPanel.prototype.goToAndOpenInfo = function (e) { var btn = document.querySelector("#" + e.currentTarget.dataset.infoid); if (btn) { if (!Utils_1["default"].elemIsVisible(btn)) { var tScrollOffset = ConstantsApp_1["default"].config.skin == "oasis" ? -46 : 0;               // $('html, body').animate({ scrollTop: $(btn).offset.top }, 0); $('html, body').scrollTop($(btn).offset.top + tScrollOffset - 6); }           btn.click; }   };    return RCMWikiPanel; }); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = RCMWikiPanel;

},{"./ConstantsApp":1,"./Utils":12,"./i18n":14}],9:[function(require,module,exports){ "use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __ { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __); }; var ConstantsApp_1 = require("./ConstantsApp"); var RCData_1 = require("./RCData"); var Utils_1 = require("./Utils"); var i18n_1 = require("./i18n"); var RC_TYPE_1 = require("./RC_TYPE"); var $ = window.jQuery; var mw = window.mediaWiki; //###################################### // #### Recent Change Data #### // * A data object to keep track of RecentChanges data in an organized way, as well as also having convenience methods. // * These should only ever be used in RCList. //###################################### var RCMWikiaDiscussionData = (function (_super) {   __extends(RCMWikiaDiscussionData, _super);    // Constructor    function RCMWikiaDiscussionData(pWikiInfo, pManager) {        _super.call(this, pWikiInfo, pManager);    }    /*override*/ RCMWikiaDiscussionData.prototype.dispose = function  {        _super.prototype.dispose.call(this);    };    /*override*/ RCMWikiaDiscussionData.prototype.init = function (pData) {        this.type = RC_TYPE_1["default"].DISCUSSION;        this.date = new Date(0); /*Epoch*/        this.date.setUTCSeconds((pData.modificationDate || pData.creationDate).epochSecond);        this.userEdited = true; // Currently anons cannot edit        this.author = pData.createdBy.name;        this.userhidden = false; //pData.userhidden == "";        this.title = pData.title; //Utils.escapeCharacters( pData.title.split("/@comment")[0] ); this.namespace = -5234; // Has no namespace. This should probably be unique // this.logtype = pData.logtype; // this.logaction = pData.logaction; // this.newlen = pData.newlen; // this.oldlen = pData.oldlen; this.summary = pData.rawContent; if (this.summary.length > 175) { this.summary = this.summary.slice(0, 175) + "..."; }       this.unparsedComment = this.summary; this.forumId = pData.forumId; this.threadId = pData.threadId; this.pageid = pData.id; //pData.pageid; // this.revid = pData.revid; // this.old_revid = pData.old_revid; this.isNewPage = pData.modificationDate == null; //pData["new"] == ""; this.isBotEdit = false; //pData.bot == ""; this.isMinorEdit = false; //pData.minor == ""; this.isPatrolled = false; //pData.patrolled == ""; this.titleNoNS = this.title; //(this.namespace != 0 && this.title.indexOf(":") > -1) ? this.title.split(":")[1] : this.title; this.uniqueID = pData.threadId; // By default; make change based on this.type. this.hrefTitle = Utils_1["default"].escapeCharactersLink(pData.title); this.threadHref = "//" + this.wikiInfo.servername + "/d/p/" + this.threadId; this.href = this.threadHref + (pData.isReply ? "#reply-" + pData.id : ""); this.hrefBasic = this.href; this.hrefFS = this.href + this.wikiInfo.firstSeperator; this.threadTitle = pData.title; // Discussion-specific this.user_id = pData.createdBy.id; this.user_avatarUrl = pData.createdBy.avatarUrl ? pData.createdBy.avatarUrl.replace("/scale-to-width-down/100", "/scale-to-width-down/15") : pData.createdBy.avatarUrl; this.upvoteCount = pData.upvoteCount; this.forumName = pData.forumName; this.rawContent = pData.rawContent; this.isLocked = pData.isLocked; this.isReported = pData.isReported; return null; // Return self for chaining or whatnot. };   /*override*/ RCMWikiaDiscussionData.prototype.userDetails = function  { if (this.userhidden) { return ' ' + i18n_1["default"]("rev-deleted-user") + ' '; }       var blockText = this.wikiInfo.user.hasBlockRight ? i18n_1["default"]("pipe-separator") + "<a href='{0}Special:Block/{1}'>" + i18n_1["default"]("blocklink") + "</a>" : ""; // if(this.userEdited) { // 	return Utils.formatString(" <a href='{0}User:{1}'>{2}</a> (<a href='{0}User_talk:{1}'>"+i18n("talkpagelinktext")+"</a>"+i18n("pipe-separator")+"<a href='{0}Special:Contributions/{1}'>"+i18n("contribslink")+"</a>"+blockText+") ", this.wikiInfo.articlepath, Utils.escapeCharactersLink(this.author), this.author); // } else { // 	return Utils.formatString(" <a href='{0}Special:Contributions/{1}'>{2}</a> (<a href='{0}User_talk:{1}'>"+i18n("talkpagelinktext")+"</a>"+blockText+") ", this.wikiInfo.articlepath, Utils.escapeCharactersLink(this.author), this.author); // }       var tUserContribsLink = "//" + this.wikiInfo.servername + "/d/u/" + this.user_id; return Utils_1["default"].formatString(""           + " "            + this.getAvatarImg + "<a href='{0}User:{1}' class='" + this.wikiInfo.getUserClass(this.author) + "' " + this.wikiInfo.getUserClassDataset(this.author) + ">{2}</a>"            + " (<a href='{0}User_talk:{1}'>" + i18n_1["default"]("talkpagelinktext") + "</a>" + i18n_1["default"]("pipe-separator") + "<a href='" + tUserContribsLink + "'>" + i18n_1["default"]("contribslink") + "</a>" + blockText + ")"           + " ", this.wikiInfo.articlepath, Utils_1["default"].escapeCharactersLink(this.author), this.author); };   RCMWikiaDiscussionData.prototype.getAvatarImg = function  { return this.user_avatarUrl ? "<span class=\"rcm-avatar\"><a href=\"" + this.wikiInfo.articlepath + "User:" + Utils_1["default"].escapeCharactersLink(this.author) + "\"><img src='" + this.user_avatarUrl + "' width=\"15\" height=\"15\" /></a> " : "";   };    RCMWikiaDiscussionData.prototype.discusssionTitleText = function (pThreadTitle, pIsHead) { if (pIsHead === void 0) { pIsHead = false; } if (pThreadTitle == undefined) { pThreadTitle = this.getThreadTitle; }       var tForumLink = "<a href=\"//" + this.wikiInfo.servername + "/d/f?catId=" + this.forumId + "&sort=latest\">" + this.forumName + "</a>"; var tText = i18n_1["default"].MESSAGES["wall-recentchanges-thread-group"]; tText = tText.replace(/(\[\[.*\]\])/g, tForumLink); tText = i18n_1["default"].wiki2html(tText, ("<a href=\"" + (pIsHead ? this.threadHref : this.href) + "\">" + pThreadTitle + "</a>") + (pIsHead ? "" : this.getUpvoteCount)); return tText; };   RCMWikiaDiscussionData.prototype.getUpvoteCount = function  { return "<span class=\"rcm-upvotes\"> (" + ConstantsApp_1["default"].getSymbol("rcm-upvote-tiny") + " " + this.upvoteCount + ") "; };   RCMWikiaDiscussionData.prototype.getThreadStatusIcons = function  { return "" + (this.isLocked ? ConstantsApp_1["default"].getSymbol("rcm-lock") : "") + (this.isReported ? ConstantsApp_1["default"].getSymbol("rcm-report") : ""); };   return RCMWikiaDiscussionData; }(RCData_1["default"])); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = RCMWikiaDiscussionData;

},{"./ConstantsApp":1,"./RCData":3,"./RC_TYPE":10,"./Utils":12,"./i18n":14}],10:[function(require,module,exports){ "use strict"; var RC_TYPE; (function (RC_TYPE) {   RC_TYPE[RC_TYPE["NORMAL"] = 0] = "NORMAL";    RC_TYPE[RC_TYPE["LOG"] = 1] = "LOG";    RC_TYPE[RC_TYPE["COMMENT"] = 2] = "COMMENT";    RC_TYPE[RC_TYPE["WALL"] = 3] = "WALL";    RC_TYPE[RC_TYPE["BOARD"] = 4] = "BOARD";    RC_TYPE[RC_TYPE["DISCUSSION"] = 5] = "DISCUSSION"; })(RC_TYPE || (RC_TYPE = {})); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = RC_TYPE;

},{}],11:[function(require,module,exports){ "use strict"; var Utils_1 = require("./Utils"); var $ = window.jQuery; var mw = window.mediaWiki; //###################################### // #### Wiki Data #### // * A data object to keep track of wiki data in an organized way, as well as also having convenience methods. // * These should only be created once per wiki per RCMManager. No reason to re-create every refresh. //###################################### var UserData = (function {    // Constructor    function UserData(pWikiInfo, pManager) {        this.manager = pManager;    }    UserData.prototype.dispose = function  {        delete this.manager;        delete this.wikiInfo;        this.groups = null;        // this.registration = null;        this.block = null;    };    // Handle data retrieved from https://www.mediawiki.org/wiki/API:Users    UserData.prototype.init = function (pData) {        this.userid = pData.userid;        this.name = pData.name;        // this.editcount = pData.editcount;        this.groups = pData.groups || [];        Utils_1["default"].removeFromArray(this.groups, "*");        // this.registration = new Date(pData.registration);        if (pData.blockedby) {            this.block = { by: pData.blockedby, reason: pData.blockreason, expiration: pData.blockexpiry };        } return this; // Return self for chaining or whatnot. };   // Get user CSS classes as a string. UserData.prototype.getClassNames = function { return "rcm-usergroup-" + this.groups.join(" rcm-usergroup-") + (this.block ? " rcm-userblocked" : ""); };   UserData.getUsersApiUrl = function (pList, pScriptpath) { var tReturnText = pScriptpath + "/api.php?action=query&format=json&continue=&list=users"; tReturnText += "&usprop=" + ["blockinfo", "groups"].join("|"); // "editcount", "registration" tReturnText += "&ususers=" + Utils_1["default"].escapeCharactersLink(pList.join("|").replace(/ /g, "_")); mw.log("[UserData](getUsersApiUrl)", "http:" + tReturnText.replace("&format=json", "&format=jsonfm")); return tReturnText; };   return UserData; }); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = UserData;

},{"./Utils":12}],12:[function(require,module,exports){ "use strict"; var ConstantsApp_1 = require("./ConstantsApp"); var $ = window.jQuery; var mw = window.mediaWiki; //###################################### // General Helper Methods - STATIC //###################################### var Utils = (function {    function Utils {    }    /***************************    * Element Stuff    ***************************/    // Allows forEach even on nodelists    Utils.forEach = function (collection, callback, pScope) { if (collection != undefined) {        Array.prototype.forEach.call(collection, callback, pScope);    } };    // Creates a new HTML element (not jQuery) with specific attributes    Utils.newElement = function (tag, attributes, parent) {        var element = document.createElement(tag);        if (attributes != undefined) {            for (var key in attributes) {                if (key == "style") {                    element.style.cssText = attributes[key];                }                else {                    element[key] = attributes[key];                }            }        }        if (parent != undefined) parent.appendChild(element); return element; };   Utils.removeElement = function (pNode) { pNode = pNode; pNode.parentNode.removeChild(pNode); };   Utils.addTextTo = function (pText, pNode) { pNode.appendChild(document.createTextNode(pText)); };   Utils.elemIsVisible = function (pElem) { var rect = pElem.getBoundingClientRect; var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight); return !(rect.bottom < 0 || rect.top - viewHeight >= 0); };   Utils.insertAfter = function (pNewNode, pRef) { return (pRef.nextSibling ? pRef.parentNode.insertBefore(pNewNode, pRef.nextSibling) : pRef.parentNode.appendChild(pNewNode)); // if (pRef.nextSibling) { // 	return <HTMLElement>pRef.parentNode.insertBefore(pNewNode, pRef.nextSibling); // } else { // 	return <HTMLElement>pRef.parentNode.appendChild(pNewNode); // }   };    Utils.prependChild = function (pNewNode, pRef) { return (pRef.firstChild ? pRef.insertBefore(pNewNode, pRef.firstChild) : pRef.appendChild(pNewNode)); // if(pRef.firstChild) { // 	return <HTMLElement>pRef.insertBefore(pNewNode, pRef.firstChild); // } else { // 	return <HTMLElement>pRef.appendChild(pNewNode); // }   };    /***************************    * Date Methods ***************************/   Utils.getSeconds = function (pDate) { return ConstantsApp_1["default"].timezone == "utc" ? pDate.getUTCSeconds : pDate.getSeconds; }; Utils.getMinutes = function (pDate) { return ConstantsApp_1["default"].timezone == "utc" ? pDate.getUTCMinutes : pDate.getMinutes; }; Utils.getHours = function (pDate) { return ConstantsApp_1["default"].timezone == "utc" ? pDate.getUTCHours : pDate.getHours; }; Utils.getDate = function (pDate) { return ConstantsApp_1["default"].timezone == "utc" ? pDate.getUTCDate : pDate.getDate; }; Utils.getMonth = function (pDate) { return ConstantsApp_1["default"].timezone == "utc" ? pDate.getUTCMonth : pDate.getMonth; }; Utils.getYear = function (pDate) { return ConstantsApp_1["default"].timezone == "utc" ? pDate.getUTCFullYear : pDate.getFullYear; }; Utils.formatWikiTimeStamp = function (pDate, pShowTime) { if (pShowTime === void 0) { pShowTime = true; } var tDateString = Utils.formatWikiTimeStampDateOnly(pDate), tTime = pShowTime ? Utils.formatWikiTimeStampTimeOnly(pDate) : ""; if (ConstantsApp_1["default"].userOptions.date != "ISO 8601") { if (tTime) { tTime = tTime + ", "; }           tDateString = tTime + tDateString; }       else { if (tTime) { tTime = "T" + tTime; }           tDateString = tDateString + tTime; }       return tDateString; };   Utils.formatWikiTimeStampDateOnly = function (pDate) { var tYear = Utils.getYear(pDate), tMonth = Utils.getMonth(pDate) + 1, tMonthName = ConstantsApp_1["default"].config.wgMonthNames[tMonth], tDay = Utils.getDate(pDate); switch (ConstantsApp_1["default"].userOptions.date) { case "mdy": default: return tMonthName + " " + tDay + ", " + tYear; case "dmy": return tDay + " " + tMonthName + " " + tYear; case "ymd": return tYear + " " + tMonthName + " " + tDay; case "ISO 8601": return tYear + "-" + Utils.pad((tMonth), 2, 0) + "-" + Utils.pad(tDay, 2, 0); }   };    Utils.formatWikiTimeStampTimeOnly = function (pDate) { var tHours = Utils.getHours(pDate), tMinutes = Utils.getMinutes(pDate), tSeconds = Utils.getSeconds(pDate), tTime = Utils.pad(tHours, 2) + ":" + Utils.pad(tMinutes, 2); if (ConstantsApp_1["default"].userOptions.date == "ISO 8601") { tTime += ":" + Utils.pad(tSeconds, 2); }       return tTime; };   // Convert from MediaWiki time format to one Date object like. Utils.getTimestampForYYYYMMDDhhmmSS = function (pNum) { pNum = "" + pNum; var i = 0; return pNum.slice(i, i += 4) + "-" + pNum.slice(i, i += 2) + "-" + pNum.slice(i, i += 2) + "T" + pNum.slice(i, i += 2) + ":" + pNum.slice(i, i += 2) + ":" + pNum.slice(i, i += 2); // return pNum.splice(0, 4) +"-"+ pNum.splice(0, 2) +"-"+ pNum.splice(0, 2) +"T"+ pNum.splice(0, 2) +":"+ pNum.splice(0, 2) +":"+ pNum.splice(0, 2); };   /***************************    * String Methods ***************************/   // http://stackoverflow.com/questions/10073699/pad-a-number-with-leading-zeros-in-javascript Utils.pad = function (n, width, z) { if (z === void 0) { z = 0; } n = n.toString; return n.length >= width ? n : new Array(width - n.length + 1).join(z.toString) + n;   }; // http://stackoverflow.com/a/4673436/1411473 Utils.formatString = function (format) { var pArgs = []; for (var _i = 1; _i < arguments.length; _i++) { pArgs[_i - 1] = arguments[_i]; }       return format.replace(/{(\d+)}/g, function (match, number) {            return typeof pArgs[number] != 'undefined'                ? pArgs[number]                : match;        }); };   // Need to escape quote for when text is manually added to an html tag attribute. Utils.escapeCharacters = function (pString) { return pString ? pString.replace(/"/g, '&quot;').replace(/'/g, '&apos;') : pString;   };    Utils.escapeCharactersLink = function (pString) {        return mw.util.wikiUrlencode(pString);        //return pString ? pString.replace(/%/g, '%25').replace(/ /g, "_").replace(/"/g, '%22').replace(/'/g, '%27').replace(/\?/g, '%3F').replace(/\&/g, '%26').replace(/\+/g, '%2B') : pString; };   // UpperCaseFirstLetter Utils.ucfirst = function (s) { return s && s[0].toUpperCase + s.slice(1); }; /***************************   * Misc Methods ***************************/   // Based on: http://stackoverflow.com/a/9229821 // Remove duplicates Utils.uniq_fast_key = function (a, key) { var seen = {}; var out = []; var len = a.length; var j = 0; for (var i = 0; i < len; i++) { var item = a[i]; if (seen[item[key]] !== 1) { seen[item[key]] = 1; out[j++] = item; }       }        return out; };   Utils.uniqID = function  { return "id" + (++ConstantsApp_1["default"].uniqID); };   Utils.getFirstItemFromObject = function (pData) { for (var tKey in pData) return pData[tKey]; };   Utils.removeFromArray = function (pArray, pData) { var i = pArray.indexOf(pData); if (i != -1) { return pArray.splice(i, 1)[0]; }       return null; };   // Assumes the file has already been checked to be in namespace 6 Utils.isFileAudio = function (pTitle) { var tExt = null, audioExtensions = ["oga", "ogg", "ogv"]; // Audio extensions allowed by Wikia for (var i = 0; i < audioExtensions.length; i++) { tExt = "." + audioExtensions[i]; if (pTitle.indexOf(tExt, pTitle.length - tExt.length) !== -1) { return true; } // If title ends with extension. }       return false; };   // http://phpjs.org/functions/version_compare/ // Simulate PHP version_compare Utils.version_compare = function (v1Arg, v2Arg, operator) { //      discuss at: http://phpjs.org/functions/version_compare/ //     original by: Philippe Jausions (http://pear.php.net/user/jausions) //     original by: Aidan Lister (http://aidanlister.com/) // reimplemented by: Kankrelune (http://www.webfaktory.info/) //     improved by: Brett Zamir (http://brett-zamir.me) //     improved by: Scott Baker //     improved by: Theriault //       example 1: version_compare('8.2.5rc', '8.2.5a'); //       returns 1: 1 //       example 2: version_compare('8.2.50', '8.2.52', '<'); //       returns 2: true //       example 3: version_compare('5.3.0-dev', '5.3.0'); //       returns 3: -1 //       example 4: version_compare('4.1.0.52','4.01.0.51'); //       returns 4: 1 var i = 0, x = 0, compare = 0, // Leave as negatives so they can come before numerical versions vm = { 'dev': -6, 'alpha': -5, 'a': -5, 'beta': -4, 'b': -4, 'RC': -3, 'rc': -3, '#': -2, 'p': 1, 'pl': 1 }, // Format version string to remove oddities. prepVersion = function (v) { v = ('' + v)               .replace(/[_\-+]/g, '.'); v = v.replace(/([^.\d]+)/g, '.$1.') .replace(/\.{2,}/g, '.'); return (!v.length ? [-8] : v.split('.')); };       // This converts a version component to a number. var numVersion = function (v) { return !v ? 0 : (isNaN(v) ? vm[v] || -7 : parseInt(v, 10)); }, v1 = prepVersion(v1Arg), v2 = prepVersion(v2Arg); x = Math.max(v1.length, v2.length); for (i = 0; i < x; i++) { if (v1[i] == v2[i]) { continue; }           v1[i] = numVersion(v1[i]); v2[i] = numVersion(v2[i]); if (v1[i] < v2[i]) { compare = -1; break; }           else if (v1[i] > v2[i]) { compare = 1; break; }       }        if (!operator) { return compare.toString; }       switch (operator) { case '>': case 'gt': { return (compare > 0).toString; }           case '>=': case 'ge': { return (compare >= 0).toString; }           case '<=': case 'le': { return (compare <= 0).toString; }           case '==': case '=': case 'eq': { return (compare === 0).toString; }           case '<>': case '!=': case 'ne': { return (compare !== 0).toString; }           case '': case '<': case 'lt': { return (compare < 0).toString; }           default: { return null; }       }    };    return Utils; }); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = Utils;

},{"./ConstantsApp":1}],13:[function(require,module,exports){ "use strict"; var ConstantsApp_1 = require("./ConstantsApp"); var UserData_1 = require("./UserData"); var Utils_1 = require("./Utils"); var i18n_1 = require("./i18n"); var $ = window.jQuery; var mw = window.mediaWiki; //###################################### // #### Wiki Data #### // * A data object to keep track of wiki data in an organized way, as well as also having convenience methods. // * These should only be created once per wiki per RCMManager. No reason to re-create every refresh. //###################################### var WikiData = (function {    // Constructor    function WikiData(pManager) {        this.manager = pManager;        this.notificationsEnabled = true;        this.needsSiteinfoData = true;        this.needsUserData = true;        this.user = { hasBlockRight: false, hasUndeleteRight: false, hasRollbackRight: true }; // Set hasRollbackRight to true by default so as to fetch extra necessary data first time around.        this.isWikiaWiki = true;        this.useOutdatedLogSystem = false;        this.users = {};        this.usersNeeded = [];        // Initial values set in setupRcParams due to needing "days" value.        this.lastChangeDate = null;        this.lastDiscussionDate = null;        this.resultsCount = 0;        this.discussionsCount = 0;    }    WikiData.prototype.dispose = function  {        this.manager = null;        this.hideusers = null; this.onlyshowusers = null; this.rcParamsBase = null; this.rcParams = null; this.namespaces = null; this.user = null; this.lastChangeDate = null; this.lastDiscussionDate = null; };   // Parses LI element data to be able to retrieve information for the respective wiki. WikiData.prototype.initListData = function (pNode) { var tWikiDataRaw = pNode.textContent.replace(/(\r\n|\n|\r)/gm, "").trim.split("&"); // Need to check for new lines due to how wikis create lists. //mw.log(tWikiDataRaw); // Some default values this.servername = tWikiDataRaw[0]; this.scriptdir = ""; this.firstSeperator = "?"; this.htmlName = this.servername.replace(/(\.)/g, "-"); this.isWikiaWiki = this.servername.indexOf(".wikia.") > -1; this.useOutdatedLogSystem = this.isWikiaWiki; if (this.servername.indexOf("/") > -1) { this.manager.resultCont.innerHTML = "<div style='color:red; padding:4px 5px; background:rgba(0,0,0,0.1);'>" + i18n_1["default"]("rcm-error-linkformat", this.servername) + " "; throw "Incorrect format"; }       var tWikiDataSplit, tKey, tVal; // Split of raw data for (var i = 1; i < tWikiDataRaw.length; i++) { tWikiDataSplit = tWikiDataRaw[i].split("="); if (tWikiDataSplit.length > 1) { tKey = tWikiDataSplit[0]; tVal = tWikiDataSplit[1]; switch (tKey) { case "params": { this.rcParamsBase = this.manager.parseRCParams(tVal, ",", ":"); break; }                   case "hideusers": { this.hideusers = tVal.replace("", " ").split(","); this.hideusers.forEach(function (o, i, a) { a[i] = Utils_1["default"].ucfirst(a[i].trim); }); break; }                   case "onlyshowusers": { this.onlyshowusers = tVal.replace("", " ").split(","); this.onlyshowusers.forEach(function (o, i, a) { a[i] = Utils_1["default"].ucfirst(a[i].trim); }); break; }                   case "notifications_hideusers": { this.notificationsHideusers = tVal.replace("", " ").split(","); this.notificationsHideusers.forEach(function (o, i, a) { a[i] = Utils_1["default"].ucfirst(a[i].trim); }); break; }                   case "notifications_enabled": { this.notificationsEnabled = tVal !== "false"; break; }                   case "scriptdir": { this.scriptdir = tVal; // Add / remove slashes as needed (encase added incorrectly). if (this.scriptdir[0] != "/") { this.scriptdir = "/" + this.scriptdir; }                       if (this.scriptdir[this.scriptdir.length - 1] == "/") { this.scriptdir = this.scriptdir.slice(0, -1); }                       break; }                   case "favicon": { this.favicon = tVal; if (this.favicon.indexOf(".") > -1) { this.favicon = "//" + this.favicon; }                       else { // [depreciated] this.favicon = "https://vignette.wikia.nocookie.net/" + this.favicon + "/images/6/64/Favicon.ico"; }                       break; }                   case "username": { this.username = tVal; break; }                   case "bgcolor": { this.bgcolor = tVal; break; }                   default: { // For sanity's sake, this shouldn't actually be used (so that it's obvious what the script is assuming will be passed in). this[tKey] = tVal; break; }               }            }        }        if (!this.username && this.isWikiaWiki && ConstantsApp_1["default"].username) { this.username = ConstantsApp_1["default"].username; }       this.scriptpath = "//" + this.servername + this.scriptdir; this.infoID = "wiki-" + this.htmlName; this.rcClass = "rc-entry-" + this.htmlName; // this.setupRcParams; // Moved to manager tKey = null; tVal = null; tWikiDataRaw = null; tWikiDataSplit = null; return this; // Return self for chaining or whatnot. };   // If Siteinfo / user data / other 1-off fetches are needed (first pass only), the information is stored in this object WikiData.prototype.initAfterLoad = function (pQuery) { /***************************        * Siteinfo Data ***************************/       if (this.needsSiteinfoData && !!pQuery.general) { this.needsSiteinfoData = false; this.server = pQuery.general.server || ("//" + this.servername); this.articlepath = this.server + pQuery.general.articlepath.replace("$1", ""); if (this.articlepath.indexOf("?") > -1) { this.firstSeperator = "&"; }           this.sitename = pQuery.general.sitename; this.mainpage = pQuery.general.mainpage; this.mwversion = pQuery.general.generator; if (this.favicon == null) { // Requires MediaWiki V1.23+ if (pQuery.general.favicon) { this.favicon = pQuery.general.favicon; // It SHOULD be an absoule link, but encase it isn't... (at least one case found where it wasn't)                   if (this.favicon.indexOf("http") != 0 && this.favicon.indexOf("//") != 0) { this.favicon = this.server + "/" + this.favicon; }               }                else if (!!pQuery.pages) { var tPageID; for (tPageID in pQuery.pages) break; // A trick to get the one (and only) page entry in the object if (pQuery.pages[tPageID] && pQuery.pages[tPageID].imageinfo) { this.favicon = pQuery.pages[tPageID].imageinfo[0].url; }               }            }            this.namespaces = pQuery.namespaces || {}; this.statistics = pQuery.statistics || {}; if (!!pQuery.variables) { // This is only for Wikia wikis. Other wikis can ignore this. var wgCityIdObj = $.grep(pQuery.variables, function (o) { return o.id === "wgCityId"; })[0]; if (wgCityIdObj) { this.wikiaCityID = wgCityIdObj["*"]; }               else { this.usesWikiaDiscussions = false; }           }        }        /***************************         * User Data ***************************/       if (this.needsUserData && !!pQuery.users) { this.needsUserData = false; this.user.hasBlockRight = false; this.user.hasUndeleteRight = false; this.user.hasRollbackRight = false; for (var i in pQuery.users[0].rights) { if (pQuery.users[0].rights[i] == "block") { this.user.hasBlockRight = true; }               if (pQuery.users[0].rights[i] == "undelete") { this.user.hasUndeleteRight = true; }               else if (pQuery.users[0].rights[i] == "rollback") { this.user.hasRollbackRight = true; }           }        }        /***************************         * Favicon fallback - may not be needed now with "pQuery.pages" backup. ***************************/       if (this.favicon == null) { this.favicon = ConstantsApp_1["default"].FAVICON_BASE + this.servername; }       return this; };   WikiData.prototype.setupRcParams = function  { this.rcParams = $.extend({}, this.manager.rcParamsBase); // Make a shallow copy if (Object.keys(this.manager.optionsNode.rcParams).length > 0) { this.rcParams = $.extend(this.rcParams, this.manager.optionsNode.rcParams); }       if (this.rcParamsBase != null) { this.rcParams = $.extend(this.rcParams, this.rcParamsBase); }       // if(this.rcParams == this.manager.rcParamsBase) { // 	this.rcParams = this.manager.rcParams; // The manager's RC params are valid if no changes more specific than it exist. // } else { this.rcParams.paramString = this.createRcParamsString(this.rcParams); this.rcParams = $.extend(this.manager.getDefaultRCParams, this.rcParams); // }       if (!this.lastChangeDate) { this.lastChangeDate = this.getEndDate; this.lastDiscussionDate = this.getEndDate; }   };    // Get the string for use with Special:RecentChanges link for this wiki. // Don't pass in params with "default" values included, or the link will have them all specified. WikiData.prototype.createRcParamsString = function (pParams) { var tArray = []; $.each(pParams, function (tKey, tVal) {           if (tKey != "paramString") {                if (tVal === true) {                    tVal = "1";                }                if (tVal === false) {                    tVal = "0";                }                tArray.push(tKey + "=" + tVal);            }        }); return tArray.join("&"); };   // Since both initListData and initSiteinfo can set the wiki's favicon, set default favicon if none set WikiData.prototype.getFaviconHTML = function (pOpenInfoBanner) { if (pOpenInfoBanner === void 0) { pOpenInfoBanner = false; } var html = "<img src='" + this.favicon + "' title='" + this.sitename + "' width='16' height='16' />"; if (pOpenInfoBanner) { html = "<span class='rcm-favicon-goto-button' data-infoid='" + this.infoID + "'>" + html + " "; }       return html; };   WikiData.prototype.getEndDate = function  { var tDate = new Date; //this.rcParams.from ? new Date(this.rcParams.from) : new Date; tDate.setDate(tDate.getDate - this.rcParams.days); return tDate; };   // Get user CSS classes as a string. WikiData.prototype.getUserClass = function (pUser) { if (this.manager.extraLoadingEnabled) { pUser = pUser.replace(/_/g, " "); if (this.users[pUser]) { return this.users[pUser].getClassNames; }           else { if (this.usersNeeded.indexOf(pUser) == -1) this.usersNeeded.push(pUser); return "rcm-user-needed"; }       }        return ""; };   // Get the correspondering dataset for user class. WikiData.prototype.getUserClassDataset = function (pUser) { return "data-username=\"" + pUser.replace(/"/g, "&quot;") + "\"";   };    WikiData.prototype.checkForSecondaryLoading = function  {        var _this = this;        var tUrl = this.getUsersApiUrl;        if (tUrl) {            this.manager.secondaryWikiData.push({                url: tUrl,                callback: function (data) {                    data.query.users.forEach(function (user, i) {                        var username = user.name;                        if (user.invalid === "" || user.missing === "") {                            Utils_1["default"].removeFromArray(_this.usersNeeded, username);                            return;                        }                        // Keep track of data for future use.                        _this.users[username] = new UserData_1["default"](_this, _this.manager).init(user);                        Utils_1["default"].removeFromArray(_this.usersNeeded, username); // Update data on the page. var tNeededClass = "rcm-user-needed"; var tUserNodes = _this.manager.resultsNode.querySelectorAll("." + _this.rcClass + " ." + tNeededClass + "[data-username=\"" + username.replace(/"/g, '&quot;') + "\"]");                       // loop through them and add classes                        Utils_1["default"].forEach(tUserNodes, function (pUserNode) {                            pUserNode.className += " " + _this.users[username].getClassNames;                            pUserNode.classList.remove(tNeededClass);                        });                        // TODO: Add classes directly to anchor? or always put a wrapper and add "username" class?                    });                }            });        }    };    WikiData.prototype.updateLastChangeDate = function (pData) {        this.lastChangeDate = new Date(pData.timestamp);        // Add 1 millisecond to avoid getting this change again.        this.lastChangeDate.setSeconds(this.lastChangeDate.getSeconds + 1); this.lastChangeDate.setMilliseconds(1); //this.lastChangeDate.setMilliseconds(this.lastChangeDate.getMilliseconds+1001); };   WikiData.prototype.updateLastDiscussionDate = function (pData) { var tSecond = (pData.modificationDate || pData.creationDate).epochSecond; this.lastDiscussionDate = new Date(0); // Add 1 millisecond to avoid getting this change again. this.lastDiscussionDate.setUTCSeconds(tSecond); this.lastDiscussionDate.setUTCMilliseconds(1); };   // For retrieving 1-off wiki specific info (some of which is required to know before fetching changes) WikiData.prototype.getWikiDataApiUrl = function { if (!this.needsSiteinfoData || !this.needsUserData) { return null; }       var tReturnText = this.scriptpath + "/api.php?action=query&format=json&continue="; // don't assume http:// or https:// var tUrlList = []; var tMetaList = []; var tPropList = []; /***************************       * Siteinfo Data - https://www.mediawiki.org/wiki/API:Siteinfo * Get the site info (Once per RCMManager) ***************************/       tMetaList.push("siteinfo"); tReturnText += "&siprop=" + ["general", "namespaces", "statistics", "variables"].join("|"); /***************************       * Imageinfo Data - https://www.mediawiki.org/wiki/API:Imageinfo * Get favicon url for wiki (needed for wikis below V1.23 [Added to siteinfo at that point]) (Once per RCMManager) ***************************/       tPropList.push("imageinfo"); tReturnText += "&iiprop=url&titles=File:Favicon.ico"; /***************************       * User Data - https://www.mediawiki.org/wiki/API:Users * If user logged in / set, get info for this wiki (Once per RCMManager) ***************************/       if (this.username) { tUrlList.push("users"); tReturnText += "&ususers=" + this.username + "&usprop=rights"; }       else { this.needsUserData = false; }       /***************************        * Finish building url ***************************/       if (tUrlList.length > 0) { tReturnText += "&list=" + tUrlList.join("|"); }       if (tMetaList.length > 0) { tReturnText += "&meta=" + tMetaList.join("|"); }       if (tPropList.length > 0) { tReturnText += "&prop=" + tPropList.join("|"); }       tReturnText.replace(/ /g, "_"); tMetaList = null; tPropList = null; mw.log("[WikiData](getWikiDataApiUrl)", "http:" + tReturnText.replace("&format=json", "&format=jsonfm")); return tReturnText; };   // Gets URL for the Wikia discussions API; // https://github.com/Wikia/app/blob/b03df0a89ed672697e9c130d529bf1eb25f49cda/lib/Swagger/src/Discussion/Api/PostsApi.php WikiData.prototype.getWikiDiscussionUrl = function { // Get results up to this time stamp. var tEndDate = this.lastDiscussionDate; //this.getEndDate; var tLimit = this.rcParams.limit < 50 ? this.rcParams.limit : 50; // 50 is the limit, but fetch less if there are less. var tReturnText = "https://services.wikia.com/discussion/" + this.wikiaCityID + "/posts?limit=" + tLimit + "&page=0&since=" + tEndDate.toISOString + "&responseGroup=small&reported=false&viewableOnly=" + !this.user.hasBlockRight; mw.log("[WikiData](getWikiDiscussionUrl) " + tReturnText); return tReturnText; };   WikiData.prototype.getUsersApiUrl = function  { if (this.usersNeeded.length > 0) { return UserData_1["default"].getUsersApiUrl(this.usersNeeded, this.scriptpath); }       return null; };   // Returns the url to the Api, which will return the Recent Changes for the wiki (as well as Siteinfo if needed) // https://www.mediawiki.org/wiki/API:RecentChanges WikiData.prototype.getApiUrl = function { var tReturnText = this.scriptpath + "/api.php?action=query&format=json&continue="; // don't assume http:// or https:// var tUrlList = []; var tMetaList = []; var tPropList = []; // Get results up to this time stamp. var tEndDate = this.lastChangeDate; //this.getEndDate; /***************************       * Recent Changes Data - https://www.mediawiki.org/wiki/API:RecentChanges ***************************/       tUrlList.push("recentchanges"); tReturnText += "&rcprop=" + WikiData.RC_PROPS; // What data to retrieve. // How many results to retrieve tReturnText += "&rclimit=" + this.rcParams.limit; tReturnText += "&rcend=" + tEndDate.toISOString; var tRcShow = []; if (this.rcParams.hideminor) { tRcShow.push("!minor"); }       if (this.rcParams.hidebots) { tRcShow.push("!bot"); }       if (this.rcParams.hideanons) { tRcShow.push("!anon"); }       if (this.rcParams.hideliu) { tRcShow.push("anon"); } // Hide users tReturnText += "&rcshow=" + tRcShow.join("|"); tRcShow = null; var tRcType = ["edit", "new"]; // external if (this.rcParams.hidelogs == false) { tRcType.push("log"); }       tReturnText += "&rctype=" + tRcType.join("|"); tRcType = null; // Only one user can be excluded like this (so any additional ones will still have to be done manually), but might as well take advantage of it. var tUser = null; if (this.rcParams.hidemyself && this.username) { tUser = this.username; }       else if (this.manager.hideusers.length > 0) { tUser = this.manager.hideusers[0]; }       else if (this.hideusers) { tUser = this.hideusers[0]; }       if (tUser != null) { tReturnText += "&rcexcludeuser=" + tUser; }       if (this.rcParams.namespace || this.rcParams.namespace === "0") { tReturnText += "&rcnamespace=" + this.rcParams.namespace; // Already separated by "|" }       /***************************        * Log Event Data - https://www.mediawiki.org/wiki/API:Logevents * Get info for logs that don't return all necessary info through "Recent Changes" api. * To avoid a second loading sequence, we load logs up to same limit / timestamp at "Recent Changes" api (since it's the best we can assume). ***************************/       if (this.useOutdatedLogSystem) { tUrlList.push("logevents"); tReturnText += "&leprop=" + ["details", "user", "title", "timestamp", "type", "ids"].join("|"); tReturnText += "&letype=" + ["rights", "move", "delete", "block", "merge"].join("|"); // How many results to retrieve tReturnText += "&lelimit=" + this.rcParams.limit; tReturnText += "&leend=" + tEndDate.toISOString; }       /***************************        * Finish building url ***************************/       tReturnText += "&list=" + tUrlList.join("|"); if (tMetaList.length > 0) { tReturnText += "&meta=" + tMetaList.join("|"); }       if (tPropList.length > 0) { tReturnText += "&prop=" + tPropList.join("|"); }       tReturnText.replace(/ /g, "_"); tUrlList = null; tMetaList = null; tPropList = null; tEndDate = null; mw.log("[WikiData](getApiUrl)", "http:" + tReturnText.replace("&format=json", "&format=jsonfm")); return tReturnText; };   // Static Constants // What data is to be retrieved for each recent change. WikiData.RC_PROPS = ["user", "flags", "title", "ids", "sizes", "timestamp", "loginfo", "parsedcomment", "comment"].join("|"); // patrolled return WikiData; }); Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = WikiData;

},{"./ConstantsApp":1,"./UserData":11,"./Utils":12,"./i18n":14}],14:[function(require,module,exports){ "use strict"; var ConstantsApp_1 = require("./ConstantsApp"); var $ = window.jQuery; var mw = window.mediaWiki; var i18n = function (pKey) { var pArgs = []; for (var _i = 1; _i < arguments.length; _i++) { pArgs[_i - 1] = arguments[_i]; }   var tText = i18n.TEXT[pKey] || i18n.MESSAGES[pKey]; if (tText == undefined) { mw.log("[RecentChangesMultiple.i18n] '" + pKey + "' is undefined."); return pKey; }   return i18n.wiki2html.apply(i18n, [tText].concat(pArgs)); }; i18n.defaultLang = "en"; i18n.init = function (pLang) { // Set default lang for script i18n.defaultLang = pLang ? pLang.toLowerCase : ConstantsApp_1["default"].config.wgUserLanguage; // split("-") checks for the "default" form of a language encase the specialized version isn't available for TEXT (ex: zh and zh-tw) i18n.TEXT = $.extend(i18n.TEXT.en, i18n.TEXT[i18n.defaultLang] || i18n.TEXT[i18n.defaultLang.split("-")[0]]); mw.language.setData(ConstantsApp_1["default"].config.wgUserLanguage, i18n.TEXT.mwLanguageData); // Gets mw.language.convertPlural to work. }; // Big thanks to wlb.wikia.com for translations. i18n.TEXT = { en: { // Errors 'rcm-error-linkformat': "'$1' is an incorrect format. Please do not include 'http://' or anything after the domain, including the first '/'.", 'rcm-error-loading-syntaxhang': "Error loading [$1] ($2 tries). Please correct syntax (or refresh script to try again).", 'rcm-error-loading-connection': "Error loading [$1] ($2 tries). Most likely a connection issue; refresh script to try again.", 'rcm-error-trymoretimes': "Try $1 more times", // Notifications 'rcm-loading': "Loading/Sorting...", 'rcm-refresh': "Refresh", 'rcm-download-timestamp': "Recent Changes downloaded at: $1", 'rcm-download-changesadded': " - [$1 Recent Changes added]", // Basics 'rcm-wikisloaded': "Wikis Loaded: ", 'rcm-previouslyloaded': "Previously loaded:", 'rcm-nonewchanges': "No new changes", 'rcm-autorefresh': "Auto Refresh", 'rcm-autorefresh-tooltip': "Automatically refreshes Recent Changes every $1 seconds", 'rcm-footer': "Version $1 by $2", // Options Panel 'rcm-optionspanel-hideusersoverride': "data-hideusers overrides this.", 'rcm-optionspanel-savewithcookie': "Save options with cookie", // Modules 'rcm-module-diff-title': "Diff Viewer", 'rcm-module-diff-open': "Open diff", 'rcm-module-diff-undo': "Undo edit", // Other 'rcm-unknownthreadname': "thread", /***************************        * mediawiki.language.data - found by finding [ mw.loader.implement("mediawiki.language.data" ] in the page source. If not found may be cached, so visit page using a "private / incognito" window.         ***************************/        mwLanguageData: {            "digitTransformTable": null,            "separatorTransformTable": null,            "grammarForms": [],            "pluralRules": ["i = 1 and v = 0 @integer 1"],            "digitGroupingPattern": null,            "fallbackLanguages": []        },    },    be: {        // Errors        'rcm-error-linkformat': "'$1' паказаны ў няздатным фармаце. Калі ласка, не выкарыстоўвайце элемент 'http://', не ўстаўляйце нічога пасля яго і першага '/'.",        'rcm-error-loading-syntaxhang': "Памылка пры загрузцы [$1] (спроб: $2) Калі ласка, выпраўце сінтаксіс (або абновіце скрыпт, каб паспрабаваць зноў).", 'rcm-error-loading-connection': "Памылка пры загрузцы [$1] (спроб: $2). Хутчэй за ўсе, гэта памылка з падключэннем, абновіце скрыпт, каб паспрабаваць зноў.", 'rcm-error-trymoretimes': "Паспрабуйце $1 раз(а)", // Notifications 'rcm-loading': "Загрузка/Сартаванне...", 'rcm-refresh': "Абнавіць", 'rcm-download-timestamp': "Апошнія змены ўзятыя з: $1", 'rcm-download-changesadded': " - [$1 апошніх дададзеных змяненняў]", // Basics 'rcm-wikisloaded': "Загружаныя вікі: ", 'rcm-previouslyloaded': "Раней загружаныя:", 'rcm-nonewchanges': "Няма новых зменаў", 'rcm-autorefresh': "Аўтаматычнае абнаўленне", 'rcm-autorefresh-tooltip': "Аўтаматычнае абнаўленне апошніх змяненняў кожныя $1 секунд", 'rcm-footer': "Версія $1, створаная $2", // Options Panel // 'rcm-optionspanel-hideusersoverride': "data-hideusers вызначаюцца так.", 'rcm-optionspanel-savewithcookie': "Захаваць змены ў Cookie", // Modules 'rcm-module-diff-title': "Папярэдні прагляд змяненняў", 'rcm-module-diff-open': "Паказаць змены", 'rcm-module-diff-undo': "Адмяніць змены", // Other 'rcm-unknownthreadname': "тэма", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": { ",": " ",               ".": ","            },            "grammarForms": { "родны": { "ВікіВіды": "ВікіВідаў", "ВікіКнігі": "ВікіКніг", "Вікікрыніцы": "Вікікрыніц", "ВікіНавіны": "ВікіНавін", "Вікіслоўнік": "Вікіслоўніка", "Вікіпедыя": "Вікіпедыі" },               "вінавальны": { "Вікіпедыя": "Вікіпедыю" },               "месны": { "ВікіВіды": "ВікіВідах", "ВікіКнігі": "ВікіКнігах", "Вікікрыніцы": "Вікікрыніцах", "ВікіНавіны": "ВікіНавінах", "Вікіслоўнік": "Вікіслоўніку", "Вікіпедыя": "Вікіпедыі" }           },            "pluralRules": [ "n % 10 = 1 and n % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 1.0, 21.0, 31.0, 41.0, 51.0, 61.0, 71.0, 81.0, 101.0, 1001.0, …", "n % 10 = 2..4 and n % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, … @decimal 2.0, 3.0, 4.0, 22.0, 23.0, 24.0, 32.0, 33.0, 102.0, 1002.0, …", "n % 10 = 0 or n % 10 = 5..9 or n % 100 = 11..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"], "digitGroupingPattern": null, "fallbackLanguages": ["en"] },   },    ca: { // Errors 'rcm-error-linkformat': "'$1' és un format incorrecte. Si us plau, no afegeixis 'http://' o alguna cosa darrere del domini, incloent el primer '/'.", 'rcm-error-loading-syntaxhang': "Error de càrrega [$1] ($2 intents). Si us plau, corregeix les teves sintaxis (o recarrega el teu script i intenta-ho un altre cop).", 'rcm-error-loading-connection': "Error de càrrega [$1] ($2 intents). A causa d'un error de connexió, has de recarregar el teu script i intenta-ho un altre cop.", 'rcm-error-trymoretimes': "Intenta-ho $1 més vegades", // Notificacions 'rcm-loading': "Carregant/Classificant…", 'rcm-refresh': "Actualització", 'rcm-download-timestamp': "Canvis recents baixats a: $1", 'rcm-download-changesadded': " - [$1 Canvis recents afegits]", // Bàsics 'rcm-wikisloaded': "Wikis carregats: ", 'rcm-previouslyloaded': "Breument carregats:", 'rcm-nonewchanges': "No hi ha nous canvis", 'rcm-autorefresh': "Actualització automàtica", 'rcm-autorefresh-tooltip': "Recarrega automàticament els canvis recents cada $1 segons", 'rcm-footer': "Versió $1 de $2", // Panell d'opcions 'rcm-optionspanel-hideusersoverride': "data-hideusers overrides this.", 'rcm-optionspanel-savewithcookie': "Guarda els canvis pel cookie", // Mòduls 'rcm-module-diff-title': "Visualitzador de pàgina", 'rcm-module-diff-open': "Obre la pàgina", 'rcm-module-diff-undo': "Desfés el canvi", // Altres 'rcm-unknownthreadname': "tema", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": { ",": ".",               ".": ","            },            "grammarForms": [], "pluralRules": ["i = 1 and v = 0 @integer 1"], "digitGroupingPattern": null, "fallbackLanguages": ["en"] },   },    de: { 'rcm-error-linkformat': "'$1' ist ein fehlerhaftes Format. Bitte füge nicht 'http://' oder Weiteres nach der Domain ein. Dies gilt auch für das erste '/'.", 'rcm-error-loading-syntaxhang': "Ladefehler [$1] ($2 Versuche). Bitte korrigiere den Syntax (oder aktualisiere das Script, um es erneut zu versuchen).", 'rcm-error-loading-connection': "Ladefehler [$1] ($2 Versuche). Höchstwahrscheinlich ein Verbindungsproblem; Lade das Script neu, um es erneut zu versuchen.", 'rcm-error-trymoretimes': "Versuche $1 mehrmals", 'rcm-loading': "Lade/Sortiere...", 'rcm-refresh': "Aktualisieren", 'rcm-download-timestamp': "Letzte Veränderungen nach: $1", 'rcm-download-changesadded': " - [$1 Letzte Änderungen, die hinzugefügt wurden]", 'rcm-wikisloaded': "Geladene Wikis: ", 'rcm-previouslyloaded': "Bisher geladen:", 'rcm-nonewchanges': "Keine neuen Veränderungen", 'rcm-autorefresh': "Auto-Aktualisierung", 'rcm-autorefresh-tooltip': "Aktualisiert automatisch die letzten Veränderungen jede $1 Sekunden", 'rcm-footer': "Version $1 bis $2", 'rcm-optionspanel-hideusersoverride': "data-hideusers überschreibt dies.", 'rcm-optionspanel-savewithcookie': "Speicher Veränderungen mit Cookie", 'rcm-module-diff-title': "Anderer Viewer", 'rcm-module-diff-open': "Öffne Veränderung", 'rcm-module-diff-undo': "Rückgängig", 'rcm-unknownthreadname': "Thread", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": { ",": ".",               ".": ","            },            "grammarForms": [], "pluralRules": ["i = 1 and v = 0 @integer 1"], "digitGroupingPattern": null, "fallbackLanguages": ["en"] },   },    es: { // Errors 'rcm-error-linkformat': "'$1' es un formato incorrecto. Por favor no incluyas 'http://' o cualquier cosa después, incluyendo el primer '/'.", 'rcm-error-loading-syntaxhang': "Error cargando [$1] ($2 intentos). Por favor corrige la sintaxis (o recarga el script para intentarlo otra vez).", 'rcm-error-loading-connection': "Error cargando [$1] ($2 intentos). Seguramente sea un problema de conexión; recarga el script para intentarlo otra vez.", 'rcm-error-trymoretimes': "Inténtalo $1 veces más", // Notifications 'rcm-loading': "Cargando/Clasificando...", 'rcm-refresh': "Recargar", 'rcm-download-timestamp': "Cambios recientes descargados en: $1", 'rcm-download-changesadded': " - [$1 Cambios Recientes añadidos]", // Basics 'rcm-wikisloaded': "Wikis Cargados: ", 'rcm-previouslyloaded': "Previamente cargados:", 'rcm-nonewchanges': "No hay nuevos cambios", 'rcm-autorefresh': "Auto Recargar", 'rcm-autorefresh-tooltip': "Recarga los Cambios Recientes automáticamente cada $1 segundos", 'rcm-footer': "Versión $1 por $2", // Options Panel // 'rcm-optionspanel-hideusersoverride': "data-hideusers overrides this.", // 'rcm-optionspanel-savewithcookie': "Save changes with cookie", // Modules 'rcm-module-diff-title': "Visor de cambios", 'rcm-module-diff-open': "Abrir cambio", 'rcm-module-diff-undo': "Deshacer edición", // Other 'rcm-unknownthreadname': "hilo", /***************************        * mediawiki.language.data - found by finding [ mw.loader.implement("mediawiki.language.data" ] in the page source. If not found may be cached, so visit page using a "private / incognito" window.         ***************************/        mwLanguageData: {            "digitTransformTable": null,            "separatorTransformTable": null,            "grammarForms": [],            "pluralRules": ["i = 1 and v = 0 @integer 1"],            "digitGroupingPattern": null,            "fallbackLanguages": []        },    },    gl: {        // Erros        'rcm-error-linkformat': "'$1' é un formato incorrecto. Por favor, non tes que engadir 'http://' ou algunha cousa despois do dominio, incluíndo o primeiro '/'.",        'rcm-error-loading-syntaxhang': "Erro de carregamento [$1] ($2 tentativas). Por favor, corrixe as túas sintaxes (ou recarrega o teu script e téntao novamente).", 'rcm-error-loading-connection': "Erro de carregamento [$1] ($2 tentativas). Debido a un erro de conexión, tes de recarregar o teu script e téntao novamente.", 'rcm-error-trymoretimes': "Téntao $1 máis veces", // Notificacións 'rcm-loading': "A cargar/A clasificar…", 'rcm-refresh': "Actualización", 'rcm-download-timestamp': "Cambios recentes baixados en: $1", 'rcm-download-changesadded': " - [$1 Cambios recentes engadidos]", // Básicos 'rcm-wikisloaded': "Wikis cargados: ", 'rcm-previouslyloaded': "Brevemente cargados:", 'rcm-nonewchanges': "Non hai novos cambios", 'rcm-autorefresh': "Actualización automática", 'rcm-autorefresh-tooltip': "Recarregar automaticamente os cambios recentes cada $1 segundos", 'rcm-footer': "Versión $1 de $2", // Panel de opcións 'rcm-optionspanel-hideusersoverride': "data-hideusers overrides this.", 'rcm-optionspanel-savewithcookie': "Gardar cambios polo cookie", // Módulos 'rcm-module-diff-title': "Visualizador de páxina", 'rcm-module-diff-open': "Abrir páxina", 'rcm-module-diff-undo': "Desfacer cambio", // Outros 'rcm-unknownthreadname': "tópico", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": { ",": ".",               ".": ","            },            "grammarForms": [], "pluralRules": ["i = 1 and v = 0 @integer 1"], "digitGroupingPattern": null, "fallbackLanguages": ["pt", "en"] },   },    it: { // Errori 'rcm-errore-linkformat': "'$1' non è in un formato corretto. Per favore, non includere 'http://' o qualsiasi altra cosa dopo il dominio, compreso la prima '/'.", 'rcm-Errore-loading-syntaxhang': "Errore caricando [$1] ($2 tentativi). Per favore, correggi la tua sintassi (o ricarica il tuo script per riprovare).", 'rcm-Errore-loading-connection': "Errore caricando [$1] ($2 tentativi). Quasi sicuramente si tratta di un problema di connessione; ricarica lo script per riprovare.", 'rcm-Errore-trymoretimes': "Prova $1 volte ancora", // Notifiche 'rcm-loading': "Caricando / Ordinando...", 'rcm-refresh': "Ricarica", 'rcm-download-timestamp': "Ultime Modifiche scaricate alle: $1", 'rcm-download-changesadded': " - [$1 Ultime Modifiche aggiunte]", // Base 'rcm-wikisloaded': "Wiki caricate:", 'rcm-previouslyloaded': "Precedentemente caricate:", 'rcm-nonewchanges': "Non ci sono nuove modifiche", 'rcm-autorefresh': "Aggiornamento automatico", 'rcm-autorefresh-tooltip': "Ricarica automaticamente le Ultime Modifihce ogni $1 secondi", 'rcm-footer': "Versione $1 ad opera di $2", // Opzioni 'rcm-optionspanel-hideusersoverride': "data-hideusers sovrascrive questo.", 'rcm-optionspanel-savewithcookie': "Salvare modifiche con un cookie", // Moduli 'rcm-module-diff-title': "Visualizzazione cambiamenti", 'rcm-module-diff-open': "Apri il confronto delle versioni", 'rcm-module-diff-undo': "Annulla modifica", // Altri 'rcm-unknownthreadname': "Conversazione", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": { ",": " ",               ".": ","            },            "grammarForms": [], "pluralRules": ["i = 1 and v = 0 @integer 1"], "digitGroupingPattern": null, "fallbackLanguages": ["en"] },   },    ja: { 'rcm-error-linkformat': "'$1' は表記に誤りがあります. 'http://' や、'/'を含むドメイン名以降の部分を含めずに指定してください. ", 'rcm-error-loading-syntaxhang': "($2回試しましたが) [$1]の読み込みに失敗しました. （再更新してみるか、）設定を修正してください. ", 'rcm-error-loading-connection': "($2回試しましたが) [$1]の読み込みに失敗しました. 接続に失敗した可能性があります. 再更新してください. ", 'rcm-error-trymoretimes': "もう$1回お試しください", 'rcm-loading': "読込・整列中...", 'rcm-refresh': "更新", 'rcm-download-timestamp': "$1時点の最近の更新を表示中", 'rcm-download-changesadded': " - [$1件の最近の更新が追加されました]", 'rcm-wikisloaded': "対象のWikiaコミュニティ: ", 'rcm-previouslyloaded': "前回との変更点:", 'rcm-nonewchanges': "新しい変更はありません", 'rcm-autorefresh': "自動更新", 'rcm-autorefresh-tooltip': "$1秒おきに情報を自動更新します", 'rcm-footer': "Version $1 (編集者は$2)", 'rcm-optionspanel-hideusersoverride': "data-hideusersの設定によって無効にされています", 'rcm-optionspanel-savewithcookie': "クッキーに変更を保存する", 'rcm-module-diff-title': "差分を表示", 'rcm-module-diff-open': "差分を別のページで表示", 'rcm-module-diff-undo': "編集を取り消す", 'rcm-unknownthreadname': "無題", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": null, "grammarForms": [], "pluralRules": ["i = 1 and v = 0 @integer 1"], "digitGroupingPattern": null, "fallbackLanguages": ["en"] },   },    nl: { 'rcm-error-linkformat': "'$1' is een onjuist formaat. Gelieve niet 'http://' of iets anders na het domein, inclusief de eerste '/' bij te voegen.", 'rcm-error-loading-syntaxhang': "Fout bij het laden van [$1] ($2 pogingen). Corrigeer de syntax (of ververs het script om opnieuw te proberen).", 'rcm-error-loading-connection': "Fout bij het laden van [$1] ($2 pogingen). Hoogstwaarschijnlijk een verbindingsprobleem; ververs het script om opnieuw te proberen.", 'rcm-error-trymoretimes': "Probeer het $1 keer meer", 'rcm-loading': "Laden/Sorteren...", 'rcm-refresh': "Verversen", 'rcm-download-timestamp': "Recente Wijzigingen gedownload van: $1", 'rcm-download-changesadded': " - [$1 Recente Wijzigingen toegevoegd]", 'rcm-wikisloaded': "Wiki's geladen: ", 'rcm-previouslyloaded': "Eerder geladen:", 'rcm-nonewchanges': "Geen nieuwe wijzigingen", 'rcm-autorefresh': "Auto Verversen", 'rcm-autorefresh-tooltip': "Automatisch Recente Wijzigingen elke $1 seconden verversen", 'rcm-footer': "Versie $1 door $2", 'rcm-optionspanel-hideusersoverride': "data-hideusers overschrijft dit.", 'rcm-optionspanel-savewithcookie': "Sla wijzigingen op met een cookie", 'rcm-module-diff-title': "Toon wijz", 'rcm-module-diff-open': "Open wijz", 'rcm-module-diff-undo': "Bewerking ongedaan maken", 'rcm-unknownthreadname': "draad", /***************************        * mediawiki.language.data - found by finding [ mw.loader.implement("mediawiki.language.data" ] in the page source. If not found may be cached, so visit page using a "private / incognito" window.         ***************************/        mwLanguageData: {            "digitTransformTable": null,            "separatorTransformTable": { ",": ".", ".": "," },            "grammarForms": [],            "pluralRules": ["i = 1 and v = 0 @integer 1"],            "digitGroupingPattern": null,            "fallbackLanguages": ["en"]        },    },    oc: {        // Errors        'rcm-error-linkformat': "'$1' es un format incorrècte. Se vos plai, apondètz pas 'http://' o quicòm darrièr del domeni, en comprenent lo primièr '/'.",        'rcm-Error-loading-syntaxhang': "Error de carga [$1] ($2 assages). Se vos plai, corregissètz las vòstras sintaxis (o recarga lo vòstre script e ensaja-o un autre còp).", 'rcm-Error-loading-connection': "Error de carga [$1] ($2 assages). A causa d'un error de connexion, te cal recargar lo tieu script e ensaja-o un autre còp.", 'rcm-Error-trymoretimes': "Ensaja-o $1 mai de còps", // Notificacions 'rcm-loading': "En cargant/En classificant…", 'rcm-refresh': "Actualizacion", 'rcm-download-timestamp': "Cambiaments recents davalats sus: $1", 'rcm-download-changesadded': " - [$1 Cambiaments recents apondis]", // Basics 'rcm-wikisloaded': "Wikis cargats: ", 'rcm-previouslyloaded': "Brèvament cargats:", 'rcm-nonewchanges': "I a pas de nòus cambiaments", 'rcm-autorefresh': "Actualizacion automatica", 'rcm-autorefresh-tooltip': "Recargatz automaticament los cambiaments recents cada $1 segon", 'rcm-footer': "Version $1 de $2", // Panèl d'opcions 'rcm-optionspanel-hideusersoverride': "data-hideusers overrides this.", 'rcm-optionspanel-savewithcookie': "Gardatz los cambiaments pel cookie", // Moduls 'rcm-module-diff-title': "Visualitzador de pagina", 'rcm-module-diff-open': "Dobrissètz la pagina", 'rcm-module-diff-undo': "Desfasètz lo cambiament", // Autras 'rcm-unknownthreadname': "tèma", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": { ",": " ",               ".": ","            },            "grammarForms": [], "pluralRules": ["i = 1 and v = 0 @integer 1"], "digitGroupingPattern": null, "fallbackLanguages": ["en"] },   },    pl: { // Errors 'rcm-error-linkformat': "'$1' to nieodpowiedni format. Proszę nie używać elementu 'http://', niczego po nim oraz pierwszego '/'.", 'rcm-error-loading-syntaxhang': "Błąd podczas wczytywania [$1] (prób: $2) Proszę poprawić syntax (lub odświeżyć skrypt by spróbować ponownie).", 'rcm-error-loading-connection': "Błąd podczas wczytywania [$1] (prób: $2). Najprawdopodobniej jest to błąd z połączeniem, odśwież skrypt by spróbować ponownie.", 'rcm-error-trymoretimes': "Spróbuj $1 razy", // Notifications 'rcm-loading': "Ładowanie/Sortowanie...", 'rcm-refresh': "Odśwież", 'rcm-download-timestamp': "Ostatnie zmiany pobrane o: $1", 'rcm-download-changesadded': " - [$1 dodanych ostatnich zmian]", // Basics 'rcm-wikisloaded': "Załadowane wiki: ", 'rcm-previouslyloaded': "Poprzednio załadowane:", 'rcm-nonewchanges': "Brak nowych zmian", 'rcm-autorefresh': "Automatyczne odświeżanie", 'rcm-autorefresh-tooltip': "Automatyczne odświeżanie ostatnich zmian co każde $1 sekund", 'rcm-footer': "Wersja $1 stworzona przez $2", // Options Panel // 'rcm-optionspanel-hideusersoverride': "data-hideusers overrides this.", 'rcm-optionspanel-savewithcookie': "Zapisz zmiany w pamięci podręcznej", // Modules 'rcm-module-diff-title': "Podgląd zmian", 'rcm-module-diff-open': "Pokaż zmiany", 'rcm-module-diff-undo': "Cofnij zmiany", // Other 'rcm-unknownthreadname': "wątek", /***************************        * mediawiki.language.data - found by finding [ mw.loader.implement("mediawiki.language.data" ] in the page source. If not found may be cached, so visit page using a "private / incognito" window.         ***************************/        mwLanguageData: {            "digitTransformTable": null,            "separatorTransformTable": { ",": " ", ".": "," },            "grammarForms": [],            "pluralRules": ["i = 1 and v = 0 @integer 1", "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …", "v = 0 and i != 1 and i % 10 = 0..1 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 12..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …"],            "digitGroupingPattern": null,            "fallbackLanguages": ["en"]        },    },    pt: {        // Erros        'rcm-error-linkformat': "'$1' é um formato incorrecto. Por favor, não tens de acrescentar 'http://' ou alguma coisa depois do domínio, incluindo o primeiro '/'.",       'rcm-error-loading-syntaxhang': "Erro de carregamento [$1] ($2 tentativas). Por favor, corrige as tuas sintaxes (ou recarrega o teu script e tenta novamente).",       'rcm-error-loading-connection': "Erro de carregamento [$1] ($2 tentativas). Devido a um erro de conexão, tens de recarregar o teu script e tenta novamente.",       'rcm-error-trymoretimes': "Tenta $1 mais vezes",        // Notificações        'rcm-loading': "A carregar/A classificar…",        'rcm-refresh': "Actualização",        'rcm-download-timestamp': "Mudanças recentes baixadas em: $1",        'rcm-download-changesadded': " - [$1 Mudanças recentes acrescentadas]",        // Básicos        'rcm-wikisloaded': "Wikis carregados: ",        'rcm-previouslyloaded': "Brevemente carregados:",        'rcm-nonewchanges': "Não há novas mudanças",        'rcm-autorefresh': "Actualização automática",        'rcm-autorefresh-tooltip': "Recarregar automaticamente as mudanças recentes a cada $1 segundos",        'rcm-footer': "Versão $1 de $2",        // Painel de opções        'rcm-optionspanel-hideusersoverride': "data-hideusers overrides this.",        'rcm-optionspanel-savewithcookie': "Guardar mudanças pelo cookie", // Módulos 'rcm-module-diff-title': "Visualizador de página", 'rcm-module-diff-open': "Abrir página", 'rcm-module-diff-undo': "Desfazer mudança", // Outros 'rcm-unknownthreadname': "tópico", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": { ",": " ", ".": "," }, "grammarForms": [], "pluralRules": ["n = 0..2 and n != 2 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000"], "digitGroupingPattern": null, "fallbackLanguages": ["pt-br", "en"] },   },    "pt-br": { // Erros 'rcm-error-linkformat': "'$1' é um formato incorreto. Por favor, não inclua 'http://' ou alguma coisa depois do domínio, incluindo a primeira '/'.", 'rcm-error-loading-syntaxhang': "Erro de carregamento [$1] ($2 tentativas). Por favor, corrija as suas sintaxes (ou recarregue o seu script para tentar novamente).", 'rcm-error-loading-connection': "Erro de carregamento [$1] ($2 tentativas). Devido a um erro de conexão,; recarregue o seu script e tente novamente.", 'rcm-error-trymoretimes': "Tente $1 mais vezes", // Notificações 'rcm-loading': "Carregando/Classificando...", 'rcm-refresh': "Refresh", 'rcm-download-timestamp': "Mudanças recentes baixadas em: $1", 'rcm-download-changesadded': " - [$1 Mudanças recentes adicionadas]", // Básicos 'rcm-wikisloaded': "Wikias carregadas: ", 'rcm-previouslyloaded': "Brevemente carregadas:", 'rcm-nonewchanges': "Não há novas mudanças", 'rcm-autorefresh': "Auto refresh para atualizar automaticamente", 'rcm-autorefresh-tooltip': "Recarregar automaticamente as mudanças recentes a cada $1 segundos", 'rcm-footer': "Versão $1 de $2", // Painel de opções 'rcm-optionspanel-hideusersoverride': "data-hideusers o substitui", 'rcm-optionspanel-savewithcookie': "Salvar mudanças pelo cookie", // Modulos 'rcm-module-diff-title': "Visualizador de página", 'rcm-module-diff-open': "Abrir página", 'rcm-module-diff-undo': "Desfazer mudança", // Outros 'rcm-unknownthreadname': "tópico", /***************************        * mediawiki.language.data - found by finding [ mw.loader.implement("mediawiki.language.data" ] in the page source. If not found may be cached, so visit page using a "private / incognito" window.         ***************************/        mwLanguageData: {            "digitTransformTable": null,            "separatorTransformTable": { ",": " ", ".": "," },            "grammarForms": [],            "pluralRules": ["n = 0..2 and n != 2 @integer 0, 1 @decimal 0.0, 1.0, 0.00, 1.00, 0.000, 1.000, 0.0000, 1.0000"],            "digitGroupingPattern": null,            "fallbackLanguages": ["pt", "en"]        },    },    ro: {        // Erori        'rcm-eroare-linkformat': "'$1' este un format incorect. Te rog să nu incluzi 'http://' sau oricare lucru după aceea, incluzând primul '/'.",        'rcm-eroare-loading-syntaxhang': "Eroare încărcând [$1] ($2 încercări). Te rog să corectezi sintaxele (sau reîncărca-ţi script-ul pentru a încerca din nou).",       'rcm-eroare-loading-connection': "Eroare încărcând [$1] ($2 încercări). Cu siguranţă, este o problemă de conexiune; reîncărca-ţi script-ul pentru a încerca din nou.",       'rcm-eroare-trymoretimes': "Încearcă-l mai mult de $1 ori",        // Înştiinţări        'rcm-loading': "Încărcând/Clasificând…",        'rcm-refresh': "Reîncărcare",        'rcm-download-timestamp': "Schimburi recente descărcate pe: $1",        'rcm-download-changesadded': " - [$1 Schimburi recente adăugate]",        // Bazici        'rcm-wikisloaded': "Wiki-uri încărcate: ",        'rcm-previouslyloaded': "În prealabil încărcate:",        'rcm-nonewchanges': "Nu există noi schimburi",        'rcm-autorefresh': "Actualizare automată",        'rcm-autorefresh-tooltip': "Reîncărcaţi schimburile recente în mod automat fiecare $1 secunde",        'rcm-footer': "Versiune $1 de $2",        // Panou de opţiuni        // 'rcm-optionspanel-hideusersoverride': "data-hideusers overrides this.",        // 'rcm-optionspanel-savewithcookie': "Păstraţi schimburi dinspre cookie", // Module 'rcm-module-diff-title': "Vizualizatorul paginei", 'rcm-module-diff-open': "Deschideţi pagina", 'rcm-module-diff-undo': "Desfaceţi ediţia", // Mai mult 'rcm-unknownthreadname': "fir", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": { ",": ".", ".": "," }, "grammarForms": [], "pluralRules": ["i = 1 and v = 0 @integer 1", "v != 0 or n = 0 or n != 1 and n % 100 = 1..19 @integer 0, 2~16, 101, 1001, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …"], "digitGroupingPattern": null, "fallbackLanguages": ["en"] },   },    ru: { // Errors 'rcm-error-linkformat': "'$1' указан в неподходящем формате. Пожалуйста, не используйте элемент 'http://', не вставляйте ничего после него и первого '/'.", 'rcm-error-loading-syntaxhang': "Ошибка при загрузке [$1] (попыток: $2) Пожалуйста, исправьте синтаксис (или обновите скрипт, чтобы попытаться снова).", 'rcm-error-loading-connection': "Ошибка при загрузке [$1] (попыток: $2). Скорее всего, это ошибка с подключением, обновите скрипт, чтобы попробовать снова.", 'rcm-error-trymoretimes': "Попробуйте $1 раз(а)", // Notifications 'rcm-loading': "Загрузка/Сортировка...", 'rcm-refresh': "Обновить", 'rcm-download-timestamp': "Последние изменения взяты с: $1", 'rcm-download-changesadded': " - [$1 последних добавленных изменений]", // Basics 'rcm-wikisloaded': "Загруженные вики: ", 'rcm-previouslyloaded': "Ранее загруженные:", 'rcm-nonewchanges': "Нет новых изменений", 'rcm-autorefresh': "Автоматическое обновление", 'rcm-autorefresh-tooltip': "Автоматическое обновление последних изменений каждые $1 секунд", 'rcm-footer': "Версия $1, созданная $2", // Options Panel // 'rcm-optionspanel-hideusersoverride': "data-hideusers определяются так.", 'rcm-optionspanel-savewithcookie': "Сохранить изменения в Cookie", // Modules 'rcm-module-diff-title': "Предварительный просмотр изменений", 'rcm-module-diff-open': "Показать изменения", 'rcm-module-diff-undo': "Отменить изменения", // Other 'rcm-unknownthreadname': "тема", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": { ",": " ", ".": "," }, "grammarForms": [], "pluralRules": ["v = 0 and i % 10 = 1 and i % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …", "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …", "v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …"], "digitGroupingPattern": null, "fallbackLanguages": ["en"] },   },    uk: { // Errors 'rcm-error-linkformat': "'$1' вказаний в невідповідному форматі. Будь ласка, не використовуйте елемент 'http://', не вставляйте нічого після нього і першого '/'.", 'rcm-error-loading-syntaxhang': "Помилка при завантаженні [$1] (спроб: $2) Будь ласка, виправте синтаксис (або поновіть скрипт, щоб спробувати знову).", 'rcm-error-loading-connection': "Помилка при завантаженні [$1] (спроб: $2). Швидше за все, це помилка з підключенням, поновіть скрипт, щоб спробувати знову.", 'rcm-error-trymoretimes': "Спробуйте $1 раз(а)", // Notifications 'rcm-loading': "Завантаження/Сортування...", 'rcm-refresh': "Оновити", 'rcm-download-timestamp': "Останні зміни взяті з: $1", 'rcm-download-changesadded': " - [$1 останніх доданих змін]", // Basics 'rcm-wikisloaded': "Завантажені вікі: ", 'rcm-previouslyloaded': "Раніше завантажені:", 'rcm-nonewchanges': "Немає нових змін", 'rcm-autorefresh': "Автоматичне оновлення", 'rcm-autorefresh-tooltip': "Автоматичне оновлення останніх змін кожні $1 секунд", 'rcm-footer': "Версія $1, що створена $2", // Options Panel // 'rcm-optionspanel-hideusersoverride': "data-hideusers визначаються так.", 'rcm-optionspanel-savewithcookie': "Зберегти зміни в Cookie", // Modules 'rcm-module-diff-title': "Попередній перегляд змін", 'rcm-module-diff-open': "Показати зміни", 'rcm-module-diff-undo': "Скасувати зміни", // Other 'rcm-unknownthreadname': "тема", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": { ",": " ", ".": "," }, "grammarForms": { "genitive": { "Вікіпедія": "Вікіпедії", "Вікісловник": "Вікісловника", "Вікісховище": "Вікісховища", "Вікіпідручник": "Вікіпідручника", "Вікіцитати": "Вікіцитат", "Вікіджерела": "Вікіджерел", "Вікіновини": "Вікіновин", "Вікідані": "Вікіданих", "Вікімандри": "Вікімандрів" },               "dative": { "Вікіпедія": "Вікіпедії", "Вікісловник": "Вікісловнику", "Вікісховище": "Вікісховищу", "Вікіпідручник": "Вікіпідручнику", "Вікіцитати": "Вікіцитатам", "Вікіджерела": "Вікіджерелам", "Вікіновини": "Вікіновинам", "Вікідані": "Вікіданим", "Вікімандри": "Вікімандрам" },               "accusative": { "Вікіпедія": "Вікіпедію", "Вікісловник": "Вікісловник", "Вікісховище": "Вікісховище", "Вікіпідручник": "Вікіпідручник", "Вікіцитати": "Вікіцитати", "Вікіджерела": "Вікіджерела", "Вікіновини": "Вікіновини", "Вікідані": "Вікідані", "Вікімандри": "Вікімандри" },               "instrumental": { "Вікіпедія": "Вікіпедією", "Вікісловник": "Вікісловником", "Вікісховище": "Вікісховищем", "Вікіпідручник": "Вікіпідручником", "Вікіцитати": "Вікіцитатами", "Вікіджерела": "Вікіджерелами", "Вікіновини": "Вікіновинами", "Вікідані": "Вікіданими", "Вікімандри": "Вікімандрами" },               "locative": { "Вікіпедія": "у Вікіпедії", "Вікісловник": "у Вікісловнику", "Вікісховище": "у Вікісховищі", "Вікіпідручник": "у Вікіпідручнику", "Вікіцитати": "у Вікіцитатах", "Вікіджерела": "у Вікіджерелах", "Вікіновини": "у Вікіновинах", "Вікідані": "у Вікіданих", "Вікімандри": "у Вікімандрах" },               "vocative": { "Вікіпедія": "Вікіпедіє", "Вікісловник": "Вікісловнику", "Вікісховище": "Вікісховище", "Вікіпідручник": "Вікіпідручнику", "Вікіцитати": "Вікіцитати", "Вікіджерела": "Вікіджерела", "Вікіновини": "Вікіновини", "Вікідані": "Вікідані", "Вікімандри": "Вікімандри" }           },            "pluralRules": [ "v = 0 and i % 10 = 1 and i % 100 != 11 @integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …", "v = 0 and i % 10 = 2..4 and i % 100 != 12..14 @integer 2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …", "v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14 @integer 0, 5~19, 100, 1000, 10000, 100000, 1000000, …"], "digitGroupingPattern": null, "fallbackLanguages": ["ru", "en"] },   },    val: { // Errors 'rcm-error-linkformat': "'$1' és un format incorrecte. Per favor, no afiggues 'http://' o alguna cosa darrere del domini, incloent el primer '/'.", 'rcm-error-loading-syntaxhang': "Error de càrrega [$1] ($2 intents). Per favor, corrig les tues sintaxis (o recarrega la tua script i intenta-ho un atre colp).", 'rcm-error-loading-connection': "Error de càrrega [$1] ($2 intents). Per un error de conexió, tens que recarregar la tua script i intenta-ho un atre colp.", 'rcm-error-trymoretimes': "Intenta-ho $1 més voltes", // Notificacions 'rcm-loading': "Carregant/Classificant…", 'rcm-refresh': "Actualisació", 'rcm-download-timestamp': "Canvis recents baixats a: ", 'rcm-download-changesadded': " - [$1 Canvis recents afegits]", // Bàsics 'rcm-wikisloaded': "Wikis carregats: ", 'rcm-previouslyloaded': "Breument carregats:", 'rcm-nonewchanges': "No hi ha nous canvis", 'rcm-autorefresh': "Actualisació automàtica", 'rcm-autorefresh-tooltip': "Recarregar automàticament els canvis recents cada $1 segons", 'rcm-footer': "Versió $1 de $2", // Panel d'opcions 'rcm-optionspanel-hideusersoverride': "data-hideusers overrides this.", 'rcm-optionspanel-savewithcookie': "Guardar els canvis pel cookie", // Mòduls 'rcm-module-diff-title': "Visualisador de pàgina", 'rcm-module-diff-open': "Obrir la pàgina", 'rcm-module-diff-undo': "Desfer el canvi", // Atres 'rcm-unknownthreadname': "tema", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": null, "grammarForms": [], "pluralRules": ["i = 1 and v = 0 @integer 1"], "digitGroupingPattern": null, "fallbackLanguages": ["en"] },   },    vi: { 'rcm-error-linkformat': "'$1' không đúng định dạng. Xin đừng thêm 'http://' hay bất cứ ký tự gì trước tên miền trang, bao gồm dấu gạch chéo '/'.", 'rcm-error-loading-syntaxhang': "Lỗi tải [$1] ($2 lần thử). Hãy sửa lại đúng cú pháp (hoặc làm mới lại trang để thử lại.).", 'rcm-error-loading-connection': "Lỗi tải [$1] ($2 lần thử). Khả năng lớn đây là lỗi kết nối; làm mới lại trang để thử lại.", 'rcm-error-trymoretimes': "Thử thêm $1 lần nữa", 'rcm-loading': "Đang Tải/Đang Sắp Xếp...", 'rcm-refresh': "Làm mới", 'rcm-download-timestamp': "Thay Đổi Gần Đây đã được tải vào: $1", 'rcm-download-changesadded': " - [$1 Thay Đổi Gần Đây đã được thêm vào]", 'rcm-wikisloaded': "Các Wiki đã tải: ", 'rcm-previouslyloaded': "Đã tải trước đó:", 'rcm-nonewchanges': "Không có thay đổi nào mới", 'rcm-autorefresh': "Tự Động Làm Mới", 'rcm-autorefresh-tooltip': "Tự động làm mới trang Thay Đổi Gần Đây sau mỗi $1 giây", 'rcm-footer': "Phiên bản $1 bởi $2", 'rcm-optionspanel-hideusersoverride': "data-hideusers đã loại trừ điều này.", 'rcm-optionspanel-savewithcookie': "Lưu lại thiết đặt bằng cookie", 'rcm-module-diff-title': "Trình Xem Thay Đổi", 'rcm-module-diff-open': "Mở xem khác", 'rcm-module-diff-undo': "Lùi sửa", 'rcm-unknownthreadname': "luồng", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": { ",": ".",               ".": ","            },            "grammarForms": [], "pluralRules": ["i = 1 and v = 0 @integer 1"], "digitGroupingPattern": null, "fallbackLanguages": ["en"] },   },    zh: { 'rcm-error-linkformat': "「$1」为错误格式. 请不要在网域后加入「http://」或任何文字，包括第一个「/」字符. ", 'rcm-error-loading-syntaxhang': "读取[$1]时发生错误（$2次尝试）. 请更正语法（或刷新语法后再试一次）. ", 'rcm-error-loading-connection': "读取[$1]时发生错误（$2次尝试）. 极可能为联机问题. 请刷新语法后再试一次. ", 'rcm-error-trymoretimes': "请再试$1次", 'rcm-loading': "正在载入／整理中......", 'rcm-refresh': "刷新", 'rcm-download-timestamp': "最近更改于$1载入", 'rcm-download-changesadded': " - [已添加$1个最近更改内容]", 'rcm-wikisloaded': "已载入的维基：", 'rcm-previouslyloaded': "之前已加载：", 'rcm-nonewchanges': "无新更动", 'rcm-autorefresh': "自动刷新", 'rcm-autorefresh-tooltip': "每隔$1秒自动更新最近更改", 'rcm-footer': "由$2编辑的版本$1", 'rcm-optionspanel-hideusersoverride': "以data-hideusers覆盖原有设定. ", 'rcm-optionspanel-savewithcookie': "使用cookie储存变动", 'rcm-module-diff-title': "差异查看器", 'rcm-module-diff-open': "开启差异", 'rcm-module-diff-undo': "复原编辑", 'rcm-unknownthreadname': "话题", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": null, "grammarForms": [], "pluralRules": ["i = 1 and v = 0 @integer 1"], "digitGroupingPattern": null, "fallbackLanguages": ["zh-hans", "en"] },   },    "zh-hant": { 'rcm-error-linkformat': "「$1」為錯誤格式. 請不要在網域後加入「http://」或任何文字，包括第一個「/」字元. ", 'rcm-error-loading-syntaxhang': "讀取[$1]時發生錯誤（$2 次嘗試）. 請更正語法（或重新載入語法後再試一次）. ", 'rcm-error-loading-connection': "讀取[$1]時發生錯誤（$2 次嘗試）. 極可能為連線問題. 請重新載入語法後再試一次. ", 'rcm-error-trymoretimes': "請再試$1次", 'rcm-loading': "正在載入／整理中......", 'rcm-refresh': "重新整理", 'rcm-download-timestamp': "近期變動於$1載入", 'rcm-download-changesadded': " - [已新增$1個近期變動內容]", 'rcm-wikisloaded': "已載入的維基：", 'rcm-previouslyloaded': "之前已載入：", 'rcm-nonewchanges': "無新變更", 'rcm-autorefresh': "自動重整", 'rcm-autorefresh-tooltip': "每隔$1秒自動更新近期變動", 'rcm-footer': "由$2編輯的版本$1", 'rcm-optionspanel-hideusersoverride': "以data-hideusers覆蓋原有設定. ", 'rcm-optionspanel-savewithcookie': "使用cookie儲存變動", 'rcm-module-diff-title': "差異檢視器", 'rcm-module-diff-open': "開啟差異", 'rcm-module-diff-undo': "復原編輯", 'rcm-unknownthreadname': "討論串", /***************************        * mediawiki.language.data ***************************/       mwLanguageData: { "digitTransformTable": null, "separatorTransformTable": null, "grammarForms": [], "pluralRules": ["i = 1 and v = 0 @integer 1"], "digitGroupingPattern": null, "fallbackLanguages": ["zh-hans", "en"] },   }, }; /******************************************************************************* i18n.MESSAGES = { /***************************   * Common Stuff ****************************/   // https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/languages/messages/MessagesEn.php 'talkpagelinktext': 'Talk', 'cur': 'cur', 'last': 'prev', 'recentchanges-legend': 'Recent changes options', 'rclinks': 'Show last $1 changes in last $2 days $3',   'rcshowhideminor': '$1 minor edits', 'rcshowhidebots': '$1 bots', 'rcshowhideliu': '$1 logged-in users', 'rcshowhideanons': '$1 anonymous users', // 'rcshowhidepatr'		: '$1 patrolled edits', // 2052 'rcshowhidemine': '$1 my edits', 'rcshowhideenhanced': '$1 grouped recent changes', 'rcshowhidelogs': '$1 logs', 'diff': 'diff', 'hist': 'hist', 'hide': 'Hide', 'show': 'Show', 'minoreditletter': 'm', 'newpageletter': 'N', 'boteditletter': 'b', 'unpatrolledletter': '!', 'blocklink': 'block', 'contribslink': 'contribs', 'nchanges': '$1 NaN changess', 'rollbacklink': 'rollback', // Tooltips 'recentchanges-label-newpage': 'This edit created a new page', 'recentchanges-label-minor': 'This is a minor edit', 'recentchanges-label-bot': 'This edit was performed by a bot', 'recentchanges-label-unpatrolled': 'This edit has not yet been patrolled', 'rc-enhanced-expand': 'Show details (requires JavaScript)', 'rc-enhanced-hide': 'Hide details', // "Extra" support - "# only translate this message to other languages if you have to change it" 'semicolon-separator': ';&#32;', 'pipe-separator': '&#32;|&#32;', 'parentheses': '($1)', // Revision deletion 'rev-deleted-comment': '(edit summary removed)', 'rev-deleted-user': '(username removed)', 'rev-deleted-event': '(log action removed)', // https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/extensions/wikia/ArticleComments/ArticleComments.i18n.php 'article-comments-rc-comment': 'Article comment ( [$1 $2] )', 'article-comments-rc-comments': 'Article comments ($1)', 'and': '&#32;and', // Wiki Infobar 'recentchanges': 'Recent changes', 'newpages': 'New pages', 'newimages': 'New photos', 'log': 'Logs', 'insights': 'Insights', 'randompage': 'Random page', 'group-sysop': 'Administrators', 'group-user': 'Users', 'prefs-files': 'Files', 'awc-metrics-articles': 'Articles', 'awc-metrics-edits': 'Edits', // Other 'filedelete-success': "$1 has been deleted.", 'shared_help_was_redirect': 'This page is a redirect to $1', 'specialvideos-btn-load-more': 'Load More', 'flags-edit-modal-close-button-text': 'Close', 'awc-metrics-images': 'Images', 'wikifeatures-promotion-new': 'New', 'wikiacuratedcontent-content-empty-section': 'This section needs some items', 'myhome-feed-edited-by': 'edited by $1', 'edit-summary': 'Edit summary', 'wikiaPhotoGallery-conflict-view': 'View the current page', 'app-loading': 'Loading...', 'wikia-hubs-remove': 'Remove', 'undeletelink': 'view/restore', /***************************   * Diff Modal ****************************/   'revisionasof': 'Revision as of $1', 'editold': 'edit', 'editundo': 'undo', /***************************   * Log Names - wgLogHeaders ****************************/   // https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/languages/messages/MessagesEn.php 'blocklogpage': 'Block log', 'dellogpage': 'Deletion log', 'importlogpage': 'Import log', 'mergelog': 'Merge log', 'movelogpage': 'Move log', 'protectlogpage': 'Protection log', 'uploadlogpage': 'Upload log', 'newuserlogpage': 'User creation log', 'rightslog': 'User rights log', // ## Non-standard Mediawiki logs ## // https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/extensions/wikia/UserProfilePageV3/UserProfilePage.i18n.php 'useravatar-log': 'User avatar log', // https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/extensions/wikia/UserRenameTool/SpecialRenameuser.i18n.php 'userrenametool-logpage': 'User rename log', // ## Wiki Features ## // https://github.com/Wikia/app/blob/bf1e586c95224922577b6feea8293df341265a44/extensions/wikia/WikiFeatures/WikiFeatures.i18n.php 'wikifeatures-log-name': 'Wiki Features log', // https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/extensions/wikia/Chat2/Chat.i18n.php 'chat-chatban-log': 'Chat ban log', // https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/extensions/wikia/WikiaMaps/WikiaMaps.i18n.php 'wikia-interactive-maps-log-name': 'Maps log', // ## Extensions ## // https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FAbuseFilter/be09eabbdd591fb869b30cd4e77a286763cbe4e1/i18n%2Fen.json 'abusefilter-log': 'Abuse filter log', /***************************   * Log Actions - ****************************/   // https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/languages/messages/MessagesEn.php // Block 'blocklogentry': 'blocked $1 with an expiry time of $2 $3', 'reblock-logentry': 'changed block settings for $1 with an expiry time of $2 $3', 'unblocklogentry': 'unblocked $1', 'block-log-flags-anononly': 'anonymous users only', 'block-log-flags-nocreate': 'account creation disabled', 'block-log-flags-noautoblock': 'autoblock disabled', 'block-log-flags-noemail': 'e-mail blocked', 'block-log-flags-nousertalk': 'cannot edit own talk page', 'block-log-flags-angry-autoblock': 'enhanced autoblock enabled', 'block-log-flags-hiddenname': 'username hidden', // Delete 'logentry-delete-delete': '$1 deleted page $3', 'logentry-delete-restore': '$1 restored page $3', 'logentry-delete-event': '$1 changed visibility of NaN $5 log eventss on $3: $4', 'logentry-delete-revision': '$1 changed visibility of NaN $5 revisionss on page $3: $4', 'logentry-delete-event-legacy': '$1 changed visibility of log events on $3', 'logentry-delete-revision-legacy': '$1 changed visibility of revisions on page $3', 'revdelete-content-hid': 'content hidden', 'revdelete-summary-hid': 'edit summary hidden', // Import 'import-logentry-upload': 'imported $1 by file upload', 'import-logentry-interwiki': 'transwikied $1', // Merge 'pagemerge-logentry': 'merged $1 into $2 (revisions up to $3)', // Move 'logentry-move-move': '$1 moved page $3 to $4', 'logentry-move-move-noredirect': '$1 moved page $3 to $4 without leaving a redirect', 'logentry-move-move_redir': '$1 moved page $3 to $4 over redirect', 'logentry-move-move_redir-noredirect': '$1 moved page $3 to $4 over a redirect without leaving a redirect', // Protect 'protectedarticle': 'protected "$1"', 'modifiedarticleprotection': 'changed protection level for "$1"', 'unprotectedarticle': 'removed protection from "$1"', 'movedarticleprotection': 'moved protection settings from "$2" to "$1"', // Upload 'uploadedimage': 'uploaded "$1"', 'overwroteimage': 'uploaded a new version of "$1"', // New User 'logentry-newusers-newusers': '$1 created a user account', 'logentry-newusers-create': '$1 created a user account', 'logentry-newusers-create2': '$1 created a user account $3', 'logentry-newusers-autocreate': 'Account $1 was created automatically', // Rights 'rightslogentry': 'changed group membership for $1 from $2 to $3', 'rightslogentry-autopromote': 'was automatically promoted from $2 to $3', 'rightsnone': '(none)', // ## Non-standard Mediawiki logs ## // User Avatar - https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/extensions/wikia/UserProfilePageV3/UserProfilePage.i18n.php 'blog-avatar-changed-log': 'Added or changed avatar', 'blog-avatar-removed-log': "Removed $1's avatars", // User Rename - https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/extensions/wikia/UserRenameTool/SpecialRenameuser.i18n.php 'userrenametool-success': 'The user "$1" has been renamed to "$2".', // ## Wiki Features ## // Wiki Features - https://github.com/Wikia/app/blob/bf1e586c95224922577b6feea8293df341265a44/extensions/wikia/WikiFeatures/WikiFeatures.i18n.php // Chat - https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/extensions/wikia/Chat2/Chat.i18n.php 'chat-chatbanadd-log-entry': 'banned $1 from chat with an expiry time of $2, ends $3', 'chat-chatbanremove-log-entry': 'unbanned $1 from chat', 'chat-chatbanchange-log-entry': 'changed ban settings for $1 with an expiry time of $2, ends $3', // Maps - https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/extensions/wikia/WikiaMaps/WikiaMaps.i18n.php 'logentry-maps-create_map': '$1 created new map $3', 'logentry-maps-update_map': '$1 updated map $3', 'logentry-maps-delete_map': '$1 deleted map $3', 'logentry-maps-undelete_map': '$1 restored map $3', 'logentry-maps-create_pin_type': '$1 created new pin category for $3', 'logentry-maps-update_pin_type': '$1 updated pin category for $3', 'logentry-maps-delete_pin_type': '$1 deleted pin category for $3', 'logentry-maps-create_pin': '$1 created new pin for $3', 'logentry-maps-update_pin': '$1 updated pin for $3', 'logentry-maps-delete_pin': '$1 deleted pin for $3', // ## Extensions ## // Abuse Filter - https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FAbuseFilter/be09eabbdd591fb869b30cd4e77a286763cbe4e1/i18n%2Fen.json "abusefilter-log-entry-modify": "modified $1 ($2)", "abusefilter-log-detailslink": "details", /***************************   * Wall - https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/extensions/wikia/Wall/Wall.i18n.php#L191 ****************************/   'wall-recentchanges-edit': 'edited message', 'wall-recentchanges-removed-thread': 'removed thread "$2" from $4\'s wall', 'wall-recentchanges-removed-reply': 'removed reply from "$2" from $4\'s wall', 'wall-recentchanges-restored-thread': 'restored thread "$2" to $4\'s wall', 'wall-recentchanges-restored-reply': 'restored reply on "$2" to $4\'s wall', 'wall-recentchanges-deleted-thread': 'deleted thread "$2" from $4\'s wall', 'wall-recentchanges-deleted-reply': 'deleted reply from "$2" from $4\'s wall', 'wall-recentchanges-closed-thread': 'closed thread "$2" on $4\'s wall', 'wall-recentchanges-reopened-thread': 'reopened thread "$2" on $4\'s wall', 'wall-recentchanges-thread-group': '$1 on $3\'s wall', 'wall-recentchanges-history-link': 'wall history', 'wall-recentchanges-thread-history-link': 'thread history', /***************************   * Forum Boards - https://github.com/Wikia/app/blob/808a769df6cf8524aa6defcab4f971367e3e3fd8/extensions/wikia/Forum/Forum.i18n.php#L113 ****************************/   'forum-recentchanges-edit': 'edited message', 'forum-recentchanges-removed-thread': 'removed thread "$2" from the $4 Board', 'forum-recentchanges-removed-reply': 'removed reply from "$2" from the $4 Board', 'forum-recentchanges-restored-thread': 'restored thread "$2" to the $4 Board', 'forum-recentchanges-restored-reply': 'restored reply on "$2" to the $4 Board', 'forum-recentchanges-deleted-thread': 'deleted thread "$2" from the $4 Board', 'forum-recentchanges-deleted-reply': 'deleted reply from "$2" from the $4 Board', 'forum-recentchanges-thread-group': '$1 on the $3 Board', 'forum-recentchanges-history-link': 'board history', 'forum-recentchanges-thread-history-link': 'thread history', 'forum-recentchanges-closed-thread': 'closed thread "$2" from $4', 'forum-recentchanges-reopened-thread': 'reopened thread "$2" from $4', /***************************   * Discussions ****************************/   'discussions': 'Discussions', 'forum-related-discussion-heading': 'Discussions about $1', 'embeddable-discussions-loading': 'Loading Discussions...', }; // http://download.remysharp.com/wiki2html.js i18n.wiki2html = function (pText) { var pArgs = []; for (var _i = 1; _i < arguments.length; _i++) { pArgs[_i - 1] = arguments[_i]; }   if (pText == undefined) { mw.log("ERROR: [RecentChangesMultiple] i18n.wiki2html was passed an undefined string"); return pText; }   ;    return pText .replace(/(.*?)/g, function (m, l) {       return ' ' + l + ' ';    }) .replace(/(.*?)/g, function (m, l) {       return ' ' + l + ' ';    }) .replace(/[^\[](http[^\[\s]*)/g, function (m, l) {       return '<a href="' + l + '">' + l + '</a>';    }) .replace(/\$(\d+)/g, function (match, number) {       return typeof pArgs[number - 1] != 'undefined' ? pArgs[number - 1] : match;    }) .replace(/\[\[(.*?)\]\]/g, function (m, l) {       var p = l.split(/\|/);        var link = p.shift;        // if (link.match(/^Image:(.*)/)) {        // 	// no support for images - since it looks up the source from the wiki db        // 	return m;        // } else {        return '<a href="' + link + '">' + (p.length ? p.join('|') : link) + '</a>';       // }    }) .replace(/[\[](http:\/\/.*|\/\/.*)[!\]]/g, function (m, l) {       var p = l.replace(/[\[\]]/g, '').split(/ /);        var link = p.shift;        return '<a href="' + link + '">' + (p.length ? p.join(' ') : link) + '</a>';   }) .replace(//g, function (m, l) {       var p = l.split("|");        var user = p.shift; // Remove user object from list        return mw.language.gender(ConstantsApp_1["default"].userOptions.gender, p);    }) .replace(/NaN undefineds/g, function (m, l) {       var p = l.split("|");        var num = p.shift;        return mw.language.convertPlural(num, p);    }) .replace(//g, function (m, l) {       var p = l.split("|");        //let num = p.shift;        return mw.language.convertGrammar(p[1], p[0]);    }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = i18n;
 * DO NOT CHANGE THIS WHEN TRANSLATING
 * MESSAGES is all text that is retrieved from the Wikia servers for any supported language.
 * If it is necessary to overwrite a system message, simply add its key to the TEXT object with the new text for your language.

},{"./ConstantsApp":1}],15:[function(require,module,exports){ "use strict"; var Main_1 = require("./Main"); // Double check that script can run; should always be true due to loader, but check is here just encase. var appConfig = (window.dev = window.dev || {}).RecentChangesMultiple = window.dev.RecentChangesMultiple || {}; if (document.querySelectorAll('.rc-content-multiple, #rc-content-multiple')[0] == undefined) { console.log("RecentChangesMultiple tried to run despite no data. Exiting."); } else { Main_1["default"].init(appConfig); window.dev.RecentChangesMultiple.app = Main_1["default"]; }

},{"./Main":2}]},{},[15]); //