Thanks.

Here is a test using the user.js which I attached in a previous comment and the one from the ghacks project:


[/tmp/download]: ./mb user.js ghacks.js > out.txt && head -n 20 out.txt && tail -n 20 out.txt
# key   user.js ghacks.js
accessibility.force_disabled    undef   1
alerts.showFavicons     undef   false
app.shield.optoutstudies.enabled        undef   undef
app.update.auto undef   false
app.update.enabled      false   undef
app.update.service.enabled      true    false
app.update.silent       undef   false
app.update.staging.enabled      undef   false
beacon.enabled  undef   false
breakpad.reportURL      undef   ""
browser.aboutHomeSnippets.updateUrl     undef   "https://127.0.0.1";
browser.backspace_action        undef   2
browser.bookmarks.max_backups   undef   2
browser.bookmarks.showRecentlyBookmarked        0); // TOR: 15  false
browser.cache.disk_cache_ssl    undef   false
browser.cache.disk.capacity     undef   0
browser.cache.disk.enable       undef   false
browser.cache.disk.smart_size.enabled   undef   false
        undef   "2600 syntax error: the parrot's run down the curtain!"
undef "2700 syntax error: the parrot's joined the bleedin' choir invisible!"
        undef   "2800 syntax error: the parrot's bleedin' demised!"
        undef   "4000 syntax error: the parrot's pegged out"
                "4500 syntax error: the parrot's popped 'is clogs"
                "4600 syntax error: the parrot's crossed the Jordan"
                "4700 syntax error: the parrot's taken 'is last bow"
                "5000 syntax error: this is an ex-parrot!"
                "9999 syntax error: the parrot's deprecated!"
                "START: Oh yes, the Norwegian Blue... what's wrong with it?"
                "SUCCESS: No no he's not dead, he's, he's restin'!"
                false
                ""
                true
                true
                true
                false); // [WINDOWS]
                false
                false
                true


There seems something is not quite right in the parsing.

> The script will work as long as the input files do not include any tab

pyllyukko's user.js contains tabs (maybe others too, I still don't know).

> If you (or somebody else) want(s) explanation about part of the script, I can answer.

That's very nice of you but perhaps it would be better to refactor it so that it is self explanatory (comments etc). Code which is easy to read is also easy to maintain, less prone to bugs etc. So if you have the time and desire you can work on that.

BTW someone has already made an attempt to diff various user.js projects:

https://github.com/jm42/compare-user.js

but if we should make all this, it is crucial to have also the descriptions about what each setting does (may need manual work). We could probably make an interface (a form) with default and recommended values and a column in which the user can enter values (or pick from existing). Then a simple 'Submit' button would be able to generate the user.js. I should be able to do this with PHP.

Reply via email to