Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8006237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:26:38+00:00 2026-06-04T17:26:38+00:00

Within my Firefox extension I’d like to detect the source of a page load

  • 0

Within my Firefox extension I’d like to detect the source of a page load — for example, after clicking on: a link, a history entry or a bookmark. So far I’ve manage to detect the click on a link and using the Back/Forward history buttons.

However, I fail to detect clicks on items of the history menu, let alone clicks on items in the window of the history library (popping up when clicking “Show All History”). Same problem for the bookmark menu and the bookmark library window.

Is there a more or less straightforward way to accomplish this? For the bookmark menu I could think of adding a click listener to all bookmarks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T17:26:39+00:00Added an answer on June 4, 2026 at 5:26 pm

    All clicks on history and bookmark items (both in main browser window and separate window/sidebar) will call PlacesUIUtils.openNodeWithEvent() or PlacesUIUtils.openNodeIn() (the latter is used when the user explicitly chooses where to open the item from the context menu). You can extend these functions using an approach like this:

    Components.utils.import("resource:///modules/PlacesUIUtils.jsm");
    if (!("myExtensionHooked" in PlacesUIUtils.openNodeWithEvent))
    {
      var origOpenNodeWithEvent = PlacesUIUtils.openNodeWithEvent;
      PlacesUIUtils.openNodeWithEvent = function(node)
      {
        // Remember node.uri here - user chose this URL
        ...
    
        // Call original function
        return origOpenNodeWithEvent.apply(this, arguments);
      };
      PlacesUIUtils.openNodeWithEvent.myExtensionHooked = true;
    }
    

    And similarly for the other function. Note that you should do this only once per browsing session – PlacesUIUtils object is shared by all browser windows. That’s the purpose of the myExtensionHooked property in the example code (you should change it to something that is unique to your extension).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running Selenium tests from within Eclipse, but I can't load a custom Firefox
I'd like to have my firefox extension display a block of html that overlaps
I'm developing a Firefox extension and would like to track its use with google
it seems like firefox and chrome default text inputs to center within a fieldset
I have an iframe loaded within a page. This code works fine in firefox
Firefox says they support 128px cursors, but that you must keep within 32x32px for
Within my code I have list items like this; <div id=content> <ul class=kwicks> <li
I'm developing a Firefox extension and have the following code: function initialize() { //
my firefox extension has an object myExt . myExt = { request: function(){ //adds
I know its possible to integrate jQuery within Firefox addons, but are we able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.