Jump to content

User:NQ/WatchlistResetConfirm

From Wikipedia, the free encyclopedia

Adds a confirmation prompt when you click the "Mark all pages as visited" button on your watchlist.

Uses mw:API:SetNotificationTimestamp to reset the watchlist without refreshing the page.


Installation

[edit]

Add the following to your common.js:

{{subst:iusc|User:NQ/WatchlistResetConfirm.js}}

It is recommended that you hide the reset button by adding the following code to your common.css. This way, the button is shown only after the script is loaded thereby preventing accidental clicks.

/*Hides the “Mark all pages as visited” button on [[Special:Watchlist]] by default. 
Works alongside [[User:NQ/WatchlistResetConfirm.js]] which displays the button only after the script is loaded.  */
#mw-watchlist-resetbutton { display: none; }