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