Last active
March 1, 2018 09:08
-
-
Save biboletin/d0f0c4d4541465b8cd6dc0397fc2dfe8 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
/*global browser, window, body, document, alert */ | |
var URL = (function () { | |
"use strict"; | |
var url = window.location.href; | |
var params = url.split("?"); | |
var keyValues = params[1].split("&"); | |
var objectArray = {}; | |
var keys; | |
var part; | |
for (keys in keyValues) { | |
part = keyValues[keys].split("="); | |
objectArray[part[0]] = decodeURIComponent(part[1]); | |
} | |
return objectArray; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment