mirror of
https://dl.bcrjl.com/ghg/HaoOuBa/Joe.git
synced 2026-02-17 13:10:05 +08:00
更新
This commit is contained in:
@@ -10,6 +10,21 @@
|
||||
BAIDU_PUSH: <?php echo $this->options->JBaiduToken ? 'true' : 'false' ?>,
|
||||
encryption: str => window.btoa(unescape(encodeURIComponent(str))),
|
||||
decrypt: str => decodeURIComponent(escape(window.atob(str))),
|
||||
changeURLArg: function(url, arg, arg_val) {
|
||||
let pattern = arg + '=([^&]*)'
|
||||
let replaceText = arg + '=' + arg_val
|
||||
if (url.match(pattern)) {
|
||||
let tmp = '/(' + arg + '=)([^&]*)/gi'
|
||||
return url.replace(eval(tmp), replaceText)
|
||||
} else {
|
||||
if (url.match('[?]')) {
|
||||
return url + '&' + replaceText
|
||||
} else {
|
||||
return url + '?' + replaceText
|
||||
}
|
||||
}
|
||||
return url + '\n' + arg + '\n' + arg_val
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user