Skip to content

Instantly share code, notes, and snippets.

@corvusdeinanis
Created December 9, 2022 20:48
Show Gist options
  • Save corvusdeinanis/df48fc43536230ce31ddd5622fe117e4 to your computer and use it in GitHub Desktop.
Save corvusdeinanis/df48fc43536230ce31ddd5622fe117e4 to your computer and use it in GitHub Desktop.
Wikipedia Citation Remover Bookmarklet

Simple javascript bookmarklet to remove numbers and []s from a wikipedia entry to make copying text / reading text from it easier.

  1. Create a new bookmark in your browser
  2. Paste the code given below and save.
  3. Visit the article you want to "clean up".
  4. Click on the bookmarklet.

Voila, it's all cleaned up. Just refresh again and everything is back to normal.

javascript:function a (){document.body.innerHTML=document.body.innerHTML.replace(/<sup\b[^>]*>(.*?)%3C\/sup%3E/gi,%20%22%22%20);return;};%20a();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment