Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToDo: scratchpad prefs cleanup script(s) #242

Closed
3 tasks done
atomGit opened this issue Sep 23, 2017 · 11 comments
Closed
3 tasks done

ToDo: scratchpad prefs cleanup script(s) #242

atomGit opened this issue Sep 23, 2017 · 11 comments

Comments

@atomGit
Copy link

atomGit commented Sep 23, 2017

🔻 Thorin's ToDo list:

  • update wiki 1.1 to reflect that user set => modified in FF55+
  • add links to scratchpad js directory on wiki page, remove draft notice etc
  • scratchpad js files

🔻 Original Post

WIKI draft: https://github.com/ghacksuserjs/ghacks-user.js/wiki/1.6-Bulk-Pref-Resetting-[Scratchpad]

wanted to start a new, dedicated topic regarding this issue since we strayed way off the reservation in the last one

important stuff from the old topic that still need to be addressed include...

atomGit: could the process of updating the user.js and the cleaning of prefs.js (equivalent to running the Scratchpad script) be totally automated by, say, a GM script that would prompt first and show a changelog perhaps?

new stuff...

how should the scratch-script be versioned?

how often will it need to be updated? i don't want to be re-editing the script at every commit, so what do you guys suggest?

for my sanity (and laziness) i'd prefer to reset ALL user.js prefs as Thorin-Oakenpants suggested, if that's ok with u dudes

i didn't see any feedback in web or browser console with this code - is it possible to pop a dialog box with "success!" or something?

  for (let i=0, len=ops.length; i < len; i++) {
    if (Services.prefs.prefHasUserValue(ops[i])) {
      Services.prefs.clearUserPref(ops[i]);
      if (!Services.prefs.prefHasUserValue(ops[i])) { console.log("reset", ops[i]); }
    }
@atomGit
Copy link
Author

atomGit commented Sep 23, 2017

@earthlng - nice sciript! if (Services.prefs.prefHasUserValue(ops[i])) { - what does it do? LOL i don't know JS well at all, but from what i'm seeing, this resets ALL user set prefs system-wide (prefHasUserValue), as in prefs.js as well? i've got to be wrong, but that's what i'm seeing

then I'd recommend to advice your readers to disconnect the network before running the script.

yeah, i thought about that too - maybe resetting all isn't the best way to go

@Thorin-Oakenpants

Noooo .. I do NOT want the huge list in the wiki - please revert it

I don't really want to MAINTAIN anything...

i'll maintain it - i thought the purpose was to make it as easy as possible for users by providing the entire script - that was my plan anyway - if the user has to sift through change logs and run RegEx's to pull prefs, and create the script - all of which most users probably won't do - then what's the point? if that's the case i think it wouldn't be much extra work to do it all manually

i'll do whatever you want though

@atomGit
Copy link
Author

atomGit commented Sep 23, 2017

... or, if you really don't want the full script here, i could stick on my repo - let me know your thoughts

@publicarray
Copy link

Wile I respect the effort done here I use Mozilla's own facilities, I remove the prefs.js file and add a /preferences folder with my custom-user-prefs.js in it.

@publicarray
Copy link

publicarray commented Sep 24, 2017

that file contains a heap of internal prefs and values

They get repopulated and re-saved on FF shutdown. The only down sides that I have noticed are that the next FF start takes a bit longer and the positioning of the extensions is lost (customisation).

@publicarray
Copy link

@Thorin-Oakenpants Only when I forgot that I still had a window open 😓. I just do it because It gives be a blank slate to work from. i.e closer to a new profile. (also less of a chance to miss something)

@Thorin-Oakenpants Thorin-Oakenpants changed the title Scratchpad prefs cleanup script ToDo: scratchpad prefs cleanup script(s) Oct 6, 2017
@Thorin-Oakenpants Thorin-Oakenpants self-assigned this Oct 6, 2017
@earthlng
Copy link
Contributor

earthlng commented Dec 8, 2017

^^ yes good idea. Nice work, thanks. I made one small fix: d9e935d

@earthlng
Copy link
Contributor

earthlng commented Dec 8, 2017

browser.send_pings is one of the few prefs that WEs can change. Maybe it's locked because of that?
IDK what the problem is with browser.newtabpage.enhanced

@earthlng
Copy link
Contributor

earthlng commented Dec 8, 2017

sounds good. Maybe change the note or remove it.

@earthlng
Copy link
Contributor

earthlng commented Dec 8, 2017

yeah that's fine too

@earthlng
Copy link
Contributor

earthlng commented Dec 8, 2017

but it should note that browser.urlbar.autocomplete.enabled needs to be true if one wants to enable some of the other ones. It kinda does that without the need for a note with 0850a + b, so IDK, up to you.

@earthlng
Copy link
Contributor

earthlng commented Dec 8, 2017

or we could just make all of them inactive. I think it's a pretty nice feature actually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants