Useful javascript for monobooks

edit

This is a collection of scripts for the default monobook skin. Have fun :).

Please be sure to include the category for your monobook, I'd like to be able to keep track and do any bug reports if needed.

Note: (Please copy text in edit mode)

Prerequisite script (You must install these for some of the others to work)

edit

Monobook.js script (Addtabs)

edit

Add Tabs From the user scripts project. This adds the common "Addtab" function. You NEED for the below scripts to work.

(please copy from edit mode to assure correct JS)


// Helper tools
mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Addtabs/monobook.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');
//

Monobook.css script (CSS Dropdown script)

edit

Add Dropdown menus From the user scripts project. This adds the dropdown function. You NEED it for some of the below scripts to work.

(please copy from edit mode to assure correct JS)

The main scripts

edit

Non-admin RC Patrol JS (Stand-alone)

edit

This adds rollback, Lupin's filter, quick AIV reporting, "restore link" to diff pages and quick warning to vandals. Note: already includes history script. Rollback now uses a method by AzaToth (WP:TWINKLE).

  • Add {{subst:User:Voice of All/RC/nolupin/monobook.js}} for non-admin RC script without lupin.
  • Add {{subst:User:Voice of All/RC/monobook.js}} for non-admin RC script with lupin.


Admin Only JS (requires CSS dropdown script)

edit

This includes all of the features listed here [1] and all of the tools below, such as rollback/deletion tools, protection and warning tabs.

  • Read the info here[2] too.

(Please copy in edit mode)

  • Admin script with Lupin Lupin's popups (popupsdev version)

// Admin tools
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/admin/monobook.js' 
             + '&action=raw&ctype=text/javascript');

//

  • Admin script without popups

// Admin tools
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice of All/adminnolupin/monobook.js' 
             + '&action=raw&ctype=text/javascript');

//



Bureaucrat Only JS (Requires Addtab)

edit

The script below is designed for bureaucrats only. Much of it won't work for non-bureaucrats. This script includes the History analysis tools, along with "inform", "failure", and "success" tabs for RfAs. These tabs will automatically subst the page and change the tense of the header to past tense. The "Discuss/Vote here" link will be replaced with final. All you have to do is update the final tally before you click one of the close tabs.

It also reformats the main RfA (WP:RfA) page to make it easier to look through (though poorly made RfAs will stand out) unless RfAshowlinks = 'false' is added after the script.

List of all features:

  • RfA page formatting and auto-percents
  • Close tabs for RfAs, which open the respect archiving location and remove it from the RfA main page (you still have to save the pages to confirm these actions)
  • A tab to drop the candidate a message and a tab to promote the user on all RfAs (you still have to submit these)
  • A "data" tab on RfA history pages to check for suspicious behavoir

(please copy from edit mode to assure correct JS)


// BCrat tools [[Category:Wikipedia administrators who use VoA script|{{PAGENAME}}]]
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Bureaucrat/monobook.js' 
             + '&action=raw&ctype=text/javascript');
//


CheckUser (or clerk) Only JS (Requires dropdown menu CSS script)(Requires Addtab)

edit

The script below is designed for CheckUsers only. This script includes a dropdown tab for completed request templates, such as "confirmed" or "likely". It also provides case completion and archival assistance.

Note: for the cross-domain (dnsstuff.com) HTTP request info to work, you must:

  • FF/Netscape: Basically, enable "signed.applets.codebase_principal_support" in about:config (or opera:config)
  • IE: Reduce IE security settings by enabling the "accessing of data across domains". Note this does not give permission prompts, it works on ALL pages, making it fairly risky on other sites.
  • Opera: Not possible yet.

(please copy from edit mode to assure correct JS)


// Checkuser tools [[Category:Wikipedia administrators who use VoA script|{{PAGENAME}}]]
mw.loader.load(document.location.protocol + 
     '//en.wikipedia.org/w/index.php?title=User:Voice_of_All/CheckUser/monobook.js&action=raw&ctype=text/javascript');
//


Individual scripts

edit

Text Replace/quick redirect (Requires Addtab)

edit

Replaces all occurrences of certain text with something else. Regex can be used if you want.

(please copy from edit mode to assure correct JS)


// Replace txt
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/replacetxt.js' 
             + '&action=raw&ctype=text/javascript');
//

History and Edit Summary Use Analysis (Requires Addtab)

edit

Analyzes a page history when "%" tab is clicked. Shows a whole range of useful data. Also gives quick edit summary % usage and namespace % based on all edits appearing on the contributions page. For more info on how this works and what the reports generated mean, click here.

Specifically, this adds a "stats" tab to:

  • User contribs pages
  • The log pages for users

(please copy from edit mode to assure correct JS)


// History tools
mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/History/monobook.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');

//

Google searching/reference scrollbars/abbreviate (Requires Addtab)

edit

Adds google scholar and regular google tabs to articles for a quick search launch. Disambiguated terms launch a search for the part before the parenthesis in quotes and the part in parenthesis not in parenthesis or quotes.

References can be abbreviated in edit mode (and the preview/save buttons are locked while they are) and unnabbreviated by simply clicking the "toggle references" link in the toolbox. References in non-edit mode appear in show/hide divs. Currently, they default to show, as clicking reference numbers fails otherwise.


// Google tools && Spelling
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Google/monobook.js' 
             + '&action=raw&ctype=text/javascript');
//
edit

Adds adds "restore" to the left(older) version of diff pages. "Restore" can be more useful than rollback because it restored to a specific revision rather than going back to the last version not by the user who has the top edit.


// Diff page links
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Revert/monobook.js' 
             + '&action=raw&ctype=text/javascript');
//

Bot Approvals group (requires Addtab)

edit

Adds tabs for approving bots on the Wikipedia:Bots/Requests for approval subpages.


// BAG
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Approvals.js' 
             + '&action=raw&ctype=text/javascript');
//

Admin Protection JS (Requires Addtab)

edit

This gives protection and semi-protection listing and de-listing tabs for pages in edit mode:

(please copy from edit mode to assure correct JS)


// Admin tools
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Protection/monobook.js' 
             + '&action=raw&ctype=text/javascript');
//

Admin user warning tabs (Requires dropdown menu CSS script)(Requires Addtab)

edit

Adds quick warning (i.e. vandalism, spam, blanking, ect...) tabs to user talk pages when in edit mode.

(please copy from edit mode to assure correct JS)


// Admin warning tools
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice of All/Adminwarnings/monobook.js' 
             + '&action=raw&ctype=text/javascript');
//

Admin rollback/deletion tools and backlog bar (Requires Addtab)

edit
  • Adds "revert all edits", "revert all uploads", "delete all pages" and "revert all moves" to contribs/move log pages respectively and "check all revisions" to deletion restoration pages.
  • It also includes a backlog bar to Recent Changes and My watchlist that appears if any (most) page is tagged with {{adminbacklog}}.
  • Additionally, it includes a script to compare edits/blocks and get user talk interection for any two users.
  • IP range edits do have comparison support against users; though you must be ON the range page to do the comparison, unlike regular user comparison, where the starting page is irrelavent.
  • A "block all AOL" tab appears on Recent changes. This opens the block pages for all AOL ranges with "block account creation" and "anon-only" checked.
  • Different types of rollback using WP:TWINKLE.

Note: please read this[3].

Note: this comes with the Diff page revert tools as well. This also includes a blue "message" bar on all pages as long as a non-image related page is tagged as having a backlog. It lists all the pages on the bar (1 line usually).

(please copy from edit mode to assure correct JS)


// Admin rollback tools [[Category:Wikipedia administrators who use VoA script|{{PAGENAME}}]]
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Voice_of_All/Specialadmin/monobook.js' 
             + '&action=raw&ctype=text/javascript');
//