logoalt Hacker News

varenc04/02/20253 repliesview on HN

I have a simple bookmarklet does does something similar:

    javascript:(function(){document.querySelectorAll("video").forEach(((e,o)=>{console.log(`VideoFixer: Processing <video> #${o+1}:`,e),e.style.position="relative",e.style.zIndex="999999",e.controls=!0,e.style.pointerEvents="auto";const t=[],i=[];["disablePictureInPicture","disableRemotePlayback"].forEach((o=>{e.hasAttribute(o)&&(t.push(o),e.removeAttribute(o))})),e.hasAttribute("controlsList")&&(i.push(...e.getAttribute("controlsList").split(/\\s+/)),e.removeAttribute("controlsList")),t.length&&console.log(`VideoFixer: Removed attributes: ${t.join(", ")}`),i.length&&console.log(`VideoFixer: Removed controlsList restrictions: ${i.join(", ")}`),t.length||i.length||console.log("VideoFixer: No restrictions found to remove.")})),console.log("VideoFixer: All videos processed.");}());

It just re-enables all controls on all <video> elements and uses z-indexing to push them to the top. Works on instagram but needs to be re-ran for new video elements.

Replies

varenc04/03/2025

I turned this into a greasemonkey script: https://greasyfork.org/en/scripts/531780-universal-video-fix...

That can be configured to run automatically on every site, and it uses the MutationObserver API to automatically fix any newly added/modified <video> elements on the page. Seems to work on Snapchat and Instagram so far, but breaks some functionality. Op's chrome extension, with bespoke support for Instagram, likely offers a much better experience. This is just more universal.

darajava04/02/2025

Ah that's a good idea! Similar effect to this but I guess packaging it in a chrome extension lends itself to "set it and forget it". I also have some customization options.

show 2 replies
coldtrait04/03/2025

This is great. I just asked ChatGPT to convert it into a script that I could use with Violentmonkey.

show 1 reply