Skip to content

Commit

Permalink
Fixed background to store tab params in hash
Browse files Browse the repository at this point in the history
  • Loading branch information
glukki committed Jun 29, 2012
1 parent 9f99fca commit f95d86d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ var tick = function(){
//check if parked
if(tab.url.substring(0, tab.url.indexOf('?')) != urlBlank) {
// forward tab to blank.html
var url = urlBlank + '?title=' + tab.title;
var url = urlBlank + '#title=' + encodeURIComponent(tab.title);
if(tab.favIconUrl){
url += '&icon=' + tab.favIconUrl
url += '&icon=' + encodeURIComponent(tab.favIconUrl);
}
chrome.tabs.update(
tab.id,
Expand Down Expand Up @@ -103,9 +103,8 @@ chrome.tabs.onRemoved.addListener(function(tabId, removeInfo){
}
});

// tabs.onSelectionChanged - load if unloaded, reset inactivity
// tabs.onSelectionChanged - reset inactivity
chrome.tabs.onSelectionChanged.addListener(function(tabId, selectInfo){
chrome.tabs.sendRequest(tabId, {'do':'load'});
for(var i in tabs){
if(tabs.hasOwnProperty(i) && i == tabId){
tabs[i]['time'] = 0;
Expand Down

0 comments on commit f95d86d

Please sign in to comment.