claustromaniac / compare-userjs Goto Github PK
View Code? Open in Web Editor NEWPowerShell script for comparing user.js (or prefs.js) files.
License: MIT License
PowerShell script for comparing user.js (or prefs.js) files.
License: MIT License
Adding this to the Instructions will be a time-save option for the users:
IMPORTANT: FOR LATEST PowerShell VERSIONS
Inside the "Compare-UserJS.bat" file change the line:
PowerShell.exe -Version 2 -NoProfile -ExecutionPolicy Bypass -File "%~dpn0.ps1" %*
to
pwsh -NoProfile -ExecutionPolicy Bypass -File "%~dpn0.ps1" %*
Or change the *.bat by defaut for the recent PS versions. I think, simple PS update as the first step will be a better option for evetybody, than stuck with the old one.
And thank you very much for your exellent script, for the good idea and so accurate and wide representaton or results! Really, very useful and nice done!
When using Compare-UserJS.bat as a launcher, after Compare-UserJS.ps1 execution the console window stays open. There is no need for this as it is not very convenient to close it manually all the time. The window should stay opened when there exists no such file or there was an error with launching the script.
Instead of separate columns for state, prefname and value, write the entire output in sanitized JS expressions. This would effectively turn the report itself into an user.js file.
The function change is not detected. For example, when
pref("pref.name", value);
is changed to:
lockPref("pref.name", value);
it appears as nothing has been changed and the preference is the same in both files.
...or the number of instances instead of [d]
Hi bro,
In my last version of librefox i have some lines with // Default Value : "
and // "
This seem to make the script fail without an error feedback...
I just removed those single quote lines from my mozilla.cfg file to fix the problem... its just to let you know about it ;)
Thanks
MiiiAAAaWWwwwooOOooo :D 👍
EDIT : i am still debugging it seem to be related to something else
Let’s have user.js file stored on C:\My Folder\user.js
.
Run Compare-UserJS.bat or Compare-UserJS.ps1. After using drag and drop it looks like this:
filepath_A: “C:\My Folder\user.js”
When the path contains whitespace, quotes are automatically added. Running the script now leads to an error:
Split-Path : Cannot find drive. A drive with the name '"C' does not exist.
However, if I manually remove quotes (filepath_A: C:\My Folder\user.js
) it works. When using drag and drop function there should be no further action required (like removing quotes), especially when it is mentioned as an alternative in Compare-UserJS.bat.
...or some other markup language. I mean, for a few measly extra lines... why the hell not?
Nice work; thanks for sharing it with us.
In the readme, the first time you mention powershell is in this sentence:
This script requires only PS v2+, which comes pre-installed on Windows 7
Many who arrive here without context of what this tool is and start with the readme will not know what PS refers to. It only made sense by inference when you mentioned PowerShell a couple of times later on in the document. I suggest you replace PS with PowerShell, assuming that's what you meant.
Should be fun.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.