Jump to content

User:Scarian/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
if( typeof( TwinkleConfig ) == 'undefined' ) TwinkleConfig = {}; // DO NOT REMOVE THIS LINE - ALL TWINKLE SETTINGS AFTER THIS
TwinkleConfig.batchdeleteChunks			=	50;
TwinkleConfig.batchDeleteMinCutOff			=	5;
TwinkleConfig.batchMax					=	5000;
TwinkleConfig.batchProtectChunks			=	50;
TwinkleConfig.batchProtectMinCutOff			=	5;
TwinkleConfig.batchundeleteChunks			=	50;
TwinkleConfig.batchUndeleteMinCutOff			=	5;
TwinkleConfig.blankTalkpageOnIndefBlock		=	false;
TwinkleConfig.defaultWarningGroup			=	1;
TwinkleConfig.deleteTalkPageOnDelete			=	false;
TwinkleConfig.deletionSummaryAd			=	' using	[[WP:TW|TW]]';
TwinkleConfig.deliChunks				=	500;
TwinkleConfig.deliMax					=	5000;
TwinkleConfig.markAIVReportAsMinor			=	true;
TwinkleConfig.markSockReportAsMinor			=	true;
TwinkleConfig.markUAAReportAsMinor			=	true;
TwinkleConfig.markRevertedPagesAsMinor			=	[ 'vand' ];
TwinkleConfig.markSpeedyPagesAsMinor			=	false;
TwinkleConfig.markSpeedyPagesAsPatrolled		=	true;
TwinkleConfig.notifyUserOnDeli				=	true;
TwinkleConfig.notifyUserOnSpeedyDeletionNomination	=	[ 'g1',	'g2', 'g3', 'g4', 'g10', 'g11',	'g12', 'a1', 'a2', 'a3', 'a5', 'a7', 'a9', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f9', 'f10', 'f11', 'u3', 't2', 't3', 'p2'	];
TwinkleConfig.offerReasonOnNormalRevert		=	true;
TwinkleConfig.openTalkPage				=	[];
TwinkleConfig.openTalkPageOnAutoRevert			=	false;
TwinkleConfig.openUserTalkPageOnSpeedyDelete		=	[ 'g1',	'g2', 'g3', 'g4', 'g5',	'g10', 'g11', 'g12', 'a1', 'a3', 'a7', 'a9', 'f3', 'f4', 'f5', 'f6', 'f7', 'f9', 'f11', 'u3', 't2' ];
TwinkleConfig.orphanBacklinksOnSpeedyDelete		=	{exclude:['g6'], orphan:true};
TwinkleConfig.proddeleteChunks				=	50;
TwinkleConfig.protectionSummaryAd			=	' using	[[WP:TW|TW]]';
TwinkleConfig.revertMaxRevisions			=	50;
TwinkleConfig.showRollbackLinks			=	[ 'diff', 'contribs' ];
TwinkleConfig.showSharedIPNotice			=	true;
TwinkleConfig.summaryAd				=	' using	[[WP:TW|TW]]';
TwinkleConfig.userTalkPageMode				=	'window';
TwinkleConfig.watchProdPages				=	false;
TwinkleConfig.watchRevertedPages			=	[ 'agf', 'norm', 'vand', 'torev' ];
TwinkleConfig.watchSpeedyPages				=	[ 'g3',	'g5', 'g10', 'g11', 'g12', 't1'	];
TwinkleConfig.watchWarnings				=	false;
TwinkleConfig.welcomeUserOnSpeedyDeletionNotification	=	TwinkleConfig.notifyUserOnSpeedyDeletionNomination;

 
importScript('User:AzaToth/morebits.js');
importScript('User:AzaToth/twinklefluff.js');
importScript('User:AzaToth/twinklewarn.js');
importScript('User:AzaToth/twinklearv.js');
importScript('User:AzaToth/twinklespeedy.js');
importScript('User:AzaToth/twinklediff.js');
importScript('User:AzaToth/twinkleprotect.js');
importScript('User:AzaToth/twinkleprod.js');
importScript('User:AzaToth/twinklexfd.js');
 
wikEdRegExTypoFix = true;
 
// [[User:Lupin/popups.js]]
 
importScript('User:Lupin/popups.js');

//Mass rollback function
//Written by John254
//Adapted from User:Mr.Z-man/rollbackSummary.js
//Instructions: Selecting the "rollback all" tab when viewing a user's contributions history
//will open all rollback links displayed there. (Use with caution)
 
function rollbackEverythingButton() {
  var hasRollback = getElementsByClassName(document, "span", "mw-rollback-link");
  if (hasRollback[0] && (document.title.indexOf("User contributions") != -1) ) {
    mw.util.addPortletLink('p-cactions', 'javascript:rollbackEverything()', "rollback all", "ca-rollbackeverything", "rollback all edits displayed here");
  }
}
addOnloadHook(rollbackEverythingButton);
function rollbackEverything() {
    for (var i in document.links) {
      if (document.links[i].href.indexOf('action=rollback') != -1) {
        window.open(document.links[i].href);
      }
    }
}