Skip to content

Instantly share code, notes, and snippets.

@BookGin
Last active July 12, 2023 16:10
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save BookGin/4e6cc407ba979f7a8f4f43485009d359 to your computer and use it in GitHub Desktop.
Save BookGin/4e6cc407ba979f7a8f4f43485009d359 to your computer and use it in GitHub Desktop.
Unregister all service workers in Firefox.
# navigate to about:debugging#workers first
for (let k of document.getElementsByClassName("unregister-link")) k.click()
for (let k of document.getElementsByClassName("qa-unregister-button")) k.click()
@slater
Copy link

slater commented Oct 18, 2020

they changed the className, at least in Firefox 81, now should be:

for (let k of document.getElementsByClassName("qa-unregister-button")) k.click()

@BookGin
Copy link
Author

BookGin commented Oct 19, 2020

they changed the className, at least in Firefox 81, now should be:

for (let k of document.getElementsByClassName("qa-unregister-button")) k.click()

I've updated the code snippet. Thank you!

@idanoo
Copy link

idanoo commented Apr 19, 2021

I had to update it to the following to work for me on FF 87.0

for (let k of document.querySelectorAll('[data-l10n-id="unregister-button"]')) k.click()

@kkm000
Copy link

kkm000 commented May 23, 2022

Thanks! This did it for me (FF 101.0b9, Developer Edition):

$$('.qa-unregister-button').forEach(b => b.click()) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment