clear fetch pool when click cancel
This commit is contained in:
@@ -2,6 +2,7 @@ import browser from "webextension-polyfill";
|
||||
import {
|
||||
MSG_FETCH,
|
||||
MSG_FETCH_LIMIT,
|
||||
MSG_FETCH_CLEAR,
|
||||
DEFAULT_SETTING,
|
||||
DEFAULT_RULES,
|
||||
DEFAULT_SYNC,
|
||||
@@ -62,6 +63,10 @@ browser.runtime.onMessage.addListener(
|
||||
fetchPool.update(interval, limit);
|
||||
sendResponse({ data: "ok" });
|
||||
break;
|
||||
case MSG_FETCH_CLEAR:
|
||||
fetchPool.clear();
|
||||
sendResponse({ data: "ok" });
|
||||
break;
|
||||
default:
|
||||
sendResponse({ error: `message action is unavailable: ${action}` });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user