Skip to content

username3020/compare-user.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

compare-user.js

A python application to compare multiple user.js files.

The user.js of Firefox allows to configure your browser to your needs. There are different examples out there, but to manually compare them with each other takes time. This python application allows to print out a summary about the differences of two user.js files as input.

Additionally it allows to print the differences in the format of the user.js files when used with the parameter -printLines

Requirements

Install dependencies with pip:

pip install dictdiffer tabulate

Or install with

pip install -r requirements.txt

Usage

Just compare two files and get difference summary (added values, removed values, changed values):

python3 compare.js user.js user.custom.js

Same as above, but also prints out the values in user.js format, so they can be easily integrated into your files.

python3 compare.js user.js user.custom.js -printLines

Sources for user.js files

There are projects like Arkenfox/user.js or pyllyukko/user.js which provide customized user.js files.

Example output

> python3 compare.py user.js user.custom.js
| Name            | user.js   | user.custom.js   |
|-----------------+-----------+------------------|
| keyword.enabled | false     | true             |
Only in user.js
| Name   | Setting   |
|--------+-----------|
Only in user.custom.js
| Name                      | Setting   |
|---------------------------+-----------|
| general.warnOnAboutConfig | false     |
Removed in user.js
| Name   | Setting   |
|--------+-----------|
Removed in user.custom.js
| Name                 |   Setting |
|----------------------+-----------|
| browser.startup.page |         0 |

About

Python tool to compare user.js files from Firefox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages