Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open links in child tabs, if Tree Style Tab or Tab Kit 2nd Edition installed #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
15 changes: 14 additions & 1 deletion chrome/content/brief.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,20 @@ let Commands = {

openLink: function cmd_openLink(aURL) {
let docURI = NetUtil.newURI(document.documentURI);
getTopWindow().gBrowser.loadOneTab(aURL, docURI);
let window = getTopWindow();

// Open a new tab as a child of the current tab
// Tree Style Tab http://piro.sakura.ne.jp/xul/_treestyletab.html.en#api
if ('TreeStyleTabService' in window)
window.TreeStyleTabService.readyToOpenChildTab(window.gBrowser.selectedTab);
// Tab Kit 2nd Edition https://addons.mozilla.org/firefox/addon/tabkit-2nd-edition/
if ('tabkit' in window)
window.tabkit.addingTab('related');

window.gBrowser.loadOneTab(aURL, docURI);

if ('tabkit' in window)
window.tabkit.addingTabOver();
},

displayShortcuts: function cmd_displayShortcuts() {
Expand Down