ThunderBrowse has a lot of functions that Developers can use to integrate ThunderBrowse in their extensions. These are especially helpful when you are making custom buttons (supported since version 220.127.116.11).
Knowing the basics
What this guide means
In this guide, I will use several types of formatting to show different things. This is what each text style means:
- Italics : stands for a property of an element
- <element> : XUL element
var code: standing for functions, code examples, and arguments.
To check for ThunderBrowse
Let’s face it, not everyone uses ThunderBrowse. However, a very large amount of people do use it. ThunderBrowse is a very popular extension for Thunderbird, and adding support in your extension isn’t very difficult, thanks to ThunderBrowse developer functions. But in order to add support, we need to check if the user has ThunderBrowse installed.
Luckily, checking if it is installed isn’t difficult. ThunderBrowse adds an attribute called thunderbrowse to the element with a “messagepanebox” id that we can check to see if ThunderBrowse is installed.
var isTBrowseInstalled =
If the code returns true, ThunderBrowse is installed. Otherwise, it is not installed on the user’s machine.
Like Firefox, ThunderBrowse allows you to get the current browser element and work with it. The basic form of getting the current browser is using
checkBrowser(); and getBrowser();. ThunderBrowse also provides a function that gets the current website the user is looking at. These functions are detailed below:
checkBrowser() gets the current browser, like
getBrowser(), also updates the variable
tbrowser so it points to the current browser the user is on.
getCurrentDocument() returns the current document the user is on. Like calling
window.content.document in Firefox
Working with URLs
Breaking it up
See Getting Url Data.
ThunderBrowse also allows extensions to load urls. ThunderBrowse ports a lot of Firefox functions to Thunderbird so extension developers can add support for both applications easily and without lots of additional code.
See Loading Urls.
Working with Tabs
See Working with Tabs.
ThunderBrowse supports its own bookmarks, though only two functions are allowed for developers (other functions are to be used by ThunderBrowse internally). The two functions are right here:
addPageMark() Bookmarks the current page. 18.104.22.168 uses
addMark() prompts the user to create a bookmark. 3.2.6 uses
manageBookmarks() Opens the bookmark manager
These two functions are particularly handy if you are creating a Custom Button.
bigtime() = maximize/minimize the browsing area (strongly recommended that
ThunderBrowseButtons.fullScreen() is used [implemented in 22.214.171.124 and up])
urlbarcollapse() = toggle the urlbar display (recommended that
ThunderBrowseButtons.collapseBar() is used [126.96.36.199 and up])
Checking Version numbers
Checking ThunderBrowse Permissions
ThunderBrowse’s getBrowser() has a lot of functions and attributes that have been ported from Firefox. For the list of these functions and attributes see the getBrowser() Documentation page.
I want to know more!
If the above still doesn’t help, you can contact me (email@example.com) with your question. I’ll answer what I can.