Last active
May 6, 2023 11:14
-
-
Save ivanmem/5f9af0b0df01e1965515353d5520eb4d 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 coub-fullscreen-key-f | |
// @version 0.1 | |
// @description Добавляет быструю клавишу F для переключения полноэкранного режима | |
// @author github.com/xeleoss | |
// @match *://coub.com* | |
// @match *://coub.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=coub.com | |
// @run-at document-end | |
// ==/UserScript== | |
(async function () { | |
'use strict'; | |
document.body.addEventListener("keydown", (e) => { | |
if (e?.code === "KeyF") { | |
document?.querySelector('div[play-state="playing"]')?.querySelector('.viewer__fullscreen')?.click(); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment