This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

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

Hierdie gesprek is in die argief. Vra asseblief 'n nuwe vraag as jy hulp nodig het.

Run custom .js file from defaults\pref

  • 3 antwoorde
  • 1 het hierdie probleem
  • 26 views
  • Laaste antwoord deur eddythorn

more options

Is it possible to either A) Have FF run a simple custom .js file that I've created that's located in the defaults\pref directory (each time FF is run), or B) Add a couple of lines of javascript to the local-settings.js file? I've tried but it hasn't worked, so I don't know if it's even possible.

Thanks.

Is it possible to either A) Have FF run a simple custom .js file that I've created that's located in the defaults\pref directory (each time FF is run), or B) Add a couple of lines of javascript to the local-settings.js file? I've tried but it hasn't worked, so I don't know if it's even possible. Thanks.

Gekose oplossing

To run JavaScript with chrome permissions you would have to add this code to the mozilla.cfg file that you specify to use via the local-settings.js file.

Lees dié antwoord in konteks 👍 0

All Replies (3)

more options

Gekose oplossing

To run JavaScript with chrome permissions you would have to add this code to the mozilla.cfg file that you specify to use via the local-settings.js file.

more options

Thanks Mike! I had already bookmarked your site, but didn't run across those posts. This is exactly what I need.

more options

Mike, I'm running into a problem. I am adding a bookmark folder and a few bookmarks (placed this code into a firefox.cfg file). Now every time I launch FF, a new copy of the bookmark folder is being created. My thought was to check if the folder exists - if it does, don't add the folder. To do this, I need to know the Id of the item I'm removing. However, I can't seem to determine how to get this info without digging into the places.sqlite file. Suggestions?