Skip to content

Instantly share code, notes, and snippets.

@assiless
Forked from jeansordes/instagram_video_ctrls.js
Created January 1, 2023 23:45
Show Gist options
  • Save assiless/1ab52b2c7ecedae4e73402fc6f0c668f to your computer and use it in GitHub Desktop.
Save assiless/1ab52b2c7ecedae4e73402fc6f0c668f 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