Last active
July 7, 2023 20:01
-
-
Save luanjunyi/dac67062b80f7327fdfda403fad8d20b to your computer and use it in GitHub Desktop.
Disable double click to fullscreen in Youtube (user script)
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 Disable full screen api in Youtube | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description When wathcing Youtube, double click won't enable fullscreen mode. | |
// @author luanjunyi@gmail.com | |
// @match https://www.youtube.com/watch* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=hibbard.eu | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.documentElement.requestFullscreen = function () { | |
console.log('HTML5 Fullscreen mode is disabled from Tampermonkey script.'); | |
return false; | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment