Created
July 10, 2018 10:05
-
-
Save anshuraj/1211a003040fc7b83621bd67b6a42c86 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
const getQueryVariable = variable => { | |
const query = window.location.search.substring(1); | |
const params = query.split("&"); | |
for (let i=0;i<params.length;i++) { | |
const pair = params[i].split("="); | |
if(pair[0] == variable) { | |
return pair[1]; | |
} | |
} | |
return false; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment