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

Already on GitHub? Sign in to your account

Open new tab via GM_openInTab as a child tab of the caller tab (if Tree Style Tab is installed) #9

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

piroor commented May 2, 2012

I got a feedback about compatibility of my addon "Tree Style Tab" and Scriptish: Issue #276: GM_openInTab open as child scriptish · piroor/treestyletab.
So, I tried to add a hook for GM_openInTab() to call TST's API before new tabs are actually opened.
However, a simple hack piroor/treestyletab@3b9c542 didn't work as I expected.

As stability, I think it is better than such a hack in TST-side that calling TST's API by Scriptish itself.

Or, is there any stable API to add extra hacks for GM_openInTab()?

regards,

@ghost ghost assigned erikvold May 2, 2012

Owner

erikvold commented May 2, 2012

Hmm I think Scriptish should make a notification before & after it opens a new tab, so that other extensions can listen to that and do what w/e they need to.

Contributor

piroor commented May 2, 2012

Oh, I totally agree. It is better than my patch :-)

Owner

erikvold commented May 2, 2012

do you need a notification before we open the tab? if so then why is that?

Contributor

piroor commented May 2, 2012

OK, I explain. My addon "Tree Style Tab" (TST) provides tree of tabs based on their relations. If a tab is opened from a link in a page, then the new tab becomes new "child" tab of the current tab.

To do it, I have to know what is the "parent" tab. Because sadly "TabOpen" event doesn't have such information, TST provides an simple API notifying "a new tab is going to be opened as a child of an existing tab" to itself.

Of course, TST also have another API to attach/detach tabs after they are opened. If Scriptish provide a notification after a tab is opened from GM_openInTab(), I'll use the notification.

Owner

erikvold commented May 2, 2012

Thanks for the explanation @piroor that makes sense to me. I'll merge a notification that goes out before & after when GM_openInTab is used. Scriptish is already sending out notifications using the nsIObserverService, so I think something similar would be fine?

@erikvold erikvold closed this in b18578e Jul 22, 2013

Owner

erikvold commented Jul 22, 2013

Hey @piroor ! thanks for the pull request. I'm sorry it took soooo long to get it in :(

Owner

erikvold commented Jul 22, 2013

@piroor if you get a chance you should add yourself to the list of contributors https://github.com/scriptish/scriptish/blob/master/extension/install.rdf#L21

I'll get to it eventually if you can't tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment