Topic on Help talk:Notifications

How to: Clear all notifications at a single wiki

6
Summary last edited by Quiddity (WMF) 20:48, 5 August 2016 7 years ago

Now also possible by using Special:Notifications - at the wiki you want to clear notifications from, click the "cog" icon in the upper corner, there's a link to "Mark all as read in selected wiki".

Quiddity (WMF) (talkcontribs)

If you have "99+" showing, even after clicking "Mark all as read" a few times, and you want to clear absolutely all local notifications at that wiki...

Steps to reset (mark as read) all local notifications on a single wiki:

  1. Go to the local special:mypage/common.js -- (At the wiki you want to reset)
  2. Edit that page, to add this line at the bottom
    new mw.Api().postWithToken('csrf', {action:'echomarkread', all:1});
  3. Save that.
  4. Open any regular page on that wiki, and watch the notifications badge-counter go to 0. -- (cross-wiki notifications will still exist)
  5. Important - Revert your edit at your common.js -- (otherwise it will autoclear everything before you see it, forever!)

Done!


There is a feature-request for making this short process into a single button, phab:T71732, but until that is completed, the manual instructions above will help a few people.

Catrope (talkcontribs)

If you know how to open your browser's JavaScript console you can also paste the line of code from step #2 directly into there. If you do that, you won't have to do any of the other steps.

Hoverfish (talkcontribs)

Thank you for the above tip. My notifications were cleared, but I still have a problem with the alerts, they go as far back as 3 years. Is there a similar common.js line to clear them too?

Quiddity (WMF) (talkcontribs)

If you go to Special:Notifications at the wiki you want to clear notifications from, and click the "cog" icon in the upper corner, there's a link to "Mark all as read in selected wiki". That should do it.

Hoverfish (talkcontribs)

I have all scripts enabled and no adblock for en.wikipedia. Clicking the cog offers two options: Preferences (my preferences page) and Learn More. Apart from the cog I see a "readState InboxWidget" All / Read / Unread. Clicking on the "Read" fades the list temporarily but does not clear the messages. I've tried it many times with Firefox and Chrome.

Quiddity (WMF) (talkcontribs)

Hoverfish, Oh, are you using the mobileweb version? (I see that version does not yet have the link). If so, please try the desktop version (this link should work).

If that doesn't explain it, then please tell me which browser/OS you are using, and optionally include a screenshot (feel free to email it to me at nwilsonwikimedia.org for privacy).

Reply to "How to: Clear all notifications at a single wiki"