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 540247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:13:14+00:00 2026-05-13T10:13:14+00:00

I have an addon that every 5 minuets or so checks an rss feed

  • 0

I have an addon that every 5 minuets or so checks an rss feed for a new post, and if there is one, it displays an alert(). Problem is, I’m afraid that if the user opens multiple windows, that when there’s a new post a millions of alerts will popup saying the same thing. Is there anyway to have just one “brain” running at a time?

Thanks in advance!

  • 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-05-13T10:13:15+00:00Added an answer on May 13, 2026 at 10:13 am

    Look up something called “Javascript shared code modules” or JSMs.

    Primary docs are here:

    https://developer.mozilla.org/En/Using_JavaScript_code_modules

    Each .js file in your addon that needs shared memory will open with the following line:

    Components.utils.import("resource://xxxxxxxx/modules/[yourFilenameHere].jsm", com.myFirefoxAddon.shared);

    The above line opens [yourFilenameHere].jsm and loads its exported (see below) functions and variables into the com.myFirefoxAddon.shared object. Each instance of that object loaded will point to the same instance in memory.

    Note that if you want to have any hope of you addon making it past moderation, you will need to write all your code in a com.myFirefoxAddon.* type object as the goons at AMO are preventing approval of addons that do not Respect the Global Namespace

    The biggest caveat for JSM is that you need to manually export each function that you want to be available to the rest of your code… since JS doesn’t support public/private type stuff this strikes me as a sort of poor-man’s “public” support… in any case, you will need to create an EXPORTED_SYMBOLS array somewhere in your JSM file and name out each function or object that you want to export, like this:

    var EXPORTED_SYMBOLS = [
        /* CONSTANTS */
        "SERVER_DEBUG",
        "SERVER_RELEASE",
    
        "LIST_COUNTRIES",
        "LIST_TERRITORIES_NOEX",
    
        /* GLOBAL VARIABLES */
        /* note: primitive type variables need to be stored in the globals object */
        "urlTable",
        "globals",
    
        /* INTERFACES */
        "iStrSet",
    
        /* FUNCTIONS */
        "globalStartup",
    
        /* OBJECTS */
        "thinger",
        "myObject"
    
    ]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a very simple firefox addon that essentially just displays the total number
There is an open source firefox addon that I have attempted to test with
I have a Firefox addon that injects/executes a jQuery script on every page at
I have a Java project that needs a addon interface. I was thinking about
I have an addon that open a html page when you click a button
I have a really strange Problem with my new Vaadin Project. If I start
I have this problem that a week ago, when debugging, suddently the Locals window
I want to write one script that runs on every apge--that uses the jquery
With Firefox and its new release every 6 weeks strategy it seems that a
I have a plug-in vector established using System.AddIn that accepts the body of a

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.