mirror of
https://git.mirrors.martin98.com/https://github.com/cilame/v_jstools
synced 2025-08-14 10:06:09 +08:00
add
This commit is contained in:
parent
7cc92c222e
commit
78d2333d07
@ -83,9 +83,3 @@ function AttachDebugger() {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
chrome.cookies.onChanged.addListener(function(info){
|
||||
chrome.tabs.query({ active: true, currentWindow: true }, function(tabs){
|
||||
chrome.tabs.sendMessage(tabs[0].id, {action: {type:'getcookie', info: info}}, function(){})
|
||||
})
|
||||
});
|
@ -1335,7 +1335,6 @@ chrome.storage.local.get(hookers, function (result) {
|
||||
}
|
||||
})
|
||||
|
||||
var cookie_cache = {}
|
||||
chrome.extension.onMessage.addListener(function(msg, sender, sendResponse) {
|
||||
if (msg.action.type == 'error'){
|
||||
inject_script(`console.error(${JSON.stringify(msg.action.info)})`)
|
||||
@ -1349,10 +1348,4 @@ chrome.extension.onMessage.addListener(function(msg, sender, sendResponse) {
|
||||
if (msg.action.type == 'alerterror'){
|
||||
inject_script(`alert(${JSON.stringify(msg.action.info)})`)
|
||||
}
|
||||
if (msg.action.type == 'getcookie'){
|
||||
var cookie = msg.action.info.cookie
|
||||
cookie_cache[cookie.domain] = cookie_cache[cookie.domain] || {}
|
||||
cookie_cache[cookie.domain][cookie.name] = cookie.value
|
||||
inject_script('window.vilame_setter='+JSON.stringify(cookie_cache))
|
||||
}
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user