Last active
February 1, 2022 00:19
-
-
Save phalkunz/c393244aa327fdca5c7b81678343812e to your computer and use it in GitHub Desktop.
This file contains 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
function getQueryParam(name) { | |
window.location.search | |
const paramStr = window.location.search.substr(1).split('&').find(param => param.includes(`${name}=`)); | |
const nameValue = paramStr.split('='); | |
if (nameValue.length === 2) { | |
return nameValue[1]; | |
} | |
return null; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment