Track pinned status of tabs
This commit is contained in:
parent
70222f799c
commit
ef0696b90e
|
@ -295,7 +295,8 @@ _tabbro_ = function() {
|
|||
url: _tabs[i].url,
|
||||
sticky: false,
|
||||
name: "Tab",
|
||||
icon: (_tabs[i].favIconUrl?_tabs[i].favIconUrl:null)
|
||||
icon: (_tabs[i].favIconUrl?_tabs[i].favIconUrl:null),
|
||||
pinned: _tabs[i].pinned
|
||||
})
|
||||
}
|
||||
bro.save()
|
||||
|
@ -431,13 +432,13 @@ _tabbro_ = function() {
|
|||
title: e.title,
|
||||
url: e.url,
|
||||
sticky: false,
|
||||
name: ""
|
||||
name: "",
|
||||
pinned: e.pinned
|
||||
}, e.index)
|
||||
|
||||
bro.notify()
|
||||
})
|
||||
|
||||
|
||||
chrome.tabs.onUpdated.addListener(function(tabid) {
|
||||
// TODO loading indicator when a tab is loading
|
||||
// TOOO determine if other attributes need to be tracked
|
||||
|
@ -447,6 +448,7 @@ _tabbro_ = function() {
|
|||
if(tab) chrome.tabs.get(tabid, function(_tab) {
|
||||
tab.title = _tab.title
|
||||
tab.url = _tab.url
|
||||
tab.pinned = _tab.pinned
|
||||
if(_tab.favIconUrl) {
|
||||
tab.icon = _tab.favIconUrl;
|
||||
}
|
||||
|
@ -454,7 +456,6 @@ _tabbro_ = function() {
|
|||
|
||||
})
|
||||
|
||||
|
||||
chrome.tabs.onMoved.addListener(function(tabid) {
|
||||
console.log("tabs.onMoved "+tabid)
|
||||
|
||||
|
@ -475,21 +476,18 @@ _tabbro_ = function() {
|
|||
})
|
||||
})
|
||||
|
||||
|
||||
chrome.tabs.onActivated.addListener(function(x) {
|
||||
//console.log("tabs.onActivated")
|
||||
//console.log(x)
|
||||
// TODO indicate that this tab is the active one
|
||||
})
|
||||
|
||||
|
||||
chrome.tabs.onHighlighted.addListener(function(x) {
|
||||
//console.log("tabs.onHighlighted")
|
||||
//console.log(x)
|
||||
// This seems the same as tabs.onActivated?
|
||||
})
|
||||
|
||||
|
||||
chrome.tabs.onDetached.addListener(function(tabid) {
|
||||
// Remove tab from it's window
|
||||
var tab = bro.t_getTab(tabid)
|
||||
|
@ -499,7 +497,6 @@ _tabbro_ = function() {
|
|||
bro.detached_tabs[tabid] = tab
|
||||
})
|
||||
|
||||
|
||||
chrome.tabs.onAttached.addListener(function(tabid) {
|
||||
// Remove from bro.detached_tabs
|
||||
var tab = bro.detached_tabs.splice(tabid, 1)[0]
|
||||
|
@ -511,7 +508,6 @@ _tabbro_ = function() {
|
|||
})
|
||||
})
|
||||
|
||||
|
||||
chrome.tabs.onRemoved.addListener(function(tabid) {
|
||||
console.log("tabs.onRemoved "+tabid)
|
||||
//console.log(tabid)
|
||||
|
@ -532,7 +528,6 @@ _tabbro_ = function() {
|
|||
bro.notify()
|
||||
})
|
||||
|
||||
|
||||
chrome.tabs.onReplaced.addListener(function(x) {
|
||||
//console.log("tabs.onReplaced")
|
||||
//console.log(x)
|
||||
|
|
Loading…
Reference in New Issue