mirror of
https://git.mirrors.martin98.com/https://github.com/cilame/v_jstools
synced 2025-07-21 06:54:25 +08:00
add
This commit is contained in:
parent
83151df98e
commit
7c585a3a32
@ -50,14 +50,13 @@ chrome.debugger.onDetach.addListener(function(){
|
|||||||
attached = false
|
attached = false
|
||||||
})
|
})
|
||||||
var attached = false
|
var attached = false
|
||||||
var currtab;
|
|
||||||
function AttachDebugger() {
|
function AttachDebugger() {
|
||||||
if (attached){ return }
|
if (attached){ return }
|
||||||
attached = true
|
attached = true
|
||||||
chrome.tabs.query(
|
chrome.tabs.query(
|
||||||
{ active: true, currentWindow: true },
|
{ active: true, currentWindow: true },
|
||||||
function (tabs) {
|
function (tabs) {
|
||||||
currtab = { tabId: tabs[0].id };
|
var currtab = { tabId: tabs[0].id };
|
||||||
chrome.debugger.attach(currtab, "1.2", function () {
|
chrome.debugger.attach(currtab, "1.2", function () {
|
||||||
// Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
|
// Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
|
||||||
sendCommand("Network.enable", {}, currtab, function(){ sendCommand("Network.setCacheDisabled", {cacheDisabled: true}, currtab)} ) // 确保 Fetch.getResponseBody 一定能收到东西
|
sendCommand("Network.enable", {}, currtab, function(){ sendCommand("Network.setCacheDisabled", {cacheDisabled: true}, currtab)} ) // 确保 Fetch.getResponseBody 一定能收到东西
|
||||||
|
Loading…
x
Reference in New Issue
Block a user