add test for chrome.tabs.TAB_ID_NONE

This commit is contained in:
epicgirl1998
2017-03-23 16:06:39 +02:00
parent 177f46518b
commit 7253c30c21
+13
View File
@@ -210,6 +210,19 @@ function executeScriptFramed () {
}
// for chrome.tabs.TAB_ID_NONE
function realTabsOnly () {
chrome.webRequest.onBeforeRequest.addListener(function (details) {
if (details.tabId === chrome.tabs.TAB_ID_NONE) {
console.log("Request not related to a tab. %o", details);
return;
}
// ...
}, {
urls: ["<all_urls>"]
});
}
// contrived settings example
function proxySettings() {
chrome.proxy.settings.get({ incognito: true }, (details) => {