Skip to content

Instantly share code, notes, and snippets.

@darachm
Last active June 5, 2021 06:44
Show Gist options
  • Save darachm/fed3958030eee2f175c9a6c7110b5006 to your computer and use it in GitHub Desktop.
Save darachm/fed3958030eee2f175c9a6c7110b5006 to your computer and use it in GitHub Desktop.
save as bookmark(let), where this is the location, then click on a webpage to turn many of masks into pants
javascript:document.querySelectorAll('p, span, li, h1, h2, h3, h4, h5, h6')
.forEach(function(x){
if(x.innerText){
x.innerText=x.innerText.replace(/A mask is/g,'Pants are');
x.innerText=x.innerText.replace(/mask is/g,'pants are');
x.innerText=x.innerText.replace(/a mask/g,'pants');
x.innerText=x.innerText.replace(/masks/g,'pants');
x.innerText=x.innerText.replace(/mask/g,'pants');
x.innerText=x.innerText.replace(/Masks/g,'Pants');
x.innerText=x.innerText.replace(/Mask/g,'Pants');
}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment