change browserAction -> action (#1274)

This commit is contained in:
nobody 2022-12-29 07:30:05 +01:00
parent fcf246936f
commit e2a08d16e7
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
2 changed files with 11 additions and 11 deletions

View File

@ -30,7 +30,7 @@ var wrappers = {};
*/
wrappers.setBadgeBackgroundColor = function (details) {
if (chrome.browserAction.setBadgeBackgroundColor === undefined) {
if (chrome.action.setBadgeBackgroundColor === undefined) {
return;
}
@ -47,7 +47,7 @@ wrappers.setBadgeBackgroundColor = function (details) {
};
wrappers.setBadgeTextColor = function (details) {
if (chrome.browserAction.setBadgeTextColor === undefined) {
if (chrome.action.setBadgeTextColor === undefined) {
return;
}
@ -64,8 +64,8 @@ wrappers.setBadgeTextColor = function (details) {
};
wrappers.setBadgeText = function (tabId, text) {
if (chrome.browserAction.setBadgeText !== undefined) {
chrome.browserAction.setBadgeText({
if (chrome.action.setBadgeText !== undefined) {
chrome.action.setBadgeText({
'tabId': tabId,
'text': `${text}`
});
@ -73,9 +73,9 @@ wrappers.setBadgeText = function (tabId, text) {
};
wrappers.setIcon = function (details, type) {
if (chrome.browserAction.setIcon) {
if (chrome.action.setIcon) {
details.path = IconType[details.path][type];
chrome.browserAction.setIcon(details);
chrome.action.setIcon(details);
}
};
@ -95,15 +95,15 @@ wrappers.setBadgeColoring = function (tabId, value) {
return;
}
if (chrome.browserAction.setBadgeTextColor !== undefined) {
chrome.browserAction.setBadgeTextColor({
if (chrome.action.setBadgeTextColor !== undefined) {
chrome.action.setBadgeTextColor({
'tabId': tabId,
'color': textColor
});
}
if (chrome.browserAction.setBadgeBackgroundColor !== undefined) {
chrome.browserAction.setBadgeBackgroundColor({
if (chrome.action.setBadgeBackgroundColor !== undefined) {
chrome.action.setBadgeBackgroundColor({
'tabId': tabId,
'color': backgroundColor
});

View File

@ -29,7 +29,7 @@ var optionsOther = {};
optionsOther._renderIconSection = function (opt) {
let url, bgColor, txtColor, selectedIcon;
if (!chrome.browserAction.setIcon) {
if (!chrome.action.setIcon) {
document.getElementById('icon-style-div').style.display = 'none';
return;
}