Skip to content

Instantly share code, notes, and snippets.

@kevinashworth
Last active July 31, 2020 18:10
Show Gist options
  • Save kevinashworth/7999204 to your computer and use it in GitHub Desktop.
Save kevinashworth/7999204 to your computer and use it in GitHub Desktop.
javascript:h=location.href;i=h.indexOf(%27imdb.com%27);p=h.indexOf(%27https://pro.imdb.com%27);t=h.indexOf(%27title%27);c=h.indexOf(%27combined%27);f=h.indexOf(%27fullcredits%27);r=h.indexOf(%27reference%27);badword=Math.max(c,f,r);if(i==-1) {window.location=%27https://pro.imdb.com/name/nm2825198/%27}else if(p==0) {window.location=h.replace(%27https://pro%27,%27https://www%27)}else if(p==-1){if((t>1)&&(badword>1)){h=h.substring(0,badword)}window.location=h.replace(/https:\/\/[a-z]+/,%27https://pro%27);};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment