User:Krinkle/Scripts/AjaxPatrolLinks

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search
Comment This gadget is obsolete. This ajax patrol feature has been added to the MediaWiki software. It was released in MediaWiki 1.21 and deployed to Wikimedia projects in November 2012.

Languages: EnglishNederlands

Description[edit]

Thanks to Bradv from the English Wikipedia who wrote the original script which was an inspiration for this script.

Makes patrollinks execute within the page, without an additional page load. Including self-closing bookmarklet option.

Install[edit]

Please leave the [[File:Krinkle_AjaxPatrolLinks.js]] in for statistics+
  • Yes check.svg Done :-)

If nothing appears, be sure to verify that you've put the above code on the wiki you use the tool on, not per se here on Meta. Note that this tool is optimized for WebKit (Safari, Chrome) browsers. It should also work fine in Mozilla (Firefox). Internet Explorer will not be supported.
Also clear your cache and do a hard refresh. If you encounter any issues, please let me know!

How to clear cache

Note: After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac); IE: hold Ctrl while clicking Refresh, or press Ctrl-F5; Konqueror: simply click the Reload button, or press F5; Opera users may need to completely clear their cache in Tools→Preferences.

Usage

If you're patrolling via the RecentChanges you can open up several diff-links by opening them in tabs. To avoid waiting for an additional page to load or opening even more browsers. With this script installed you can do it right in the page.

Afterwards you can close the tab in most browsers with control w (CTRL-W) in Windows and Linux, or command w(⌘W or W) on a Mac.

If you find it annoying that the [Mark as patrolled] link is not being in the exact same place on every place (depending on the Edit summary's length) and/or are too lazy to move the mouse back and forth; add a bookmarklet to your bookmarks bar.

If you don't know how to make bookmarlet, Go here and drag them into your bookmarks bar from there.
javascript:(function(){ jQuery(".patrollink a").click(); })();

To make it even easier, the script also has a hook to close the tab after the mark-action was completed. Use the following bookmarklet to mark an edit and close the tab with a single click in your bookmarksbar.

javascript:(function(){ window.kAjaxPatrolLinks_closeafter=true;jQuery(".patrollink a").click(); })();

Clicking that will trigger the patrollink and close the tab afterwards for you. Now you can open a bunch of tabs, hover your mouse over the bookmarklet and go over them one-by-one, and patrol the good edits with a single click.

Install as Gadget

(These instructions are for sysops who can edit in the MediaWiki:-namespace)

  • Copy the the Install snippet to your wiki's MediaWiki:Gadget-AjaxPatrolLinks.js (just like when you would install it in your user script)
  • Create MediaWiki:Gadget-AjaxPatrolLinks with something like the following:
Makes patrollinks excecute within the page, without an additional page load. See [[m:User:Krinkle/Scripts/AjaxPatrolLinks]] for more info. 
  • Then add a line in MediaWiki:Gadgets-definition somewhere with:
    * AjaxPatrolLinks[ResourceLoader]|AjaxPatrolLinks.js 
    

Feedback

If you experiences any issues, have suggestions for how something could be better, have a good idea for a feature request – or want to report a bug ? Please leave a message on my Tools-talkpage.

See also[edit]

Check also my other Tools and Scripts here.