Skip to content

Instantly share code, notes, and snippets.

@ryancdotorg
Created March 1, 2023 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryancdotorg/ac3c8581c79765fd42978706082b2988 to your computer and use it in GitHub Desktop.
Save ryancdotorg/ac3c8581c79765fd42978706082b2988 to your computer and use it in GitHub Desktop.
// In your browser, add a new bookmark with the following in the URL
// field and name it "Mx it up" (or whatever you fancy). This is known
// as a "bookmarklet" - if you select it from the bookmarks menu it
// will run on the page you currently have open.
javascript:(D=>{D.querySelectorAll("option[value^=mrs i]").forEach(N=>{for(var r=D.createElement("option"),p=N.parentNode,o=p.children,t=0;t<o.length;++t)if(/^mx/i.test(o[t].value))return o[t].selected=!0;r.value=r.innerText=N.value.replace(/rs/i,s=>"R"==s[0]?"X":"x"),p.appendChild(r),r.selected=!0})})(document)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment