Last active
January 4, 2016 06:19
-
-
Save jesus2099/8580947 to your computer and use it in GitHub Desktop.
(☠OBSOLETE) MusicBrainz bookmarklet : “search→replace”
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:function sr(s,r){var ins=document.querySelectorAll("input[type='text'][name$='name']:not([value='']),input[type='text'][class$='name']:not([value=''])");for(var i=0;i<ins.length;i++){var v=s.match(/^\/.+\/[gi]*$/)?ins[i].value.replace(eval(s),r):ins[i].value.split(s).join(r);ins[i].style.removeProperty("background-color");if(ins[i].value!=v){ins[i].value=v;ins[i].style.setProperty("background-color","yellow");ins[i].focus();}}}void(sr(prompt("search\n\neither regex (case *i*nsensitive and *g*lobal are optional flags): /regex/ig\n\nor normal (case sensitive and global): My String"),prompt("replace"))); |
A cropped down version (only works on tracklists) has been integrated in SUPER SRIPT’s TRACKLIST_TOOLS (link above).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this doesn’t work in the new release editor, i will integrate for fix in SUPER SCRUPT.