Skip to content

Instantly share code, notes, and snippets.

@jeansordes
Last active January 1, 2023 23:45
Show Gist options
  • Save jeansordes/3842d4f14c8123576ac13ce93e3f0e2f to your computer and use it in GitHub Desktop.
Save jeansordes/3842d4f14c8123576ac13ce93e3f0e2f to your computer and use it in GitHub Desktop.
Userscript for adding video controls on Instagram in your browser
// ==UserScript==
// @name Instagram Video Controls
// @namespace https://jzs.fr/
// @version 1.0
// @description Adds video player controls to Instagram videos
// @author JZS
// @match https://www.instagram.com/
// @match https://www.instagram.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=instagram.com
// @grant none
// @license GNU GPL v3
// ==/UserScript==
(function() {
'use strict';
setInterval(() => {
document.querySelectorAll("video").forEach(el => {
if (el.nextElementSibling) el.nextElementSibling.remove();
el.muted = false;
el.controls="controls";
el.style.zIndex = "999";
});
}, 500);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment