Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
magnustesshu
@magnustesshu:matrix.org
[m]
Well, what I noticed so far is that a lot of the javascript it ran was not actually needed. Also part of the javascript that disabled the preference wasn't reactive. I'm working now on trying to create a button to toggle multiple prefs at once.
ohfp
@ohfp:matrix.org
[m]

Hm, I thought I had thrown away everything that wasn't needed – seems like I was wrong ;)

What do you mean by "not reactive"?

That's awesome – you're taking work away from me :D
I'll assume you've already found that yourself, but just in case: at least the privacy-pane-js (but probably some of the others as well) should give you a few examples of enabling/disabling setting several prefs (and if my memory servers me right even setting prefs depending on a "global" choice).

Also: if you're on gitlab, it might make sense to create a repo with the changed/new files to work on, so we could collaborate / avoid doing the same work twice. would that sound like something you'd appreciate? (if so, I'd just open one up, either with my simple attempts as a start or, probably preferable, with your improved work :)

magnustesshu
@magnustesshu:matrix.org
[m]
Yeah, although I'm not sure what I should put in gitlab. A diff file (which I still don't know how to generate, derp)? The entire FF code, which we can generate a diff from?
magnustesshu
@magnustesshu:matrix.org
[m]

Not reactive meant that the part responsible for checking if a certain about:config setting was selected didn't re-enable or disable the checkbox if you enabled that certain pref in about:config, until you reloaded the page.

I think simplifying the interface to just have a master button which toggles all the relevant settings related to something and section (or maybe a collapsible dropdown if we can manage it) that shows each about:config setting affected would be more ideal. I'll post a screenshot once I figure out how to align this button on the right - for some reason I've tried like 10 things and none seem to work, starting to think there is shadow css operating on main.inc.xhtml

ohfp
@ohfp:matrix.org
[m]

I would've suggested just the changed / new files – the entire ff code would be overkill, I think ;)
that way, one could copy those over an existing ff source to get things building or generate diffs/patches from, while keeping things manageable.

ah, yeah – it's definitely not reactive then, I had intentionally ignored that for the sake of getting things going :D

organizing the settings like this sounds great to me – it would also be more or less exactly what was proposed in the issue that's outlining some ideas on it ^^

magnustesshu
@magnustesshu:matrix.org
[m]
Alright. How do I create a diff?
Do I need to unpack the tarfile again and run git diff dirA dirB or something?
stanzabird
@stanzabird:matrix.org
[m]
I make my diffs by createing a new .git repo and doing a git diff against the whole tree. sounds like a lot of work but it's just a script
it produces great diffs with the right path names etc
magnustesshu
@magnustesshu:matrix.org
[m]
Thats what I have so far except the button doesn't work
stanzabird so I should make a new git repo in clean firefox, git add all the files that I change, and then git diff?
stanzabird
@stanzabird:matrix.org
[m]
yes, that's probably faster than what I do (creating a new git repo adding all files)
magnustesshu
@magnustesshu:matrix.org
[m]
alright. That would also let me push to gitlab pretty easily
stanzabird
@stanzabird:matrix.org
[m]
the advantage of my approach is that I can 'git reset --hard' after a bunch of patches (not mine) have been run, and get a clean tree back
ohfp
@ohfp:matrix.org
[m]
I do it more or less the same way, but instead of "everything" I just roughly eyeball the files/folders where I'll change things. keeps size and time down ^^
stanzabird
@stanzabird:matrix.org
[m]
yea, agreed, it's a bit too time consuming
magnustesshu
@magnustesshu:matrix.org
[m]
firefox is already like 11 gigs whats another few hundred megabytes lol
FF after being built*
TheCultLeader666
@thecultleader666:gnome.org
[m]
Anyone have experience using the flatpak version of Librewolf? Is it pretty much the same as a native package?
ohfp
@ohfp:matrix.org
[m]
https://gitlab.com/ohfp/librewolf-pref-pane <-- I've set up a repo starting from the unmodified firefox files and adding my changes as a commit. should make it a bit more manageable.
magnustesshu
@magnustesshu:matrix.org
[m]
Oh, I am in the process of doing that too lol
I guess I should just pull from there and then apply my changes instead?
ohfp
@ohfp:matrix.org
[m]
TheCultLeader666: almost – basically the override file location is elsewhere and, due to the sandboxing, some things (like U2F/FIDO or native messaging hosts – like for KeepassXC) won't work / won't work without some fiddling.
TheCultLeader666
@thecultleader666:gnome.org
[m]
That’s sad, I guess I’ll just use Firefox with tweaks
ohfp
@ohfp:matrix.org
[m]
@magnustesshu: sounds good ^^ – just tell me your name on gitlab and I'll add you to the repo, so you can push things ^^
are no other options working for you? (appimage, for example)?
magnustesshu
@magnustesshu:matrix.org
[m]
I've never actually used git and not used git add . to add all files to a repo - is there a shortcut to add only modified/currently tracked files easily?
git add -u does it
magnustesshu
@magnustesshu:matrix.org
[m]
I tried to push to the repo but was denied access
my gitlab is magnustesshu
ohfp
@ohfp:matrix.org
[m]
I've just added you as a maintainer – you should've received a notification and should be able to push to it :)
magnustesshu
@magnustesshu:matrix.org
[m]
Alright pushed.
I really didn't change much, I spent a lot of time trying to figure out how what was already there worked.
xhtml confuses me
ohfp
@ohfp:matrix.org
[m]
oh nice, that's quite a bit cleaner – seems like some things get done automatically without having to manually call stuff. great :)
magnustesshu
@magnustesshu:matrix.org
[m]
Yeah, its from putting preference="something.otherthing.whyareall.about.config.things.so.long" in the checkbox
I think you could use the things you had to enable/disable that checkbox responsively though thinking about it now. Anyway, are we allowed to define functions in that js file like you would in normal javascript for an onclick?

is

/ Services.prefs.setBoolPref(
      // "privacy.override_rfp_for_color_scheme",
      // rfpCheck.checked
    // );

set a preference?

ohfp
@ohfp:matrix.org
[m]

seems to be possible – in privacy.js, that's done with a utility function (setEventListener) that just calls addEventListener.

that snippet could be used to set prefs manually, yep. wasn't needed at that point, though.

there also seem to be a few other helper functions there (not just setBoolPref) to read/write prefs.
plus, privacy.js has those two utility functions:

function setSyncFromPrefListener(aId, aCallback) {
  Preferences.addSyncFromPrefListener(document.getElementById(aId), aCallback);
}

function setSyncToPrefListener(aId, aCallback) {
  Preferences.addSyncToPrefListener(document.getElementById(aId), aCallback);
}

calling Preferences.-methods, which might also help with some of the more complex stuff ^^

(I dug into those a bit but didn't need them for the simple test case – I've mostly already forgotten their specifics /o\ )
magnustesshu
@magnustesshu:matrix.org
[m]

Alright. The following doesn't appear to be working, can you proofread to make sure I'm not an idiot and forgetting something obvious?
librewolf.inc.xhtml

      <button id="browserContainersSettings"
              is="highlightable-button"
              class="accessory-button"
              data-l10n-id="librewolf-webgl-toggle"
              onclick="toggleWebGL();"
              />

librewolf.js

function toggleWebGL() {
  console.log("TEST");
  let toggleOff = getPreference("webgl.disabled", false);
  if (toggleOff) {
    Services.prefs.setBoolPref("webgl.disabled", false);
    Services.prefs.setBoolPref("webgl.enable-webgl2", true);
  } else {
    Services.prefs.setBoolPref("webgl.disabled", true);
    Services.prefs.setBoolPref("webgl.enable-webgl2", false);
  }
}

Console says something about security policy not allowing it to load a resource, so I'm not sure if the console.log isn't being called at all cause I'm dumb or isn't allowed to run at all

getPreference is
function getPreference(prefname, defaultValue) {
  let retval = Preferences.get(prefname);
  if (retval === undefined) {
    return defaultValue;
  }
  return retval;
}
ohfp
@ohfp:matrix.org
[m]
are you checking things from the browser toolbox / browser console? (just to make sure that's not the reason why there's no console.log-output ^^)
magnustesshu
@magnustesshu:matrix.org
[m]
Yeah, assuming that means the regular developer tools console tab
Let me push so you see what I see (assuming you haven't also been doing stuff)
ohfp
@ohfp:matrix.org
[m]
hm, nope – the one from menu => more tools => browser toolbox (or browser console); that one gives you the tools to tinker with things like browser/ui css and gives you "global" console messages (ie. not site specific ones). that should catch everything, altough for the pref panes the regular one might be enough – no idea.
I haven't been doing anything else so far – just doing some "regular work" on the side for work :D
…btw: maybe we should move all this over to the librewolf-build channel, now that I think of it – this might be somewhat distracting for users who just want to get some help with an issue ;)