Use the Gecko script's useCaretNavigationModel() in Thunderbird