Skip to content

Commit

Permalink
Notify user when contained tab cannot be created
Browse files Browse the repository at this point in the history
Applies only to third restriction mode.
  • Loading branch information
Roy-Orbison committed Jan 17, 2022
1 parent 406db9e commit e0be80b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ browser.commands.onCommand.addListener(async function(command) {
cookieStoreId: excl && mruCookieStoreId || tabs[0].cookieStoreId
});
}
else {
browser.notifications.create(
'no-container',
{
type: 'basic',
title: 'No container',
message: "You must open at least one contained tab to set the window's most recently used container."
}
);
}
}
}
catch (error) {
Expand Down
3 changes: 2 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"manifest_version": 2,
"name": "Retainer",
"author": "Roy Orbison",
"version": "0.2.0",
"version": "0.2.1",
"description": "Provides a keyboard shortcut (Shift + Alt + C by default) to create a new tab that retains current/last-used container.",
"icons": {
"16": "icon.svg",
Expand All @@ -27,6 +27,7 @@
]
},
"permissions": [
"notifications",
"tabs",
"storage",
"cookies"
Expand Down

0 comments on commit e0be80b

Please sign in to comment.