מדיה ויקי:סקריפטים/107.js – הבדלי גרסאות

תוכן שנמחק תוכן שנוסף
מ תקלדה
התעלמות מעריכות שנעשו לפני יותר מ־60 ימים. נועד בעיקר כדי לא לשחזר/להסתיר עריכות ישנות של אנונימיים, שלרוב אינן קשורות להשחתות שבגינן הכלי מופעל.
שורה 39:
interfaceMessages = {},
isRelevantUserAnon = mw.util.isIPAddress(relevantUser),
contribsPeriod = 0,
queryLimit = 0,
latestEdits = [],
שורה 96 ⟵ 97:
window.vandalCleanerConfig.messages.en;
contribsPeriod = window.vandalCleanerConfig.contribsPeriod;
queryLimit = window.vandalCleanerConfig.queryLimit;
שורה 105 ⟵ 107:
title: i18n("contribsLinkTooltip"),
text: i18n("contribsLinkText")
}).on("click", initializeToolfunction() {
initializeTool(setOldestContribsDate());
})
);
שורה 131 ⟵ 135:
.replace(genderPattern, relevantUserGender === "female" ? "$2" : "$1")
.replace(/\$RELEVANTUSER/g, relevantUser)
.replace(/\$CONTRIBSPERIOD/g, contribsPeriod)
.replace(/\$QUERYLIMIT/g, queryLimit)
.replace(/(<<|>>)/g, "");
שורה 138 ⟵ 143:
}
function initializeTool(oldestContribsDate) {
if ($("#vandal-cleaner-interface-dialog").length) {
שורה 164 ⟵ 169:
ucprop: "title",
ucshow: "top|!new",
uclimit: queryLimit,
ucend: oldestContribsDate
}).done(function(editsQuery) {
שורה 175 ⟵ 181:
ucprop: "title",
ucshow: "new",
uclimit: queryLimit,
ucend: oldestContribsDate
}).done(function(pagesQuery) {
שורה 186 ⟵ 193:
ucprop: "ids",
ucshow: "!new",
uclimit: queryLimit,
ucend: oldestContribsDate
}).done(function(idsQuery) {
שורה 225 ⟵ 233:
});
}
function setOldestContribsDate() {
var date = new Date();
date.setTime(date.getTime() - (contribsPeriod * 24 * 60 * 60 * 1000));
var year = date.getUTCFullYear(),
month = date.getUTCMonth() + 1,
day = date.getUTCDate(),
hours = date.getUTCHours(),
minutes = date.getUTCMinutes(),
seconds = date.getUTCSeconds();
return year + "-" +
(month < 10 ? "0" + month : month) + "-" +
(day < 10 ? "0" + day : day) + "T" +
(hours < 10 ? "0" + hours : hours) + ":" +
(minutes < 10 ? "0" + minutes : minutes) + ":" +
(seconds < 10 ? "0" + seconds : seconds) + "Z";
}