User:Ahecht/Scripts/refresh
| Authors | en:User:Ahecht, based on code by IKhitron |
|---|---|
| Status | Stable |
| Updated | March 25, 2025 (8 months ago) |
| Source Beta | User:Ahecht/Scripts/refresh.js User:Ahecht/sandbox/Scripts/refresh.js |
Ahecht's Refresh is a user script that adds "purge all" and "null edit all" options to the "Tools" menu on category pages, template pages, and on Special:WhatLinksHere and Special:Search. Makes forcelinkupdate purges or nulledit on all pages in the category (if activated from a category page), all pages that transclude the template (if activated from a template page), all pages linking to the target page (if activated from Special:WhatLinksHere), or all pages in a search result (if activated from Special:Search).
Based on phab:T170039#3473755 and he:User:IKhitron/101.js. Note that, per phab:T365303, category updates may take a few minutes even after a null edit with this script.
To use this script: Copy the line below, then [[click here]], paste the line, and hit .
{{subst:Iusc|User:Ahecht/Scripts/refresh.js|User:Ahecht/Scripts/refresh}}- Report any issues to me, Ahecht.
Options
[edit]By default, the script will reuse the same bubble notification for each page it refreshes. To have each notification in its own bubble, add var refreshReuseBubble = false; to your Special:MyPage/common.js above the line that calls refresh.js.
Other options that can be set via the javascript console:
- To shuffle the order in which pages are refreshed, open the console and type
window.refreshShuffle = true;and press enter before running the script. - For items in a category, the script defaults to sorting by
timestampindescendingorder (newest first). You can change this by settingwindow.refreshCatSort='sortkey';or by settingwindow.refreshCatDir='ascending';(or'asc') before running the script. - For search results, the script defaults to sorting by
last_edit_desc. You can change this by settingwindow.refreshSearchSort='VALUE';, where VALUE is one of the options forsrsortspecified at mw:API:Search.