Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
nielsm
Jun 1, 2009



The final 500 is the delay until the fixing code runs, 500 milliseconds = half a second after the page has loaded.

Adbot
ADBOT LOVES YOU

BlankSystemDaemon
Mar 13, 2009



The one by Wheany doesn't need that sort of delay, because it uses an interface that provides an event notification whenever changes to the DOM are detected - so in that respect, it's much better.

It also doesn't have a whole bunch of warnings.

Megillah Gorilla
Sep 22, 2003

If only all of life's problems could be solved by smoking a professor of ancient evil texts.



Bread Liar

nielsm posted:

The final 500 is the delay until the fixing code runs, 500 milliseconds = half a second after the page has loaded.

Makes sense, thanks.

BlankSystemDaemon posted:

The one by Wheany doesn't need that sort of delay, because it uses an interface that provides an event notification whenever changes to the DOM are detected - so in that respect, it's much better.

It also doesn't have a whole bunch of warnings.

Does it display the video controls? I couldn't see anything which did that, but I suck at modern JS.

biznatchio
Mar 31, 2001


Buglord
That script could also use a change to override the `play` method to prevent videos from being kicked off by other scripts on the page after you've ostensibly tried to stop them.

I created this script a couple years back to stop videos from playing on CNN.com that works by swapping out the `play` method with one that creates and shows a prompt to allow me to manually decide whether I want to let videos play or not. That same technique could be extracted out and made more generalized for videos on any site.

Szmitten
Apr 26, 2008
I assume that watching picture-in-picture, minimizing the browser, adjusting the window size a bunch, then reopening the browser to find the entire graphical interface wigging the gently caress out and only fixing after closing and restarting is a known but rare software hazard that has nothing to do with graphics cards or anything?

Antrodemus
Mar 8, 2002

astral posted:

People have reported having that issue on SA, and at least in those cases it sounded it was related to embedded video frames (like youtube).

Thanks! I was actually on brickset (gotta track those lego prices), and there's a ton of embedded video ads on that page that the ad-blocker is removing - I'll assume it's related to that.

BlankSystemDaemon
Mar 13, 2009



Megillah Gorilla posted:

Does it display the video controls? I couldn't see anything which did that, but I suck at modern JS.
You're right that it doesn't - at least not as it is.

I think I've managed to make it work:
JavaScript code:
// ==UserScript==
// @name        Fix videos better - somethingawful.com
// @namespace   https://forums.somethingawful.com/
// @match       https://forums.somethingawful.com/*
// @version     0.2
// @author      Wheany, BlankSystemDaemon
// @description Sets embedded video size caps, auto-enables controls, embeds webms, sets volume to 20%, and prevents videos from looping. Last edited: 6/19/2023, 15:00:42 UTC
// ==/UserScript==


function processVideos() {
	[...document.getElementsByTagName('video')].forEach((v) => {
		v.removeAttribute('loop');
		v.pause();
		Object.assign(v, {
			currentTime: 0,
            		controls: true,
			volume: 0.2,
			muted: false
		});
		Object.assign(v.style, {
			maxWidth: '100%',
			maxHeight: '500px'
		});
	})
}

// required for dynamic webapp pages that modify the page with javascript
const observer = new MutationObserver(processVideos);
observer.observe(document.body, {
	childList: true,
	subtree: true
});

// handles simple pages like SA forums where the page structure doesn't change dynamically after being loaded
if(document.readyState === "interactive") {
	processVideos();
} else {
	document.addEventListener('DOMContentLoaded', processVideos);
}
I added "controls: true" because of this and changed "subtree: true", with the latter choice being a result of finding this.

BlankSystemDaemon fucked around with this message at 18:31 on Jun 20, 2023

Megillah Gorilla
Sep 22, 2003

If only all of life's problems could be solved by smoking a professor of ancient evil texts.



Bread Liar
Thanks for that. I really appreciate the effort you and everyone put into this.

Tested it in the gif thread and it worked fine, exactly like the old one, but I'm assuming much better at the behind the scenes stuff.

One thing I noticed with the 'show controls' is that on some videos I need to mouse over the video a couple times before they stay visible*. Otherwise the control go back to being hidden.

Like this one:



I know I'm in the minority these days in that I like to be able to see how long a video is and its progress at all times. Had a devil of a time finding a script to work on youtube to keep things visible, too.




* my Firefox, like the rest of my computer, is held together with baling twine, so there's a very good chance it's just me this happens to.

BlankSystemDaemon
Mar 13, 2009



Megillah Gorilla posted:

Thanks for that. I really appreciate the effort you and everyone put into this.

Tested it in the gif thread and it worked fine, exactly like the old one, but I'm assuming much better at the behind the scenes stuff.

One thing I noticed with the 'show controls' is that on some videos I need to mouse over the video a couple times before they stay visible*. Otherwise the control go back to being hidden.

Like this one:

I know I'm in the minority these days in that I like to be able to see how long a video is and its progress at all times. Had a devil of a time finding a script to work on youtube to keep things visible, too.




* my Firefox, like the rest of my computer, is held together with baling twine, so there's a very good chance it's just me this happens to.
For me, video controls always fade out and in depending on where the mouse cursor is.

I think it has to do with how your window manager is tracking focus, and if you're using Windows, I'm pretty sure it tracks focus based on which program is on top.

I'm using FreeBSD with Wayland, which has a very isolated way of handling these things where only the active window can know where the focus or cursor is, let alone what it's doing.

Stare-Out
Mar 11, 2010

So, Twitter embeds. I know Twitter is a shitshow of a site and almost always if something's wrong it's Twitter's fault but how come embedded tweets show up perfectly fine and snappy on the iOS Awful App and Edge, but Firefox consistently struggles with them, to the point where one post might have a tweet loaded but right after in another post the same tweet never properly loads. What's up with that?

BlankSystemDaemon
Mar 13, 2009



Stare-Out posted:

So, Twitter embeds. I know Twitter is a shitshow of a site and almost always if something's wrong it's Twitter's fault but how come embedded tweets show up perfectly fine and snappy on the iOS Awful App and Edge, but Firefox consistently struggles with them, to the point where one post might have a tweet loaded but right after in another post the same tweet never properly loads. What's up with that?
I think iOS Awfull.app and Edge are both Webkit and Chromium respectively - and one is a fork from the other, so they're not exactly as different as Firefox is.

There's no real way to answer your question without some framegraphs, and unfortunately Mozilla took away dtrace support before Microsoft added it to Windows 10 - so any of the tools I could recommend won't work anymore.

pseudorandom name
May 6, 2007

Stare-Out posted:

So, Twitter embeds. I know Twitter is a shitshow of a site and almost always if something's wrong it's Twitter's fault but how come embedded tweets show up perfectly fine and snappy on the iOS Awful App and Edge, but Firefox consistently struggles with them, to the point where one post might have a tweet loaded but right after in another post the same tweet never properly loads. What's up with that?

Twitter embeds trip a Firefox heuristic that decides they're unimportant garbage and hugely deprioritizes the page loads. (iirc, Firefox decides that hidden IFRAMEs aren't useful, and Twitter embeds start as hidden IFRAMEs before they finally load and get shown).

If you set the layout.oopif_activity_grace_period_ms pref to 64000 it'll load embedded tweets immediately.

BlankSystemDaemon
Mar 13, 2009



pseudorandom name posted:

Twitter embeds trip a Firefox heuristic that decides they're unimportant garbage and hugely deprioritizes the page loads. (iirc, Firefox decides that hidden IFRAMEs aren't useful, and Twitter embeds start as hidden IFRAMEs before they finally load and get shown).

If you set the layout.oopif_activity_grace_period_ms pref to 64000 it'll load embedded tweets immediately.
What the gently caress.

What the hell-rear end kinda purpose do hidden iframes serve?

isndl
May 2, 2012
I WON A CONTEST IN TG AND ALL I GOT WAS THIS CUSTOM TITLE

BlankSystemDaemon posted:

What the gently caress.

What the hell-rear end kinda purpose do hidden iframes serve?

Tracking and analytics, of course!

pseudorandom name
May 6, 2007

Hidden IFRAMEs were also the XmlHttpRequest before XmlHttpReqeust.

Anyway, the heuristic has a fairly low timeout by default because that's correct on most web sites, the typical Twitter embed scenario is pseudo-journalism with like three embedded tweets. Something Awful presents a weird edge case where a single page can contain hundreds of tweets, which means hundreds of separate HTTP connections to the same site, and Firefox limits the total number of in-progress connections to a single site. So Tweets take a while to load because they're starved for allowed HTTP connections, and the long delay in loading the tweet trips the heuristic that decides they're not important and slows their load even further.

Stare-Out
Mar 11, 2010

pseudorandom name posted:

Twitter embeds trip a Firefox heuristic that decides they're unimportant garbage and hugely deprioritizes the page loads. (iirc, Firefox decides that hidden IFRAMEs aren't useful, and Twitter embeds start as hidden IFRAMEs before they finally load and get shown).

If you set the layout.oopif_activity_grace_period_ms pref to 64000 it'll load embedded tweets immediately.

Oh poo poo, I forgot there was a setting that messed with that stuff, thanks for reminding me!

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

pseudorandom name posted:

Hidden IFRAMEs were also the XmlHttpRequest before XmlHttpReqeust.

Anyway, the heuristic has a fairly low timeout by default because that's correct on most web sites, the typical Twitter embed scenario is pseudo-journalism with like three embedded tweets. Something Awful presents a weird edge case where a single page can contain hundreds of tweets, which means hundreds of separate HTTP connections to the same site, and Firefox limits the total number of in-progress connections to a single site. So Tweets take a while to load because they're starved for allowed HTTP connections, and the long delay in loading the tweet trips the heuristic that decides they're not important and slows their load even further.

I think this is also what makes firefox feel slower in the long run if you have a lot of tabs open. Any active background tabs will keep making some heartbeat or analytics connections and then any "real" connections you make to the same site have to wait for a slot to open.

No, I will not be closing my hoard of tabs.

Maigius
Jun 29, 2013


I'm on a new profile in Window 11 and really want thick, permanent scrollbars back. What settings to I need to change to get those back?

nielsm
Jun 1, 2009



Maigius posted:

I'm on a new profile in Window 11 and really want thick, permanent scrollbars back. What settings to I need to change to get those back?

Those pop-in scrollbars are the bane of my web UIs at work, whenever I hover over a list the scrollbar pops in and displaces everything inside the list, causing a big visual jump.
They could at the very least have made them overlay instead of pop-in.

Stare-Out
Mar 11, 2010

I have a habit of throwing my mouse cursor off the right side of the screen to hide it while watching videos and with Windows 11 and the latest Firefox it activates the scrollbar when I do that. :argh:

E: I wouldn't mind a setting to hide scrollbars permanently, honestly.

Megillah Gorilla
Sep 22, 2003

If only all of life's problems could be solved by smoking a professor of ancient evil texts.



Bread Liar

Maigius posted:

I'm on a new profile in Window 11 and really want thick, permanent scrollbars back. What settings to I need to change to get those back?

I know the trend to hide every UI element is because of phone and tablet users but, gently caress me, just let me keep them visible.

I've got a huge monitor, I dont need to scrimp for pixels.

jeeves
May 27, 2001

Deranged Psychopathic
Butler Extraordinaire

Megillah Gorilla posted:

I've got a huge monitor, I dont need to scrimp for pixels.

Didn’t you get the memo that all that matters in the world of UI for the past decade is how do webpages look on phones???

Bertha the Toaster
Jan 11, 2009

Maigius posted:

I'm on a new profile in Window 11 and really want thick, permanent scrollbars back. What settings to I need to change to get those back?

From a bit of messing about in about :config it looks like setting layout.testing.overlay-scrollbars.always-visible to true, makes scrollbars always visible. Can't see anything obvious for the size, I feel like that's going to be a userChrome.css thing and I can't find any examples.

NFX
Jun 2, 2008

Fun Shoe

Maigius posted:

I'm on a new profile in Window 11 and really want thick, permanent scrollbars back. What settings to I need to change to get those back?

Have you changed the windows accessibility settings to always have scroll bars expanded? I don't remember if that helps in Firefox, but it's nice overall.

Megillah Gorilla
Sep 22, 2003

If only all of life's problems could be solved by smoking a professor of ancient evil texts.



Bread Liar

jeeves posted:

Didn’t you get the memo that all that matters in the world of UI for the past decade is how do webpages look on phones???

Over and over and over again :(

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
The reason smart phone displays are tall is so we can show ads on the top and bottom of the screen and still have a very respectable 1080*768 peephole in the middle :)

HalloKitty
Sep 30, 2005

Adjust the bass and let the Alpine blast

Wheany posted:

The reason smart phone displays are tall is so we can show ads on the top and bottom of the screen and still have a very respectable 1080*768 peephole in the middle :)

Adblocking on android is so easy these days, you don't need root or some weird local vpn like the old days, it's easy to set a custom dns server..

vv I mean in not just in the browser, but across the whole system

HalloKitty fucked around with this message at 14:40 on Jun 26, 2023

Truga
May 4, 2014
Lipstick Apathy
ublock origin works great for me on roid

Maigius
Jun 29, 2013


NFX posted:

Have you changed the windows accessibility settings to always have scroll bars expanded? I don't remember if that helps in Firefox, but it's nice overall.

It certainly makes it bigger.

Megillah Gorilla
Sep 22, 2003

If only all of life's problems could be solved by smoking a professor of ancient evil texts.



Bread Liar
Just remembered I have a scrollbar script running that lets you change the colour. Makes the drat thing easier to see - which is part of the point of the drat things in the first place.

https://userstyles.org/styles/177056/dark-scrollbars-quantum-nox

It's not quite what you're looking for, but eh, can't hurt.

Powered Descent
Jul 13, 2008

We haven't had that spirit here since 1969.

HalloKitty posted:

Adblocking on android is so easy these days, you don't need root or some weird local vpn like the old days, it's easy to set a custom dns server..

vv I mean in not just in the browser, but across the whole system

Mullvad (the VPN provider) has DNS-over-HTTPS servers, in normal and ad-blocking flavors, available to everyone as a public service.

Overview with step-by-step instructions for Android: https://mullvad.net/en/help/dns-over-https-and-dns-over-tls/

I use the adblocking one, on my phone and in Firefox. (On one occasion, some kind of problem happened and my phone couldn't resolve anything until I went back into the settings and turned off the custom DNS server. I tried it again like an hour later and everything was working fine again. No idea what happened there, but it was just the one time. Still, if you go this route, you'll want to remember how to turn it off in case something goes sideways.)

pseudorandom name
May 6, 2007

Once again Mozilla is using Firefox Studies to deploy malware.

Go to about:studies, click Remove next to Weather Suggestions.

Go to Settings, search for studies, uncheck "Allow Firefox to install and run studies"

I would've thought this dipshits learned their lesson from the Mr. Robot mess, but, no, of course not.

BlankSystemDaemon
Mar 13, 2009



You can also use policies.json to disable things like studies, pocket, telemetry, and DNS over HTTPS.

BlankSystemDaemon fucked around with this message at 22:35 on Jun 29, 2023

Knormal
Nov 11, 2001

BlankSystemDaemon posted:

You can also use policies.json to disable things like studies, pocket, telemetry, and DNS over HTTPS.
Note that for some reason, if you reinstall Firefox from the installer file it'll delete this file from the Firefox directory so make sure you keep a copy elsewhere. I don't know if it does the same if you use Firefox's auto-update, but whenever we push a new version at work we have to redeploy this file with it.

BlankSystemDaemon
Mar 13, 2009



Knormal posted:

Note that for some reason, if you reinstall Firefox from the installer file it'll delete this file from the Firefox directory so make sure you keep a copy elsewhere. I don't know if it does the same if you use Firefox's auto-update, but whenever we push a new version at work we have to redeploy this file with it.
Huh, I didn't realize this.

Probably because FreeBSDs package manager is explicitly designed to not overwrite user-created-or-edited files.

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.
Anybody know if there is a similar add-on to "cookie auto delete" in firefox for android?
I am specifically looking for the capability to automatically delete almost all cookies when I close the browser (or after timeout), while retaining cookies for a specific list of sites. I know firefox comes with the first half by default, but I want more choices.

e: google seems to think that cad has an android version but it only shows up when I search from my pc, and tells me "not compatible" if I look on android.

Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



It's not a matter of android versions of add-ons, but Mozilla refusing to test and unhide any more than the ~25 approved ones that have been available for years now.

There is a workaround to get it to show more, but is a hassle. This has worked for me on Fennec and Mull for the last couple of years; it's unclear to me if you still need the nightly (e: or beta?) version of Firefox if you want to stay on a Firefox branded branch of the app.

I bypassed most of the hoops by trying other people's collections that were posted publicly. I can confirm 16201230 What-I-want-on-Fenix contains cookie auto delete which works fine, and combines well with "I don't care about cookies" which is also in there.

Bertha the Toaster
Jan 11, 2009
I still to this day hate the revamped version of Firefox Android. At this point I don't even remember all the things it used to do other than the lack of extensions. That and when you click on the address bar and click one of your frequently visited sites it opens a new tab rather than using the current one so I end up with loads of tabs for no reason and have to keep closing them. I don't understand why they made it do this and I don't understand why they can't fix it. I don't suppose anyone knows if there's a workaround/fix/addon for this?

Killingyouguy!
Sep 8, 2014

VictualSquid posted:

Anybody know if there is a similar add-on to "cookie auto delete" in firefox for android?
I am specifically looking for the capability to automatically delete almost all cookies when I close the browser (or after timeout), while retaining cookies for a specific list of sites. I know firefox comes with the first half by default, but I want more choices.

e: google seems to think that cad has an android version but it only shows up when I search from my pc, and tells me "not compatible" if I look on android.

Use Firefox Focus for everything except those sites you want cookies for?

Adbot
ADBOT LOVES YOU

Geemer
Nov 4, 2010



Bertha the Toaster posted:

I still to this day hate the revamped version of Firefox Android. At this point I don't even remember all the things it used to do other than the lack of extensions. That and when you click on the address bar and click one of your frequently visited sites it opens a new tab rather than using the current one so I end up with loads of tabs for no reason and have to keep closing them. I don't understand why they made it do this and I don't understand why they can't fix it. I don't suppose anyone knows if there's a workaround/fix/addon for this?

I just wholesale jumped ship to Edge for Android. It comes with ABP integration so it's better than nothing, but sure ain't great. It's just less irritating in the UX department.
Smasnug's Internet app is also kinda decent and supports a few ad blocking companion apps.

Every time I give Firefox Android another shot it's just terrible all around.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply