Skip to content

Instantly share code, notes, and snippets.

@luanjunyi
Last active July 7, 2023 20:01
Show Gist options
  • Save luanjunyi/dac67062b80f7327fdfda403fad8d20b to your computer and use it in GitHub Desktop.
Save luanjunyi/dac67062b80f7327fdfda403fad8d20b to your computer and use it in GitHub Desktop.
Disable double click to fullscreen in Youtube (user script)
// ==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