Skip to content

Instantly share code, notes, and snippets.

@PaulKinlan
Last active June 1, 2016 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save PaulKinlan/3ede2ae638bf94a99221 to your computer and use it in GitHub Desktop.
Save PaulKinlan/3ede2ae638bf94a99221 to your computer and use it in GitHub Desktop.
unregister-service-worker bookmarklet
javascript: (function()%20%7B%20%0A%20%20%20%20console.log(%22test%22)%3B%0A%20%20%20%20var%20sw%20%3D%20navigator.serviceWorker%3B%0A%20%20%20%20if%20(sw.controller)%20%7B%0A%20%20%20%20%20%20sw.getRegistration(document.location).then(function(reg)%20%7B%20return%20reg.unregister()%3B%20%7D).then(function()%20%7B%20console.log(%22Unregister%20Successful%22)%20%7D).catch(function(e)%20%7B%20console.log(%22No%20Service%20Worker%3A%20%22%20%2B%20e)%7D)%3B%0A%20%20%20%20%7D%0A%20%20%7D())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment