-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updater #167
Comments
Here's a simple batch script I wrote for updating the user.js file
I couldn't test so please let me know if it works |
Here's a oneliner curl script if you are on Linux. It just overwrites curl https://raw.githubusercontent.com/yokoffing/Betterfox/master/user.js > "$(find ~/.mozilla/firefox/ -type d -name "*.default-release")" |
The script written in PowerShell
|
Just an FYI, this does not update the script file, it just retrieves a new version. It would be better if the new file could be moved to the profiles directory automatically. It is |
Problem with this method is, that it will remove all of my overrides. It could be nice, if your user.js could support user-overrides.js, like in ArkenFox's user.js |
Good consideration. Using that idea, you could create an overrides file and append it to the user.js: #!/bin/bash
# NOTE: this installs to the default profile directory
# update user.js
curl https://raw.githubusercontent.com/yokoffing/Betterfox/master/user.js > "$(find ~/.mozilla/firefox/ -type d -name "*.default-release")"
# append overrides to file
cat user-overrides.js >> "$(find ~/.mozilla/firefox/ -type d -name "*.default-release")"/user.js |
Great script! But I still think, that yokoffing should make an official solution to updating and overriding settings in separate file. It would make it way more user friendly and as far as I understand, this user.js is all about delivering privacy in the easiest to use package possible. |
I've had the honor of meeting a handful of Betterfox users in real life. Do you know how many of them would know how to run a script to update their Zero. I'm aware that we have more advanced users of Betterfox, so an updater would be nice -- but it's also out of scope for the primary audience. If someone creates a solution, I will happily integrate it and give them credit. |
Having a shell script seems to be the best approach. As for the normies who don't know how to run a shell script, having a section in the Wiki would help. Perhaps we should consolidate Arkenfox's user.js update script for a basis for ours? Some ways we could go about overrides in the user.js are either:
What do you think is the better approach, or do you have something else in mind? |
Just came here to ask the same. I think this would be the best solution with also the least of work? |
Emm, no? Double click script is easier than modifying user.js, to copy user's overrides. |
There is no need to over-engineer an update process. Replacing the user.js and copying/pasting overrides is easy and simple enough already. |
|
If you need an updater and a separate file for overrides so badly you can just use arkenfox's 'parrot' nonsense. The less moving parts the project has - the more stable and dependable it is. |
is there a 'updater' for osx |
Good news! I've over-engineered the update process 😅 Free-as-in-mattress for anyone who wants to organize overrides per-section, and is comfortable with |
@alana-glitch Thank you for your work. |
For future people who want to tackle this: How does one best go about this task? Which tech stack? Which things to watch out for? Tech stack:
Steps:
What did I miss? |
Maintaining a shell script for Windows and *Nix wouldn't be too hard. Powershell is a cross platform consideration. Python works too. Judging based off of what yokoffing said previously, it is likely that (Windows) users would need to install the interpreter for the language we choose.
I think a majority of people install Firefox on the same disk as their operating system is on. Perhaps we should make a poll to see if this is something we should consider.
What purpose would detecting browser version be for?
There aren't multiple versions of Betterfox, the other user.js files only contain specific sections of the main user.js.
Having used Betterfox for a few months now, I'd like to share my updated (Bash) script that accomplishes this: #!/bin/bash
# fetch betterfox user.js
curl -o user.js https://raw.githubusercontent.com/yokoffing/Betterfox/main/user.js
# append user added settings to user.js
echo '
// your settings/overrides here
' >> user.js
# ensure profiles directory is created
if [ ! -d "~/.mozilla/" ]; then
sleep 5 && killall firefox &
firefox -headless &
wait
fi
# move user.js into firefox default profile directory
mv user.js "$(find ~/.mozilla/firefox/ -type d -name "*.default-release")"
|
If we do end up choosing something that requires an extra installation, then it'd be lovely if that were as simple as possible for the end-user. Python is an excellent example, since installing Python in Windows using the official installer frequently fails. And uninstalling it is equally error-prone.
There can be multiple Firefox profiles, so that's maybe also worth keeping in mind.
Every Firefox version has a corresponding version of Betterfox. It'd be weird if the updater could update the Betterfox script before Firefox got around to doing its update. And the second consideration would be that there are multiple Firefox release channels, like Firefox Nightly, Firefox Beta, Firefox ESR.
Ah, I see. Thank you for clearing that up.
On that note, apparently arkenfox's user.js also has a shell script And finally, I noticed that I missed an important step: Making a backup of the Firefox profile. The wiki seems to strongly recommend it, so I suppose it'd be useful to have that in an installer script as well. (Of course as a skip-able option.) |
What are your thoughts on an executable? The concept of running an executable would be familiar for Windows users and we could bundle any dependencies for the tooling we use with it.
I forgot about the releases, thank you for pointing that out! We could probably get the version number from the Firefox binary and form a URL with the version number.
Ah that is something I overlooked too. |
A simple executable would be awesome for Windows users. In my case, it'd make it very nice and easy to convince my friends to use Betterfox. "Oh you're using Firefox? Here, try downloading and running Betterfox, it simply makes your experience slightly better." |
Maybe could be enough with an extension to check for new versions... |
I did this: https://gist.github.com/federicotorrielli/4b86b96004dc2219b0f930661a2b6383 |
It would be nice to have an updater instead of having to check out. if new version of Betterfox came out. You could fork ArkenFox's updater and edit it to check and pull new versions of user.js from this repo. It also would be a great opportunity to introduce
user-overrides.js
, so update wouldn't wipe all the user's edits.The text was updated successfully, but these errors were encountered: