Previous selected tab as redux
This commit is contained in:
parent
98bc2326ee
commit
2c366ac3b1
8 changed files with 64 additions and 15 deletions
|
@ -1,3 +1,5 @@
|
|||
import actions from './index';
|
||||
|
||||
const openNewTab = (url, openerTabId, background = false, adjacent = false) => {
|
||||
if (adjacent) {
|
||||
return browser.tabs.query({
|
||||
|
@ -18,4 +20,11 @@ const openToTab = (url, tab) => {
|
|||
return browser.tabs.update(tab.id, { url: url });
|
||||
};
|
||||
|
||||
export { openNewTab, openToTab };
|
||||
const selected = (tabId) => {
|
||||
return {
|
||||
type: actions.TAB_SELECTED,
|
||||
tabId,
|
||||
};
|
||||
};
|
||||
|
||||
export { openNewTab, openToTab, selected };
|
||||
|
|
Reference in a new issue