We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Share user js library beetween all extension

  • 5 replies
  • 1 has this problem
  • 3 views
  • Paskiausią atsakymą parašė acc2013a

more options

The firefox extensions expect to find the respective javascript files inside their definition folder containing manifest files and related resources Is it possible to access and share the same user library (js file) between all extensions without having to copy it back to all the extension folders when it is modified? Thanks for any suggestions you have

The firefox extensions expect to find the respective javascript files inside their definition folder containing manifest files and related resources Is it possible to access and share the same user library (js file) between all extensions without having to copy it back to all the extension folders when it is modified? Thanks for any suggestions you have

All Replies (5)

more options

Hi

I am sorry, but I do not believe that is possible. Each add-on has its own set of files that are installed whdn the add-on is downloaded and installed.

more options

You can possibly use policies to install extensions on multiple profiles, but each each profile needs to have its own installation files and extension storage.

Modified by cor-el

more options

Thanks a lot to both of you for your availability. I will continue to centralize all common routines in a single js and each time it is modified I will manually replace the content in the individual extension folders

more options

I'm still not sure I understand what specific extension files you are referring to.

Is this about packed/unpacked extensions files because XPI files are signed and have a META-INF folder and modifying files breaks the signing and will cause Firefox to disable the extension ?

more options

I'm resuming and completing extensions that I made two years ago for strictly local use (for now) to access portions of some web pages, periodically extract their content, save it as a text file and download it to the PC hard disk to feed a sheet electronic. My extensions often refer to the same utility functions (e.g. javascript functions / classes that process html elements, timers, save files, etc.) Currently these functions are grouped in a single js file copied internally in the root folder of each extension Every time I modify my user library I have to remember to copy the updated version in each extension created. I thought (I hoped) it would be possible, working locally, to save it externally to the extensions folders, for example in the folder that contains them all by pointing each extension to this single version of the user library, as I have always done for my javascript applications. From your answers it seems that this is not possible. If it were possible from any extension that works on a web page in a firefox tab to access the javascript resources used by a local web page (eg shared.html) loaded in another firefox tab, the problem would be solved by loading the js code from share on shared.html. Is this solution feasible?