Last active
August 12, 2019 04:30
-
-
Save luislobo14rap/b68a4a280d2e9a81c74829b0b30694d4 to your computer and use it in GitHub Desktop.
getLink.js
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
// getLink.js v2.1 | |
function getLink(link = location.href){ | |
return link.split(/[?#&]/)[0].replace(/\/+$/, ''); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment