Capture "Open in a new tab" and "Back"

I would like to develop a Firefox extension that does things when clicking a link opens a new tab as a result of link attributes, as well as when you click the back button (or equivalent).

How can I intercept these two things in the extension?

Update: I started generosity - I hope that the answer can lead to the creation of a hidden documentation site for Firefox add-ons. This is a site that is not a Firefox codebase. And not a collection of all the extensions ever written.

+5
source share
3 answers

, , firefox ( , MDC, , , ).

  • : eventListener , . , ,
  • Detect Back : ( Firefox 3.5) , locationChange, "" ( Firefox 3), , URI . , "Del" "Alt" + "LeftArrow", Back Button ( XUL , , )
+2

, , , .

, - URL?

, :

. .

Back to Close FF, "" , "". . , del/back . Alt + Left ( ).

+2

, nsISHistoryListener, , .

OnHistoryGoBack

Notifies the listener when the user clicks the back button in the browser or when the user tries to return to one page in the story using other means, either through scripting or using nsIWebNavigation.

+1
source

All Articles