Jump to content

User:TopGun/common.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by TopGun (talk | contribs) at 18:14, 12 December 2011. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
// [[user:js/watchlist]]
if (wgCanonicalSpecialPageName == 'Watchlist') 
  importScript('user:js/watchlist.js');

//Bolds changes in watchlist since last view, notifies of new changes
//importScript('User:Ais523/watchlistnotifier.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) ) {
    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);
      }
    }
}
:Indented line


//====================================== POPUPS
/*
// [[User:Lupin/popups.js]]
 
document.write('<script type="text/javascript" src="' 
 + 'http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js' 
 + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
popupDelay=1.5;
popupHideDelay=0;
 
popupStructure='original'; //fancy, fancy2
popupSubpopups=false;
popupOnEditSelection=false;
popupAdminLinks=true;
popupFixRedirs=true;
popupFixDabs=true;
imagePopupsForImages=false;
popupMaxWidth=500;
 
popupRevertSummaryPrompt=true;

*/
//
////////END