permission scripting removed (#1274)
This commit is contained in:
parent
e2a08d16e7
commit
42ef48817a
|
@ -44,15 +44,6 @@ messenger._handleMessageReceived = function (message, sender, sendResponse) {
|
||||||
sendResponse({'value': stateManager.tabs[value].injections});
|
sendResponse({'value': stateManager.tabs[value].injections});
|
||||||
return MessageResponse.SYNCHRONOUS;
|
return MessageResponse.SYNCHRONOUS;
|
||||||
|
|
||||||
case 'tab:inject':
|
|
||||||
chrome.scripting.executeScript(value, {
|
|
||||||
'code': `window.addEventListener('load', () => {
|
|
||||||
document.getElementById('domain').value = '${message.url}';
|
|
||||||
});`,
|
|
||||||
'runAt': 'document_idle'
|
|
||||||
});
|
|
||||||
return MessageResponse.SYNCHRONOUS;
|
|
||||||
|
|
||||||
case 'domain:fetch-is-allowlisted':
|
case 'domain:fetch-is-allowlisted':
|
||||||
sendResponse({'value': Boolean(helpers.checkAllowlisted(value, requestAnalyzer.allowlistedDomains))});
|
sendResponse({'value': Boolean(helpers.checkAllowlisted(value, requestAnalyzer.allowlistedDomains))});
|
||||||
return MessageResponse.SYNCHRONOUS;
|
return MessageResponse.SYNCHRONOUS;
|
||||||
|
|
|
@ -25,8 +25,7 @@
|
||||||
"storage",
|
"storage",
|
||||||
"webNavigation",
|
"webNavigation",
|
||||||
"webRequest",
|
"webRequest",
|
||||||
"webRequestBlocking",
|
"webRequestBlocking"
|
||||||
"scripting"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
"host_permissions": [
|
"host_permissions": [
|
||||||
|
|
|
@ -503,8 +503,10 @@ popup._onTestingUtilityLinkClicked = function (ev) {
|
||||||
chrome.tabs.create({
|
chrome.tabs.create({
|
||||||
'url': Links.LOCALCDN_TEST_WEBSITE,
|
'url': Links.LOCALCDN_TEST_WEBSITE,
|
||||||
'active': ev.button === 0,
|
'active': ev.button === 0,
|
||||||
}, function (tab) {
|
}, function () {
|
||||||
popup._injectDomain(tab.id);
|
setTimeout(function () {
|
||||||
|
popup._close();
|
||||||
|
}, 200);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -560,19 +562,6 @@ popup._onStatisticsButtonClicked = function (ev) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
popup._injectDomain = function (tabId) {
|
|
||||||
let message = {
|
|
||||||
'topic': 'tab:inject',
|
|
||||||
'value': tabId,
|
|
||||||
'url': popup._targetTab.url
|
|
||||||
};
|
|
||||||
|
|
||||||
chrome.runtime.sendMessage(message);
|
|
||||||
setTimeout(function () {
|
|
||||||
popup._close();
|
|
||||||
}, 200);
|
|
||||||
};
|
|
||||||
|
|
||||||
popup._onOptionsButtonClicked = function () {
|
popup._onOptionsButtonClicked = function () {
|
||||||
chrome.runtime.openOptionsPage();
|
chrome.runtime.openOptionsPage();
|
||||||
return window.close();
|
return window.close();
|
||||||
|
|
Loading…
Reference in New Issue