Skip to content

Instantly share code, notes, and snippets.

@matths
Created April 30, 2014 15:26
Show Gist options
  • Save matths/3433c24c3a42485d6d7f to your computer and use it in GitHub Desktop.
Save matths/3433c24c3a42485d6d7f to your computer and use it in GitHub Desktop.
https2http Snippet

https2http Bookmarklet

Replace all occourences of "https" with "http" in the following tags.atrributes:

  • script.src
  • link.href
Array.prototype.slice.call(document.querySelectorAll('script')).map(function(v,i) { v.src = v.src.replace(/https/, 'http'); console.log(i, v.src);});Array.prototype.slice.call(document.querySelectorAll('link')).map(function(v,i) { v.href = v.href.replace(/https/, 'http'); console.log(i, v.href);});

Add "Javascript:" to add as Bookmarklet or run directly in you DevTools console using copy & paste.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment