Skip to content

Instantly share code, notes, and snippets.

@dag10
Created November 6, 2023 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dag10/6d72019891ab120f351fc1023e51cbba to your computer and use it in GitHub Desktop.
Save dag10/6d72019891ab120f351fc1023e51cbba to your computer and use it in GitHub Desktop.
Bookmarklet to show video controls on a web page
//bookmarklet_title: Show Video Controls
//bookmarklet_about: Drew Gottlieb
document.querySelectorAll('video').forEach(video => video.controls = true);
new MutationObserver(mutations => {
mutations.forEach(mutation => {
mutation.addedNodes.forEach(node => {
if (node.tagName === 'VIDEO') node.controls = true;
});
});
}).observe(document.body, { childList: true, subtree: true });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment