Skip to content

Instantly share code, notes, and snippets.

@DBezemer
Last active July 19, 2020 16:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save DBezemer/4a78d8229af1deaaa5a28d3a2b9b3874 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Amazon-Prime-Video-Give-Me-HTML5-Controls
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Remove annoying forced overlay and give back HTML5 Video Controls
// @author David Bezemer
// @include /^https://www\.(amazon|primevideo)\.com/.*$/
// @grant none
// ==/UserScript==
(function() {
'use strict';
var interval = setInterval(function() {
var videoPlayer = document.getElementsByTagName('video')[0];
if (typeof(videoPlayer) != "undefined") {
videoPlayer.onplaying = function() {
console.log("Video is Playing, going HTML5 Fullscreen");
var rendererContainer = document.getElementsByClassName("rendererContainer")[0];
rendererContainer.setAttribute("style", "pointer-events: auto;");
videoPlayer.requestFullscreen();
};
}
// clearInterval(interval);
}, 2000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment