Comments (8)
pref("browser.newtabpage.directory.source", "data:text/plain,{}"); // ghacks: "data:text/plain,"
@Thorin-Oakenpants, @pyllyukko, we should both use "data:,{}" - the code expects a JSON and complains otherwise, and with that format it defaults to "text/plain" and it also sets a charset that way, which again otherwise it can cause a warning in the console.
see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
ie. data:, is the short form for data:text/plain;charset=US-ASCII,
from user.js.
creates an empty directoryLinks.json file in the appdata/local Mozilla folder
it creates that file with {}
in it, but in the profile folder in my case. ie it's not an empty file and the folder is wrong afaik. everything after the comma is the file content. data:text/plain,
would write an empty file, but it doesn't because it's not JSON while data:text/plain,{}
creates a valid "empty" 2-byte JSON file.
I think this behavior is preferable because it retro-actively overwrites the content of that file, while otherwise, the code fails, produces a warning in the console and doesn't write/overwrite that file at all, if I remember correctly.
We have 5 data:text/plain,
and 0 data:text/plain,{}
atm!
from user.js.
- data:,
- data:text/plain,
- data:text/plain;charset=US-ASCII,
from user.js.
Oh, damn, so only when it's finished huh? Well I saw that too late so I adjusted my script, grabbed both versions latest master and compared them. The result is ... well, a lot of work still to be done....
combined prefs: 520
- 114 matching prefs
- 406 diffs
> 79 missing in ghacks
> 314 missing in pyllyukko
> 13 different values
The 314 are including the 23 parrot prefs.
I can provide a diff whenever one is needed, takes literally seconds to create them.
from user.js.
I didn't look at the file-content tbh, my script parsed all active prefs, idk if deprecated are in there for pyllyukko's. here is the output: http://pasted.co/b0235e9e
from user.js.
I see now, your script doesn't discard the status of the pref
No, of course not - you said do a diff of active values and investigate
I can adjust my script if you like, but I need to figure out how to best display that.
from user.js.
I don't understand why we should use the worst of the 3 possible ways. (see Atavic's comment)
Either use the shortest which sets a default (that I trust mozilla is not gonna change), or make it bullet-proof and use the long version.
Yeah, I read the TBB ticket where they started using it, but they also don't want any console warnings/errors, and tbh it seemed kind of lazy. We shouldn't do something stupid just because TBB also does it. Maybe someone from their team will eventually see our better and improved way and change it in TBB too.
Just my 2 cents
from user.js.
But they never get used
Then why change them at all? But we do change them (and I think we should) so why not use the best possible way instead of the worst?
I'm not gonna argue anymore. I use the short form in my own user.js. Do what you want.
from user.js.
Related Issues (20)
- who's up for some simple testing - any platform .. all welcome, except that _one_ guy HOT 7
- Issue with DuckDuckGo being the only option in the search engine dropdown list
- Should I use FPP, RFP or both HOT 4
- add privacy.spoof_english HOT 4
- Easier way to batch import and export site exceptions? HOT 4
- Difference between 4501 and 4510 in terms of preferred colors HOT 4
- https://auth.openai.com/ Broken With RFP HOT 5
- add pref to delete using `user-overrides.js`? HOT 2
- user perf for search shortcuts HOT 4
- user pref for "extenstion has been added" notification HOT 2
- Post-Arkenfox Unique Fingerprint HOT 10
- ToDo: diffs FF124-FF125.0.1 HOT 6
- track sanitizing migration slated for FF127/8 HOT 14
- TLS fingerprint in PBM is different HOT 8
- LocalFortress (extension) HOT 6
- 126.0 - Firefox’s new search data collection - Disabled? HOT 2
- 126.0: potential addition for 0105 HOT 3
- ToDo: diffs FF125.0.1-FF126 HOT 7
- Problems with RFP/FPP fonts on Kubuntu 24.04 LTS [Solved: system font config] HOT 5
- `incoming.telemetry.mozilla.org` [solved: sanitize profile\datareporting] HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from user.js.