User:Terasail/COI Request Tool.js: Difference between revisions

Content deleted Content added
Remove text colour for dark mode compatability
Account for {{COI edit}}
 
(One intermediate revision by the same user not shown)
Line 60:
if (expiry) {
watched = Math.ceil((new Date(expiry).getTime() - Date.now()) / 1000 / 60 / 60 / 24) + " days";
});
if (watched == undefined && typeof(autoWatchRequests) != "undefined" && autoWatchRequests == true) {
watched = '';
}
watchStatus.push(watchData.watchers || "less than 30", watchData.visitingwatchers || "<30", watched);
Line 189 ⟶ 192:
watchlistDropdown.setDisabled(!newStatus);
});
let watchlistLabel = new OO.ui.LabelWidget({label: "Watch this page"}).on("change", function (newStatus) {;
 
});
//Submit Button
let submitButton = new OO.ui.ButtonWidget({
Line 306 ⟶ 307:
if (responseOption.parameter != "") {
let template = "{{Edit COI|" + responseOption.parameter + "}}";
wikitext = wikitext.replace(/{{ *(Edit[ _])?COI(-protected|([ _](edit|request)){1,2})?( *\| *([=A-Z])*)* *}}/i, template);
}
if (responseOption.response != "") {