Jump to content

User:Animum/urlparameters.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// Copied from [[User:DerHexer]] with extreme pride (and a few modifications)

var UrlParameters = new Array ();
 
function readparams() { 
    // Get URL parameters
    var asReadInUrlParameters = location.search.substring(1, location.search.length).split("&");
    for (i = 0; i < asReadInUrlParameters.length; i++) {
        var asReadInUrlParameter = asReadInUrlParameters[i].split("=");
        UrlParameters[decodeURIComponent(asReadInUrlParameter[0])] = decodeURIComponent(asReadInUrlParameter[1]);
    }
}

readparams();