Skip to content

Instantly share code, notes, and snippets.

@ivanmem
Last active May 6, 2023 11:14
Show Gist options
  • Save ivanmem/5f9af0b0df01e1965515353d5520eb4d to your computer and use it in GitHub Desktop.
Save ivanmem/5f9af0b0df01e1965515353d5520eb4d to your computer and use it in GitHub Desktop.
// ==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