Giter VIP home page Giter VIP logo

Comments (5)

pyllyukko avatar pyllyukko commented on July 22, 2024 1

I'm no longer working on this.

Thanks for all your contributions during the years! ❤️

from user.js.

nodiscc avatar nodiscc commented on July 22, 2024 1

determine how to use the sticky flag on prefs/what it does, and if it is useful and relevant to this project.

During an unrelated search, I found this page: https://www.devdoc.net/web/developer.mozilla.org/en-US/docs/Preferences/A_brief_guide_to_Mozilla_preferences.html#Sticky_Preferences

Sticky preferences were introduced in Firefox 40 via bug 1098343.

Sticky preferences are created when they are defined using sticky_pref(). These preferences act as default preferences but whenever a value is created for the preference, that value is always written even when it matches the default. Sticky preferences are generally used for preferences that have a different default value in different channels with the intent being that once the user sets the preference in one channel, the preference will remain with that value when using a different channel with different defaults. For example, let's assume that Nightly has a preference "some.preference" which defaults to true while DeveloperEdition defaults the same preference to false and the user desires the preference to have the value true in both channels. If the preference is not a sticky preference and the user runs DeveloperEdition and flips the pref to true it will be saved as it is not the default. When the user then runs Nightly, the preference now has the same value as the default, so is not written by Nightly. When the user then runs DeveloperEdition again, the preference value will be false as no user preference was written by Nightly. If the preference is defined as a sticky preference, the value true will be written by Nightly even though it matches the current default, so when DeveloperEdition is run the preference keeps the desired value of true.

So I don't think it would be useful in the context of this user.js

from user.js.

nodiscc avatar nodiscc commented on July 22, 2024

https://hg.mozilla.org/mozreview/gecko/rev/ec4ed3a0a8190164725d65d62c7b3e5272d32b68#index_header

Sticky prefs are already specifiable with sticky_pref

https://hg.mozilla.org/mozreview/gecko/rev/9b9384ee8abf22ed35fc6cff2ec0308b16fb3030#index_header

Convert sticky prefs in default pref files to the new syntax

-sticky_pref("lightweightThemes.selectedThemeID", "");
+pref("lightweightThemes.selectedThemeID", "", sticky);

https://hg.mozilla.org/mozilla-central/rev/99afe078d602

Bug 1098343 (part 1) - support 'sticky' preferences, meaning a user value is retained even when it matches the default. r=bsmedberg

instructions unclear

from user.js.

pyllyukko avatar pyllyukko commented on July 22, 2024

https://hg.mozilla.org/mozilla-central/rev/99afe078d602

Also:

+        /* If new value is same as the default value and it's not a "sticky"
+           pref, then un-set the user value.

instructions unclear

Yep.

from user.js.

nodiscc avatar nodiscc commented on July 22, 2024

I'm no longer working on this.

from user.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.