permission scripting removed (#1274)

This commit is contained in:
nobody 2022-12-29 08:33:16 +01:00
parent e2a08d16e7
commit 42ef48817a
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
3 changed files with 5 additions and 26 deletions

View File

@ -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;

View File

@ -25,8 +25,7 @@
"storage",
"webNavigation",
"webRequest",
"webRequestBlocking",
"scripting"
"webRequestBlocking"
],
"host_permissions": [

View File

@ -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();