mirror of
https://github.com/chylex/Userscripts.git
synced 2025-05-06 15:34:07 +02:00
Add 'Fix YouTube Fullscreen Text Selection'
This commit is contained in:
parent
855d902067
commit
34937d0a1d
17
YouTube/FixFullscreenTextSelection.user.js
Normal file
17
YouTube/FixFullscreenTextSelection.user.js
Normal file
@ -0,0 +1,17 @@
|
||||
// ==UserScript==
|
||||
// @name Fix YouTube Fullscreen Text Selection
|
||||
// @description Prevents accidentally selecting text when double-clicking the video to toggle fullscreen.
|
||||
// @version 1
|
||||
// @license MPL-2.0
|
||||
// @namespace https://chylex.com
|
||||
// @homepageURL https://github.com/chylex/Userscripts
|
||||
// @supportURL https://github.com/chylex/Userscripts/issues
|
||||
// @include https://youtube.com/*
|
||||
// @include https://*.youtube.com/*
|
||||
// @run-at document-start
|
||||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
document.addEventListener("onmozfullscreenchange" in document ? "mozfullscreenchange" : "fullscreenchange", function(){
|
||||
window.getSelection().removeAllRanges();
|
||||
});
|
Loading…
Reference in New Issue
Block a user