Last active
July 19, 2020 16:26
-
-
Save DBezemer/4a78d8229af1deaaa5a28d3a2b9b3874 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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