Previous selected tab as redux

This commit is contained in:
Shin'ya Ueoka 2018-05-06 16:11:40 +09:00
parent 98bc2326ee
commit 2c366ac3b1
8 changed files with 64 additions and 15 deletions

View file

@ -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 };