User:Eizen/AutoPurge

This is the documentation page for the AutoPurge.js user script.

AutoPurge is a JavaScript user script that automatically purges and reloads any pages within a user-defined window array. It performs in a similar manner to the standard Ctrl + F5 purge keyboard shortcut and the assorted null edit/purge button scripts and gadgets, but does so automatically upon navigating to a page listed in the array.

Installation
The script may be used in a personal common.js file.

It may be imported to a global.js file as well through the addition of the following import statement:

Note that a window variable, notated as window.autoPurgePages = ["Page_1", "Page_2"]; must be included for the script to function. Pages in the array must be encoded and should match the value of the page's mw.config.get("wgPageName"); value.