mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-06-05 21:49:31 +02:00
Improved: "Website broken?" Link in popup menu (#278)
This commit is contained in:
@@ -439,8 +439,10 @@ popup._onDocumentLoaded = function () {
|
||||
popup._onTestingUtilityLinkClicked = function (event) {
|
||||
if (event.button === 0 || event.button === 1) {
|
||||
chrome.tabs.create({
|
||||
'url': Links.LOCALCDN_TEST_WEBSITE + popup._targetTab.url,
|
||||
'url': Links.LOCALCDN_TEST_WEBSITE,
|
||||
'active': event.button === 0,
|
||||
}, function (tab) {
|
||||
popup._injectDomain(tab.id);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -449,6 +451,16 @@ popup._onTestingUtilityLinkClicked = function (event) {
|
||||
}
|
||||
};
|
||||
|
||||
popup._injectDomain = function (tabId) {
|
||||
let message = {
|
||||
'topic': 'injection',
|
||||
'value': tabId,
|
||||
'url': popup._targetTab.url
|
||||
};
|
||||
|
||||
chrome.runtime.sendMessage(message);
|
||||
};
|
||||
|
||||
popup._onOptionsButtonClicked = function () {
|
||||
chrome.runtime.openOptionsPage();
|
||||
return window.close();
|
||||
|
Reference in New Issue
Block a user