User:AssumeGoodWraith/common.js: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
Restoring revision 1273267183 by AssumeGoodWraith: (UV 0.1.6)
 
(39 intermediate revisions by the same user not shown)
Line 1:
mw.loader.loadimportScript( '/w/index.php?title=User:RedWarnWrit Keeper/Scripts/massRollback.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:RedWarnWrit Keeper/Scripts/massRollback.js]]
importScript('User:Jackmcbarn/editProtectedHelper.js'); // Linkback: [[User:Jackmcbarn/editProtectedHelper.js]]
mw.loader.load( '/w/index.php?title=User:AssumeGoodWraith/redwarn.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:AssumeGoodWraith/redwarn.js]]
mw.loader.getScript("/w/index.php?title=User:Guywan/Scripts/ConfirmLogout.js&action=raw&ctype=text/javascript");
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript');
$( '#ca-nstab-user a' ).text( 'Humaning page' );
$( '#ca-talk a' ).text( 'Human talking' );
Line 6 ⟶ 10:
$( '#ca-viewsource a' ).text( 'Edit: Insufficient permissions' );
$( '#ca-nstab-main a' ).text( 'Main Article' );
 
function catsattop() {
var cats = document.getElementById('catlinks');
Line 13 ⟶ 16:
}
 
mw.util.addPortletLink ('p-tb', '/wiki/User:AssumeGoodWraith/Template_Sandbox', 'Template Sandbox');
addOnloadHook(function () {
mw.util.addPortletLink ('p-tb', '/wiki/Special:PendingChanges', 'Pending Changes');
content = document.getElementById("column-content"); // Find the main content column
mw.util.addPortletLink ('p-tb', '/wiki/User:AssumeGoodWraith/Vandalism', 'Vandalism statistics');
mw.util.addPortletLink ('p-tb', '/wiki/Special:Log', 'Log');
mw.util.addPortletLink ('p-tb', '/wiki/Special:Log?type=newusers&user=&page=&wpdate=&tagfilter=&wpfilters%5B%5D=newusers', 'User Creation Log');
mw.util.addPortletLink ('p-tb', '/wiki/User:AssumeGoodWraith/CSD_log', 'My CSD log');
mw.util.addPortletLink ('p-tb', '/wiki/Special:AbuseLog', 'Abuse log');
mw.util.addPortletLink ('p-tb', '/wiki/Wikipedia:AIV', 'AIV');
mw.util.addPortletLink ('p-tb', '/wiki/Wikipedia:UAA', 'UAA');
mw.util.addPortletLink ('p-tb', '/wiki/Wikipedia:RFPP', 'RFPP');
mw.util.addPortletLink ('p-tb', '/wiki/Special:NewPages', 'New pages');
mw.util.addPortletLink ('p-tb', '/wiki/Special:NewPagesFeed', 'PageTriage');
 
 
mw.loader.load( '/w/index.php?title=User:Evad37/OneClickArchiver.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Evad37/OneClickArchiver.js]]
mw.loader.load( '/w/index.php?title=User:Evad37/MoveToDraft.js&action=raw&ctype=text/javascript' ); // Backlink: [[User:Evad37/MoveToDraft.js]]
 
/*** BEGIN WIKIBREAK ENFORCER ***/
$(document).ready(function()
{
 
/*** Start editing here ***/
 
// When you want to end your break?
// no leading zeroes. (example: 9 - correct, 09 - incorrect)
 
var date = { year: 2022, month: 4, day: 1};
footer = document.getElementById("footer"); // Find the footer
var time = { hours: 0, minutes: 0, seconds: 0 };
footer.parentNode.removeChild(footer); // Remove the footer from the global wrapper
content.appendChild(footer); // Place footer at the end of the content column;
 
/*** Stop editing here ***/
tabs = document.getElementById("p-cactions"); // Find the top tab list
tabs.parentNode.removeChild(tabs); // Remove the tab list from the side column
var currentDate = new Date();
content.insertBefore(tabs,content.firstChild); // Place tab list at the beginning of the content column
var enforcedBreakEnd = new Date(
date.year,date.month-1,date.day,time.hours,time.minutes,time.seconds);
if (currentDate <= enforcedBreakEnd)
{
alert("Enforced wikibreak until "+enforcedBreakEnd.toLocaleString()
+ "\n(now is "+currentDate.toLocaleString()+")\n\nBye!");
mw.loader.using(["mediawiki.api", "mediawiki.user"]).then(function ()
{
new mw.Api().post(
{
action: 'logout',
token: mw.user.tokens.get('csrfToken')
}).done(function (data)
{
___location = "//" + ___location.host + "/w/index.php?title="
+ "Special:Userlogin&returnto=Main_Page";
addOnloadHook }).fail(function () {
{
console.log("logout failed")
});
});
}
});
/*** END WIKIBREAK ENFORCER ***/