mirror of
https://git.mirrors.martin98.com/https://github.com/cilame/v_jstools
synced 2025-08-17 05:35:58 +08:00
add
This commit is contained in:
parent
62e135f742
commit
6e8e8d1d2f
@ -1038,7 +1038,7 @@ function injectfunc(e, window) {
|
|||||||
if (expurl.v_test(expstr)){
|
if (expurl.v_test(expstr)){
|
||||||
window.v_log(..._mk_logs('[cookie get]', r, get_log_at(expstr.trim())))
|
window.v_log(..._mk_logs('[cookie get]', r, get_log_at(expstr.trim())))
|
||||||
}
|
}
|
||||||
if (e["config-hook-cookie-add-debugger"]){ debugger }
|
if (e["config-hook-cookie-add-debugger"] && r.indexOf(e["config-hook-cookie-match"]) != -1){ debugger }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return r
|
return r
|
||||||
@ -1054,7 +1054,7 @@ function injectfunc(e, window) {
|
|||||||
if (expurl.v_test(expstr)){
|
if (expurl.v_test(expstr)){
|
||||||
window.v_log(..._mk_logs('[cookie set]', v, get_log_at(expstr.trim())) )
|
window.v_log(..._mk_logs('[cookie set]', v, get_log_at(expstr.trim())) )
|
||||||
}
|
}
|
||||||
if (e["config-hook-cookie-add-debugger"]){ debugger }
|
if (e["config-hook-cookie-add-debugger"] && v.indexOf(e["config-hook-cookie-match"]) != -1){ debugger }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return _old_cookie_set.apply(this, arguments)
|
return _old_cookie_set.apply(this, arguments)
|
||||||
@ -1261,6 +1261,7 @@ var hookers = [
|
|||||||
"config-hook-cookie-add-debugger",
|
"config-hook-cookie-add-debugger",
|
||||||
"config-hook-cookie-get",
|
"config-hook-cookie-get",
|
||||||
"config-hook-cookie-set",
|
"config-hook-cookie-set",
|
||||||
|
"config-hook-cookie-match",
|
||||||
"config-hook-encrypt-normal",
|
"config-hook-encrypt-normal",
|
||||||
"config-hook-JSON.parse",
|
"config-hook-JSON.parse",
|
||||||
"config-hook-JSON.stringify",
|
"config-hook-JSON.stringify",
|
||||||
@ -1325,6 +1326,7 @@ 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()
|
||||||
inject_script(`(${replacer_injectfunc})(${JSON.stringify(result)},window)`);
|
inject_script(`(${replacer_injectfunc})(${JSON.stringify(result)},window)`);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,8 @@
|
|||||||
<br/>
|
<br/>
|
||||||
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-cookie-add-debugger">hook-cookie-add-debugger</label>
|
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-cookie-add-debugger">hook-cookie-add-debugger</label>
|
||||||
<br/>
|
<br/>
|
||||||
|
<input style="margin-left: 40px; width: 150px; height: 12px; margin-top: 3px" type="text" data-key="config-hook-cookie-match" id="cookie_match"><label>对匹配字符串的cookie才下断(不设置则为全部都下断)</label>
|
||||||
|
<br/>
|
||||||
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-cookie-get">hook-cookie-get</label>
|
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-cookie-get">hook-cookie-get</label>
|
||||||
<br/>
|
<br/>
|
||||||
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-cookie-set">hook-cookie-set</label>
|
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-cookie-set">hook-cookie-set</label>
|
||||||
|
@ -510,6 +510,14 @@ get_now.addEventListener("click", function(){
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
var cookie_match = document.getElementById('cookie_match');
|
||||||
|
cookie_match.addEventListener("click", function(){
|
||||||
|
var show_now = document.getElementById('show_now')
|
||||||
|
show_now.value = +new Date+''
|
||||||
|
chrome.storage.local.set({
|
||||||
|
[show_now.dataset.key]: show_now.value
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user