From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

Languages: EnglishNederlands


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.


  • Paste this code in common.js on your local wiki, or in global.js on Meta to use it everywhere you go:
The [[File:Krinkle_AjaxPatrolLinks.js]] line is used for statistics.
  • Yes check.svg Done :-)

If you encounter any issues, please let me know!


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 


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.