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});
|
||||
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':
|
||||
sendResponse({'value': Boolean(helpers.checkAllowlisted(value, requestAnalyzer.allowlistedDomains))});
|
||||
return MessageResponse.SYNCHRONOUS;
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
"storage",
|
||||
"webNavigation",
|
||||
"webRequest",
|
||||
"webRequestBlocking",
|
||||
"scripting"
|
||||
"webRequestBlocking"
|
||||
],
|
||||
|
||||
"host_permissions": [
|
||||
|
|
|
@ -503,8 +503,10 @@ popup._onTestingUtilityLinkClicked = function (ev) {
|
|||
chrome.tabs.create({
|
||||
'url': Links.LOCALCDN_TEST_WEBSITE,
|
||||
'active': ev.button === 0,
|
||||
}, function (tab) {
|
||||
popup._injectDomain(tab.id);
|
||||
}, function () {
|
||||
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 () {
|
||||
chrome.runtime.openOptionsPage();
|
||||
return window.close();
|
||||
|
|
Loading…
Reference in New Issue