From 741cf154fef981fd60480177575ed2ee3b317a42 Mon Sep 17 00:00:00 2001 From: eson Date: Fri, 20 Nov 2020 19:13:45 +0800 Subject: [PATCH] =?UTF-8?q?TODO:=201.=20=E7=94=9F=E6=88=90=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E9=9C=80=E6=B1=82=E7=9A=84tab.=20=E6=96=B9=E4=BE=BF?= =?UTF-8?q?=E5=A4=9A=E8=BF=9B=E7=A8=8B=E5=A4=84=E7=90=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?.=202.=20=E5=A4=84=E7=90=86chromeproxy=5Fclient=E7=9A=84hash?= =?UTF-8?q?=E8=B7=AF=E5=BE=84.=20=E8=80=8C=E4=B8=8D=E6=98=AFlabel.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chromeproxy/background/worker.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/chromeproxy/background/worker.js b/chromeproxy/background/worker.js index b6d8d8b..4d9ff41 100644 --- a/chromeproxy/background/worker.js +++ b/chromeproxy/background/worker.js @@ -31,7 +31,7 @@ function FinishTask(sender, content) { var formdata = new FormData(); formdata.append("taskid", task.data.taskid); formdata.append("content", content); - console.log(task.data.taskid); + // console.log(task.data.taskid); fetch(FinishTaskUrl, {method: "POST", body: formdata }).then(function (response) { if (response.ok) { response.json().then(function (value) { @@ -45,7 +45,7 @@ function FinishTask(sender, content) { // TODO: 汇报错误 // ErrorTask(sender, error); console.log(error) - GetTask(sender); + // GetTask(sender); return; }); } @@ -95,6 +95,11 @@ chrome.webRequest.onBeforeRequest.addListener(function (details) { var params = new URLSearchParams(details.url) UpdateHost(params.get("taskurl")) chrome.tabs.remove(details.tabId, function () { }); + chrome.tabs.query({currentWindow: true}, function(tabs) { + for( tab in tabs) { + console.log(tab); + } + }) return { cancel: true }; } }, { 'urls': [""] }, ['blocking']); \ No newline at end of file