MCPcopy Create free account
hub / github.com/XIU2/UserScript / getQueryVariable

Function getQueryVariable

Zhiyoo-Enhanced.user.js:480–488  ·  view source on GitHub ↗
(variable)

Source from the content-addressed store, hash-verified

478
479 // 获取GET参数
480 function getQueryVariable(variable) {
481 var query = window.location.search.substring(1);
482 var vars = query.split("&");
483 for (var i=0;i<vars.length;i++) {
484 var pair = vars[i].split("=");
485 if(pair[0] == variable){return pair[1];}
486 }
487 return(false);
488 }
489})();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected