Code improvements

This commit is contained in:
nobody 2021-09-11 19:44:04 +02:00
parent e6f719c842
commit 78522b16d0
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
1 changed files with 23 additions and 23 deletions

View File

@ -494,64 +494,64 @@ popup._onDocumentLoaded = function () {
popup._getData().then(popup._renderContents); popup._getData().then(popup._renderContents);
}; };
popup._onTestingUtilityLinkClicked = function (event) { popup._onTestingUtilityLinkClicked = function (ev) {
if (event.button === 0 || event.button === 1) { if (ev.button === 0 || ev.button === 1) {
chrome.tabs.create({ chrome.tabs.create({
'url': Links.LOCALCDN_TEST_WEBSITE, 'url': Links.LOCALCDN_TEST_WEBSITE,
'active': event.button === 0, 'active': ev.button === 0,
}, function (tab) { }, function (tab) {
popup._injectDomain(tab.id); popup._injectDomain(tab.id);
}); });
} }
}; };
popup._onDonationButtonClicked = function () { popup._onDonationButtonClicked = function (ev) {
if (event.button === 0 || event.button === 1) { if (ev.button === 0 || ev.button === 1) {
chrome.tabs.create({ chrome.tabs.create({
'url': Links.DONATE, 'url': Links.DONATE,
'active': event.button === 0, 'active': ev.button === 0,
}); });
} }
if (event.button === 0) { if (ev.button === 0) {
window.close(); window.close();
} }
}; };
popup._onInfoButtonClicked = function () { popup._onInfoButtonClicked = function (ev) {
if (event.button === 0 || event.button === 1) { if (ev.button === 0 || ev.button === 1) {
chrome.tabs.create({ chrome.tabs.create({
'url': Links.FAQ_HTML_FILTER, 'url': Links.FAQ_HTML_FILTER,
'active': event.button === 0, 'active': ev.button === 0,
}); });
} }
if (event.button === 0) { if (ev.button === 0) {
window.close(); window.close();
} }
}; };
popup._onIncompleteTranslation = function () { popup._onIncompleteTranslation = function (ev) {
if (event.button === 0 || event.button === 1) { if (ev.button === 0 || ev.button === 1) {
chrome.tabs.create({ chrome.tabs.create({
'url': Links.WEBLATE, 'url': Links.WEBLATE,
'active': event.button === 0, 'active': ev.button === 0,
}); });
} }
if (event.button === 0) { if (ev.button === 0) {
window.close(); window.close();
} }
}; };
popup._onStatisticsButtonClicked = function () { popup._onStatisticsButtonClicked = function (ev) {
if (event.button === 0 || event.button === 1) { if (ev.button === 0 || ev.button === 1) {
chrome.tabs.create({ chrome.tabs.create({
'url': Links.STATISTICS, 'url': Links.STATISTICS,
'active': event.button === 0, 'active': ev.button === 0,
}); });
} }
if (event.button === 0) { if (ev.button === 0) {
window.close(); window.close();
} }
}; };
@ -599,14 +599,14 @@ popup._close = function () {
}); });
}; };
popup._onLoggingButtonClicked = function () { popup._onLoggingButtonClicked = function (ev) {
if (event.button === 0 || event.button === 1) { if (ev.button === 0 || ev.button === 1) {
chrome.tabs.create({ chrome.tabs.create({
'url': Links.LOGGING, 'url': Links.LOGGING,
'active': event.button === 0, 'active': ev.button === 0,
}); });
} }
if (event.button === 0) { if (ev.button === 0) {
window.close(); window.close();
} }
}; };