Extractor.watch() improvements

- only watch current window
- stop watch on window close
- don't ask user to confirm when fails
This commit is contained in:
2020-01-15 18:28:28 +08:00
parent 7644a1363f
commit d82010686d
3 changed files with 65 additions and 22 deletions

View File

@ -31,7 +31,7 @@ export function sendMessage<T>(
loop();
async function loop() {
logger.debug("Request for", req.action);
logger.debug("Request for", Actions[req.action]);
let tabAvailable = await getTabByID(tab.id);
if (!tabAvailable) {
reject("Task interrupted due to the target tab is closed.");