User:Shahadat/AutoPurge

From Justapedia, unleashing the power of collective wisdom
Jump to navigation Jump to search
AutoPurge
DescriptionAutomatically purges cache and reloads pages listed in window array
Author(s)Shahadat
StatusBeta
UpdatedAugust 13, 2017; 6 years ago (2017-08-13)
Browser supportDeveloped in Google Chrome
Skin supportAny
SourceUser:Shahadat/AutoPurge.js
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.

importScript("User:Shahadat/AutoPurge.js");


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.

window.autoPurgePages = ["Page_1", "Page_2"];
importScript("User:Shahadat/AutoPurge.js");

Script Attribution