Created
May 26, 2011 19:42
-
-
Save tristen/993895 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // 1. if mailto: return it all | |
| // (mailto\:) | |
| // 2. if http/https return the relative path | |
| // ([http?s]\:\/\/)?(\/.*) ------------> .exec(path)[2] | |
| // 3. If there is a hash, return everything after the hash | |
| // .... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
get a url
if it's http or https,
if not