I didn't read the whole code in detail, but I think you should take a
look to the tab and tabbrowser APIs, that might be helpful:
* https://jetpack.mozillalabs.com/sdk/0.7/docs/#module/jetpack-core/tabs
* https://jetpack.mozillalabs.com/sdk/0.7/docs/#module/jetpack-core/tab-browser
> my script stores the old state of tabbrowser and if e.g. a tab is
> closed, it searches for the index of the closed tab.
> Problem:
> i open 3 tabs and select tab2, afterwards i select tab0 and try to
> close it but firefox won't let me close that tab. moreover it doesn't
> print "found 0" to the command line, as i would expect.
>
What is the purpose of you addon? Doesn't Firefox by default do what
you're trying to do?
Hernan
>> my script stores the old state of tabbrowser and if e.g. a tab is
>> closed, it searches for the index of the closed tab.
>> Problem:
>> i open 3 tabs and select tab2, afterwards i select tab0 and try to
>> close it but firefox won't let me close that tab. moreover it doesn't
>> print "found 0" to the command line, as i would expect.
>>
>
> What is the purpose of you addon? Doesn't Firefox by default do what
> you're trying to do?
>
The purpose are updatable bookmarks for big websites.
I want to add a "Update" Button to the Firefox-GUI, which
sets the stored url of a bookmark to the currently opened url.
The "Update" button must only work, if the selected tab was loaded with a bookmarked
page before. After hitting the "Update" button, the previously loaded bookmark-url will be
updated to the present url of the selected tab.
This is usefully for substantial websites, where you want to proceed reading at the point, you stopped
last time.
Therefore i have to maintain a list, which consists of tabIndex as key and bookmarkID as
value. The list must be consistent even in case, a tab has been moved.
Have i overlooked an easy approach to track tabs?
cheers benson
anyway, thanks for your reply.
i already like the jetpack-sdk, it's great to try out code within
seconds.
ben
Great!
> anyway, thanks for your reply.
> i already like the jetpack-sdk, it's great to try out code within
> seconds.
>
Glad you liked it! Hope to see more feedback from you ;)
Hernán