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

  • Home
  • SEARCH
  • 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 script that appends some rows to a table. One of the
I have a new web app that is packaged as a WAR as part
I have the following five tables: ISP Product Connection AddOn AddOn/Product (pivot table for
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Does anybody know of a bookmarklet or firefox addon that let's you extract part
I have a session that I gave to users that has matching password =
is there any library or component that allows photoshop or pdf style zooming where
I have a small problem with jQuery $.ajax() function. I have a form where
I have a firefox addon which works for firefox version 3.0 onwards. However, a
I'd like to create an addon for Firefox that would enable me to search

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.