|
|
Line 1: |
Line 1: |
| /*
| |
|
| |
| MediaWiki recent changes namespace toggler version 0.5 by Greenpickle.
| |
|
| |
| Put the code on any script page you want, such as User:Name/monobook.js,
| |
| Mediawiki:Common.js, etc.. There are a few options detailed a bit lower down.
| |
| You'll also need the following CSS on a style page of your choice (*.css):
| |
|
| |
| .rcnsthidden {display: none;}
| |
|
| |
| With a little knowledge, this can be modified to, for example, show all ignored
| |
| edits in a different colour, or align them to the right, rather than hide them.
| |
| Examples:
| |
|
| |
| Greyed out:
| |
| .rcnsthidden {color: #aaa;}
| |
| .rcnsthidden a {color: #777 !important;}
| |
|
| |
| Smaller font:
| |
| .rcnsthidden {font-size: 0.8em;}
| |
|
| |
| Right-aligned:
| |
| .rcnsthidden {text-align: right;}
| |
|
| |
| All three of the above:
| |
| .rcnsthidden {text-align: right; font-size: 0.8em; color: #aaa;}
| |
| .rcnsthidden a {color: #777 !important;}
| |
|
| |
| To-do:
| |
| - incorporate logs stuff: deletions, uploads, bans, etc. (separate checkbox
| |
| list; created based on what's found in the currently shown RC)
| |
| - make possible with enchanced (grouped) RC
| |
| - hide h4s that have no visible contents
| |
| - extra buttons to toggle all/invert toggle
| |
| - check for existence of indexOf, etc. before doing anything
| |
| - specific page include/exclude lists (requires ns prefix; remember _s)
| |
|
| |
| */
| |
|
| |
| // Change this to true to make the list below an include list rather than an
| |
| // exclude list:
| |
|
| |
| include = false;
| |
|
| |
| // Here, default namespaces can be set; put them in '' or "" separated by
| |
| // commas, inside the []. By default, this is the excluded list:
| |
|
| |
| RCNSTList = [];
| |
|
| |
| // Change these if it'll make styling easier - e.g., use ul/li and create a
| |
| // hover menu:
| |
|
| |
| RCNSTbeforecheckboxes = '<span id="rcnst"><hr />\n';
| |
| RCNSTaftercheckboxes = '</span>';
| |
| RCNSTbeforecheckbox = '';
| |
| RCNSTaftercheckbox = '\n';
| |
|
| |
| window.onload = function () { | | window.onload = function () { |
| | if () include |
| if (document.body.className.indexOf("page-Special_RecentChanges") == -1) return; | | if (document.body.className.indexOf("page-Special_RecentChanges") == -1) return; |
| choice = document.getElementById("namespace").childNodes; | | choice = document.getElementById("namespace").childNodes; |