User talk:Mike.lifeguard/remote.js

From Meta, a Wikimedia project coordination wiki

This is my set of scripts which I use on all wikis. On any wiki, you can load a script from Meta using something like:

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Mike.lifeguard/remote.js&action=raw&ctype=text/javascript');

Replace the parameters to load any script from any wiki (your script can't also load scripts using importScript();) to your skin and purge your browser cache. This set of scripts is only tested on Firefox 2.0 and Firefox 3.5. It might work with Opera, Safari or Netscape Navigator, but will almost certainly not work with Internet Explorer.

The stylesheet is for myself only, but if you like it I'll add your username. It is heavily commented, so you can easily tell what it does.


fixcompare.js[edit]

This converts the silly button on the history page to a link. This lets you open diffs in new tabs etc - surprisingly useful.

sixtabs.js[edit]

Adds edit and history tabs for the other page:   page edit hist   talk edit hist

removespam.js[edit]

OK, so on Special:Linksearch you get a tabs for remove external links and filter

  • filter will filter out non-mainspace items in the list
  • remove external links lets you semiautomagically remove spam.

Vanilla[edit]

  1. Do a search for the domain
  2. Take a look at where else it's linked
    If it's linked from IP talk pages, that may indicate spamminess
    If it's linked from article talk pages, that may indicate usefulness
  3. Use filter to remove out non-mainspace links
  4. Click remove external links and give it some settings. Normally, the default is fine (so just hit enter for each of 3 dialog boxes).
  5. Then you see the links turn green - click the articles where you want to remove the domain in a new tab/window.
  6. It will automatically open edit view, find the domain and remove it.
  7. It will then load the diff of the edit - verify it as it will make errors in certain situations
    For example if you have the syntax [http://www.domain.com link text] then it will sometimes leave behind "link text" -- this is because it thinks you want the text to remain behind in cases like "Then I went to BestBuy..." so you don't end up breaking the sentence when removing the link. So that is correct sometimes, but sometimes not; you just have to check.
  8. Make any changes you need to and hit save.

If it ever gives you a diff where nothing changed, then it is because the link is (probably) there, but in plaintext, which it sometimes doesn't find, so you have to do a CTRL-F search for the domain name and remove it by hand. By and large, the script catches most stuff properly, and is certainly very useful.

Using Erwin's tool[edit]

When using ~erwin85/xwiki.php, the rem links will open a new window which runs removespam.js on it. This removes steps 1-5 above. All you have to do is verify the diff, and hit save.

regexlifilter.js[edit]

Allows you to filter by regex in:

rangecontribs.js[edit]

Returns contributions for an IP range or for a simple wildcard search. On Special:Contributions, submit any IP CIDR range /16 or from /24 to /32 or submit any string (at least 3 characters) with a suffixed asterisk to do a search. eg: [123.123.123.0/24] or [123.123.123.*] or [Willy*]. Your search string must not include spaces.

xwikirollback.js[edit]

A javascript workaround to get an edit token for rollback - for use in conjunction with global rollback and Erwin's or Luxo's tools.

modrollback.js[edit]

After using rollback, this script automatically forwards you to the user's contributions page to look for other edits to revert. Be careful, since this means you won't see if there's an error message after clicking rollback.

addtools.js[edit]

screenshot of deletion form with Ajax sysop.

AJAX sysop dynamically loads information, modifies pages, and submits queries for quick sysop'ing (screenshots: deletion form, Special:Contributions, patrolling).

&action=delete
  • list subpages of both associated namespaces.
  • if on a user page, show block log.
Special:Contributions
  • checkbox to hide rollbacks from recentchanges and watchlists.
Patrolling

Discussion[edit]

Legacy JavaScript[edit]

Hello! This script has been detected as using deprecated parameters that need to be replaced with the updated version. Examples include addOnloadHook() needs to be replaced with $(); all wgGlobalVariables need to be properly gotten with mw.config.get( 'wgGlobalVariable' ); and addPortletLink needs to be called with mw.util.addPortletLink. Please see MW:ResourceLoader/Legacy JavaScript for details. Thank you. {{U|Technical 13}} (etc) 16:58, 18 January 2015 (UTC)[reply]

Done! —Pathoschild 01:47, 24 March 2015 (UTC)