ActivePageAlert


Display an icon if a page has been edited recently, with the ability to vary the definition of "recently" on a per-other-user basis.


Installation edit

Install using the loader below.

mw.loader.load('//en.wikisource.org/w/index.php?title=User:Inductiveload/ActivePageAlert.js&action=raw&ctype=text/javascript');

Configuration edit

Set the config like this:

  mw.hook( 'active_page_alert.config' ).add( function ( apa ) {
    apa.cfg.userLimits = [
      {
          user: 'SomeUser',
          timeLimit: 120
      }
    ];
  } );

Options:

  • cfg (general config):
    • ignoreMinorEdits: minor edits do not trigger a warning, no matter how recent (default: true)
    • ignoreOwnEdits: ignore all your own edits (default: true)
    • ignoreUsers: edits by these users do not count (this is an array of regular expressions)
    • revLimit: check the most recent 'n' revisions (default: 25)
    • globalTimeLimit: the time (in minutes) after which edits don't trigger a warning any more
    • userLimits: an array of users with custom limits in the format: { user: 'userName', timeLimit: 200, icon: 'someIconId' }
      • user the other user's name (without "User:")
      • timeLimit time limit in minutes. Must be more than globalTimeLimit to be effective. Set 0 to have no time limit: you'll be alerted if the edited the page ever (within the last 'n' edits).
      • icon optional, and must exist as an ID in the icons array (you can add to this). By default user-specific warnings get a red icon.
      • ignoreMinorEdits ignore minor edits of this user. Optional: if not set, the global setting is used.
  • icons: Array of icons. Add to this if you want different icons for certain users.
    • Presets:
      • timeWarning:  
      • timeError:  
      • bot:  

Technical edit