Browse Source

`getUrlParameter` fixes as in http://stackoverflow.com/a/8764051/166524

pull/65/head
Lapo Luchini 10 years ago
parent
commit
e1e2c07f2b
1 changed files with 1 additions and 5 deletions
  1. +1
    -5
      pinry/static/js/helpers.js

+ 1
- 5
pinry/static/js/helpers.js View File

@@ -56,9 +56,5 @@ function postPinData(data) {


function getUrlParameter(name) {
var decode = decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
);
if (decode == 'null') return null;
else return decode;
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null;
}

Loading…
Cancel
Save