Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/background/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,13 @@ function start(browser) {
});
});
break;
case 'chooseTab':
getActiveTab(function(tab) {
sendTabMessage(tab.id, 0, {
subject: 'chooseTab'
});
});
break;
case 'closeTab':
getActiveTab(function(tab) {
chrome.tabs.remove(tab.id);
Expand Down
4 changes: 4 additions & 0 deletions src/content_scripts/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ function start(browser) {
runtime.on('showBanner', function(msg, sender, response) {
showBanner(msg.message, 3000);
});
runtime.on('chooseTab', function() {
modes.front.attach();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary?

modes.front.chooseTab();
});
document.addEventListener("surfingkeys:ensureFrontEnd", function(evt) {
modes.front.attach();
});
Expand Down
3 changes: 3 additions & 0 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"closeTab": {
"description": "Close the current tab."
},
"chooseTab": {
"description": "Choose a tab."
},
"proxyThis": {
"description": "Toggle current site in autoproxy_hosts."
}
Expand Down