jQuery(document).ready(function ($) {
console.log("executing common.js");
try {
//mw.loader.load('https://en.wikipedia.orghttps://en.wiktionary.org/w/index.php?title=User:BrandonXLF/QuickEdit.js&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.orghttps://en.wiktionary.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript');
mw.loader.load('https://en.wikipedia.orghttps://en.wiktionary.org/w/index.php?title=User:BrandonXLF/ShowRevisionID.js&action=raw&ctype=text/javascript');
mw.loader.load('https://www.mediawiki.orghttps://en.wiktionary.org/w/index.php?title=XTools/ArticleInfo.js&action=raw&ctype=text/javascript');
mw.loader.load('https://meta.wikimedia.orghttps://en.wiktionary.org/w/index.php?title=User:Jack who built the house/editHere.js&action=raw&ctype=text/javascript');
importScript("User:Erutuon/scripts/cleanup.js");
importScript("User:Erutuon/scripts/addAutoCat.js");
importScript("User:Erutuon/scripts/phonemicGreekTransliteration.js");
importScript("User:Fenakhay/scripts/nonmainspaceCategories.js");
importScript("User:Erutuon/scripts/gadgets-definition.js");
importScript("User:Fenakhay/extraCategoryLinks.js");
importScript("User:Ioaxxere/minitoc.js");
/********* rollback msg *********/
$('span.mw-rollback-link a').each(function () { if (-~this.href.indexOf('&action=rollback&') && this.href.indexOf('summary=') < 0) this.href += '&summary=Reverted%20edits%20by%20%5B%5BSpecial%3AContributions%2F%242%7C%242%5D%5D.%20If%20you%20think%20this%20rollback%20is%20in%20error%2C%20please%20leave%20a%20message%20on%20my%20%5B%5BUser%20talk%3AFenakhay%7Ctalk%20page%5D%5D.' });
/********* silent rb *********/
$('#p-tb ul').append('<li id="fenakhay-t-rb-lta"><a href="javascript:void(0)" id="fenakhay-t-rb-lta-link">Hide RB msgs</a></li>');
$('#fenakhay-t-rb-lta-link').click(function () {
$('span.mw-rollback-link a').each(function () {
if (-~this.href.indexOf('&action=rollback&')) {
if (this.href.indexOf('summary=') >= 0)
this.href = this.href.split('&summary=');
this.href += '&summary=rv%2Fv';
}
});
alert("ok");
});
/********* mass revdel *********/
mw.loader.load('//en.wiktionary.orghttps://en.wiktionary.org/w/index.php?title=User:Surjection/massRevdel.js&action=raw&ctype=text/javascript');
/********* mass rv *********/
{
var nukeLink = $('.mw-changeslist-links .mw-contributions-link-nuke');
if (nukeLink) {
var linkSpan = nukeLink.parent();
var rv = $('<a href="#">mass revert</a>');
rv.click(function (e) {
if (confirm('Are you sure?')) {
$('.mw-contributions-current span.mw-rollback-link a').each(function () {
if (-~this.href.indexOf('&action=rollback&')) {
window.open(this.href, '_blank');
}
});
alert("OK");
}
});
$('<span></span>').append(rv).insertAfter(linkSpan);
}
}
/********* quick move revert *********/
$('.mw-logline-move a').each(function () {
if (this.href.indexOf('&autosubmitmove=1') < 0)
this.href += '&wpLeaveRedirect=0&autosubmitmove=1';
});
if (mw.config.get("wgPageName").startsWith("Special:MovePage") && new URL(window.location.href).searchParams.get("autosubmitmove") == '1') {
$('button').click();
}
/********* quick LTA block *********/
var ltaBlockLink = 'https://dictious.com/en/Special:Block/@@@?wpCreateAccount=1&wpDisableUTEdit=1&wpExpiry=indefinite&wpHardBlock=1&wpReason=Vandalism&wpReason-other=LTA&wpDisableEmail=1&autosubmitblock=0';
var spamBlockLink = 'https://dictious.com/en/Special:Block/@@@?wpCreateAccount=1&wpDisableUTEdit=1&wpExpiry=indefinite&wpHardBlock=1&wpReason=Promotional%20material%2Fspamming&wpDisableEmail=1&autosubmitblock=0';
var proxyBlockLink = 'https://dictious.com/en/Special:Block/@@@?wpCreateAccount=1&wpDisableUTEdit=1&wpExpiry=6+months&wpHardBlock=1&wpReason=Suspected+%5B%5BWiktionary%3AProject+-+Open+proxies%7Copen+proxy%5D%5D&autosubmitblock=0';
var botBlockLink = 'https://dictious.com/en/Special:Block/@@@?wpCreateAccount=1&wpDisableUTEdit=1&wpExpiry=indefinite&wpHardBlock=1&wpReason=Unauthorized+bot+%28see+%5B%5BWT%3ABOT%5D%5D%29&wpDisableEmail=1&autosubmitblock=0';
var hiddenBlockLink = 'https://dictious.com/en/Special:Block/@@@?wpCreateAccount=1&wpDisableUTEdit=1&wpExpiry=indefinite&wpHardBlock=1&wpDisableEmail=1&autosubmitblock=0';
if (mw.config.get("wgPageName").startsWith("Special:Contributions/")) {
var isIP = !Array.prototype.find.call(document.getElementsByTagName("a"), function (a) { return (a.getAttribute("title") || '').slice(0, 5) == "User:" });
var buttons = isIP ? ] : , , , ];
var pn = mw.config.get("wgPageName");
var usern = pn.slice(pn.indexOf("/") + 1);
var makeLink = function (url) { return url.replace("@@@", usern); };
buttons.forEach(function (button) {
$('#contentSub a').first().after(' | <a href="' + makeLink(button) + '">(' + button + ')</a>');
});
}
if (mw.config.get("wgPageName").startsWith("Special:Block/") && new URL(window.location.href).searchParams.get("autosubmitblock") == '1') {
$('button').click();
}
/********* block IPv6 /64 by default *********/
if (mw.config.get("wgPageName").startsWith("Special:Contributions/") || mw.config.get("wgDiffNewId")) {
var blockIPv6 = /Special:Block\/{0,4}:{0,4}:{0,4}:{0,4}:{0,4}:{0,4}:{0,4}:{1,4}$/;
$('a').each(function (i, element) {
element.href = element.href.replace(blockIPv6, function (m) { return m + "/64"; });
});
}
/********* autofeed *********/
if (mw.config.get('wgAction') == 'edit' && new URLSearchParams(document.location.search).has('autofeedtext')) {
var editField = $('#wpTextbox1');
if (editField.val()) {
var newtext = document.createElement('textarea');
newtext.setAttribute('readonly', true);
newtext.setAttribute('rows', 20);
newtext.textContent = new URLSearchParams(document.location.search).get('autofeedtext');
document.getElementById('mw-content-text').insertBefore(newtext, document.getElementById('editform'));
} else {
editField.val(new URLSearchParams(document.location.search).get('autofeedtext'));
}
}
} catch (e) {
console.error(e);
}
mw.hook("wikipage.content").add(function () { console.log("wikipage.content hook"); });
console.log("executed common.js");
});