Created
February 4, 2014 08:55
-
-
Save theeluwin/8800225 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
| function get_url_params() { | |
| var search = window.location.search.substring(1); | |
| if(search) { | |
| return JSON.parse('{"' + decodeURI(search.replace(/"/g, '\\"')).replace(/&/g, '","').replace(/=/g,'":"') + '"}'); | |
| } else { | |
| return {}; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment