Share user js library beetween all extension
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)
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.
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.
Okulungisiwe
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
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 ?
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?