User:Polygnotus/Scripts/Tarnished.js: Difference between revisions

Content deleted Content added
hm?
add configuration
Line 1:
const WATCHLISTPAGES = false;
 
//movePlus
//<nowiki>
Line 725 ⟶ 727:
 
var talkpage = new Morebits.wiki.page(movePlus.talktitle, 'Closing move.');
if (WATCHLISTPAGES) {
talkpage.setWatchlist('watch');
}
talkpage.load(function(talkpage) {
var text = talkpage.getPageText();
Line 1,770 ⟶ 1,777:
 
let pageToMove = new Morebits.wiki.page(from, `Moving ${from} to ${to}.`);
if (WATCHLISTPAGES) {
pageToMove.setWatchlist('watch');
}
pageToMove.setMoveDestination(to);
pageToMove.setMoveSubpages(config.moveSubpages);
Line 2,060 ⟶ 2,071:
console.log(`Updating links at ${item.title}`);
let page = new Morebits.wiki.page(item.title, `Updating links at ${item.title}`);
if (WATCHLISTPAGES) {
page.setWatchlist('watch');
}
page.load(function(linkCorrection) {
let originalText = page.getPageText();
Line 2,177 ⟶ 2,194:
const editTask = () => {
let redirect = new Morebits.wiki.page(page, `Creating redirect to ${target}`);
if (WATCHLISTPAGES) {
redirect.setWatchlist('watch');
}
redirect.load(function(redirect) {
redirect.setPageText(`#REDIRECT [[${target}]]\n{{Rcat shell|\n{{R from move}}\n}}`);