Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A tiny bit of logic to strip off any protocol from a URL.
// strip off the protocol
url = '';
if ( url.indexOf('://') != -1 ) {
url = url.substr( url.indexOf('://') + 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment