Code Monkey home page Code Monkey logo

Comments (6)

bermudalocket avatar bermudalocket commented on August 16, 2024

Interesting! Do you have any other extensions enabled?

Are you able to pinpoint the source of the sound after the page loads? For example, are there any videos or gifs on the page that make the sound?

from tweaks-for-reddit.

Fofer avatar Fofer commented on August 16, 2024

I do have some other extensions enabled, I will try experimenting by disabling them all, maybe do some process of elimination troubleshooting, and see if this is some sort of three-way conflict... I'll report back if I discover anything.

And no, I can't seem to pinpoint the source of the sound after the page loads. It's only image thumbnails I'm seeing, none of them are GIFs or videos that make the sound I just heard. I just know this behavior is new. It's not 100% reproducible either, but pretty regular over the past day or two and only happening on Reddit.

from tweaks-for-reddit.

Fofer avatar Fofer commented on August 16, 2024

Thus far I'm unable to tie this bug to anything other than the Tweaks for Reddit extension and this particular "Automatically expand images" feature.

In the meantime, I noticed that this audio was autoplaying (briefly) even though this page-specific setting was on "Stop media with sound," which is really odd.
CleanShot 2021-06-19 at 08 00 10

I changed it to "Never auto-play" and haven't experienced this issue since. I'll keep troubleshooting, but figured I'd share this in the meantime.

from tweaks-for-reddit.

bermudalocket avatar bermudalocket commented on August 16, 2024

That's very odd. Are you using Safari or Safari Tech Preview?

The "automatically expand images" feature works like this:

  1. Scan page and scrape all posts

    Array.from((subject ?? document).querySelectorAll(".thing"))

  2. Filter out posts that don't have attachments. To work around a Reddit issue where literally every type of attachment (link, video, photo, etc) is classified as a video, another filter is applied which searches each posts's attachment link for domains likely to host an image, seen here:

    const expandableDomains = [ "i.redd.it", "reddit.com", "i.imgur.com", "pbs.twimg.com" ];

  3. At this point we should have an array of posts that contain an image attachment. The last step is to loop through all of these posts and call the simple javascript .click function on each posts's "expando button", completing the "auto expansion".

    .forEach(e => e.querySelector(".expando-button:not(.expanded)")?.click())

So my first thought was that a video or a GIF with sound was being clicked, which theoretically could cause a brief second of sound before Safari realizes and pauses it. But if that were the case, you'd be able to see a video or GIF post somewhere on the page, containing sound that matches what you hear at page load.

I did just realize that the entire time I've been trying to reproduce this, I've had an extension called "Stop the Madness" enabled which, among other things, stops video playback. I've disabled it for now and will try to reproduce the issue.

from tweaks-for-reddit.

bermudalocket avatar bermudalocket commented on August 16, 2024

Hey @Fofer, are you still having this issue? Unfortunately I haven't come across it in the last two weeks.

from tweaks-for-reddit.

Fofer avatar Fofer commented on August 16, 2024

Hi @bermudalocket, yes, I'm still experiencing the issue, so I'd just left the "automatically expand images" feature disabled to avoid it. Later this week I'll have time to experiment again with ALL OTHER extensions disabled, and then perhaps re-enable one at a time to check each one and see if I can pinpoint any additional culprits.

It's just very time consuming with a big handful of extensions and annoying because the issue isn't 100% reproducible, it only pops up from time to time. Noticeable and unnerving, but not consistent.

Of note, I am still running Big Sur 11.2.3 on this Mac (for unrelated but important reasons) so it's also possible this issue would go away if and when I update to the latest macOS. I'm running Safari 14.0.3 with it.

from tweaks-for-reddit.

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.