qr-check.js
466 Bytes
var qrCheck = {
getQuery: function(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
var r = window.location.search.substr(1).match(reg);
if (r !== null) {
return unescape(r[2]);
}
return null;
},
init: function() {
var qr = this.getQuery('qr');
if (qr) {
location.href = 'http://union.yoho.cn/union/app-downloads.html';
}
}
};
qrCheck.init();