Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Importing one user.js into another? #332

Closed
matru opened this issue Oct 15, 2024 · 2 comments
Closed

Importing one user.js into another? #332

matru opened this issue Oct 15, 2024 · 2 comments
Assignees

Comments

@matru
Copy link

matru commented Oct 15, 2024

I would like to separate betterfox's user.js and my custom changes in it, so instead of manually copy pasting my custom changes to the updated betterfox user.js every time it updates, would be great to have one that is being git pulled all the time, and another that imports it and applies the custom changes. Would this work with how Firefox handles things, I have no idea what js version/handling they use for such thing.

File 1 (betterfox_user.js):

/** DISK CACHE ***/
user_pref("browser.cache.jsbc_compression_level", 3);

/** MEDIA CACHE ***/
user_pref("media.memory_cache_max_size", 65536);
user_pref("media.cache_readahead_limit", 7200);
user_pref("media.cache_resume_threshold", 3600);

File 2 (user.js):

/** Import Betterfox and make custom changes ***/

import './betterfox_user.js';

user_pref("media.cache_readahead_limit", 3600);
user_pref("browser.urlbar.trimHttps", false);

This way I always keep user.js clean, can git pull/curl when updates are needed, and play with my custom config without touching the betterfox config?

@Denperidge
Copy link
Contributor

Denperidge commented Nov 9, 2024

By coincidence I implemented a similar feature to this in the installer (it pulls the latest version and places the contents of user-overrides.js in the user.js. If that workflow is okay for you!

@yokoffing
Copy link
Owner

Please see #318

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants