Skip to content

Commit 7f635eb

Browse files
authored
Merge pull request #4 from RostyslavNihrutsa/develop
Update warnings for sidebar API
2 parents d38c4f9 + 8878ec0 commit 7f635eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sidebar.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export const setSidebarTitle = async (title: string | number, tabId?: number): P
181181
const sb = sidebarAction();
182182

183183
if (!sb) {
184-
console.warn("The opr.sidebarAction.setTitle API is supported only in Opera");
184+
console.warn("The sidebarAction.setTitle API is supported only in Opera or Firefox");
185185

186186
return;
187187
}
@@ -208,7 +208,7 @@ export const setSidebarBadgeText = async (text: string | number, tabId?: number)
208208
export const clearSidebarBadgeText = (tabId?: number): Promise<void> => setSidebarBadgeText("", tabId);
209209

210210
export const setSidebarIcon = async (details: IconDetails): Promise<void> => {
211-
const sb = sidebarAction() as OperaSidebarAction | undefined;
211+
const sb = sidebarAction();
212212

213213
if (sb) {
214214
const {setIcon} = sb;
@@ -220,7 +220,7 @@ export const setSidebarIcon = async (details: IconDetails): Promise<void> => {
220220
}
221221
}
222222

223-
console.warn("The opr.sidebarAction.setIcon API is supported only in Opera");
223+
console.warn("The sidebarAction.setIcon API is supported only in Opera or Firefox");
224224
};
225225

226226
export const setSidebarBadgeTextColor = async (color: Color, tabId?: number): Promise<void> => {

0 commit comments

Comments
 (0)