mirror of
https://git.mirrors.martin98.com/https://github.com/cilame/v_jstools
synced 2025-08-14 21:45:58 +08:00
add
This commit is contained in:
parent
e5651d2666
commit
b719a9651d
@ -1331,18 +1331,19 @@ function inject_code(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var code_hookdom;
|
||||||
|
var code_inject;
|
||||||
chrome.storage.local.get(hookers, function (result) {
|
chrome.storage.local.get(hookers, function (result) {
|
||||||
if (result["config-hook-global"]){
|
if (result["config-hook-global"]){
|
||||||
var replacer_injectfunc = (injectfunc + '').replace('$domobj_placeholder', make_domhooker_funcs())
|
var replacer_injectfunc = (injectfunc + '').replace('$domobj_placeholder', make_domhooker_funcs())
|
||||||
var replacer_injectfunc = replacer_injectfunc.replace('$make_v_func', make_v+';')
|
var replacer_injectfunc = replacer_injectfunc.replace('$make_v_func', make_v+';')
|
||||||
result["config-hook-cookie-match"] = (result["config-hook-cookie-match"] || '').trim()
|
result["config-hook-cookie-match"] = (result["config-hook-cookie-match"] || '').trim()
|
||||||
inject_script(`(${replacer_injectfunc})(${JSON.stringify(result)},window)`);
|
inject_script(code_hookdom = `(${replacer_injectfunc})(${JSON.stringify(result)},window)`);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (result["config-myinject_toggle"]){
|
if (result["config-myinject_toggle"]){
|
||||||
var myinject = result["config-myinject"]
|
var myinject = result["config-myinject"]
|
||||||
var myinject = check_format(myinject) ? myinject : 'console.log("format error.")'
|
var myinject = check_format(myinject) ? myinject : 'console.log("format error.")'
|
||||||
inject_script(`(${(inject_code+'').replace('$myinject', myinject)})()`);
|
inject_script(code_inject = `(${(inject_code+'').replace('$myinject', myinject)})()`);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user