Jump to content

User:Ahecht/Scripts/refresh

From Wikipedia, the free encyclopedia
User:Ahecht/Scripts/refresh
Author(s)en:User:Ahecht, based on code by IKhitron
StatusStable
UpdatedMarch 25, 2025
    (31 days 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.

To use this script: Copy the line below, then [[click here]], paste the line, and hit Publish changes.

  • {{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 timestamp in descending order (newest first). You can change this by setting window.refreshCatSort='sortkey'; or by setting window.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 setting window.refreshSearchSort='VALUE';, where VALUE is one of the options for srsort specified at mw:API:Search.

See also

[edit]