Skip to content

Instantly share code, notes, and snippets.

View ierika's full-sized avatar
🏠
Working from home

Erika ierika

🏠
Working from home
View GitHub Profile
@qborreda
qborreda / getQueryParameters.js
Created March 17, 2014 10:33
getQueryParameters get url params from javascript
/*
* getQueryParameters.js
* Copyright (c) 2014 Nicholas Ortenzio
* The MIT License (MIT)
*
*/
window.getQueryParameters = function(str) {
return (str || document.location.search).replace(/(^\?)/, '').split("&").map(function(n) {
return n = n.split("="), this[n[0]] = n[1], this