Last active
May 24, 2024 09:51
-
-
Save tientq64/5b0c6fe94840f0ba7c1ccb22684bdfea to your computer and use it in GitHub Desktop.
Real fullscreen instead of fullscreen dropdown, very annoying when playing games. Useful for Microsoft Edge. Press Shift+F11 to toggle fullscreen.
This file contains hidden or 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 No Fullscreen Dropdown | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1.0 | |
// @description Real fullscreen instead of fullscreen dropdown, very annoying when playing games. Useful for Microsoft Edge. Press Shift+F11 to toggle fullscreen. | |
// @author https://github.com/tientq64 | |
// @match https://* | |
// @license MIT | |
// @grant none | |
// ==/UserScript== | |
window.addEventListener('keydown', (event) => { | |
if (event.repeat) return | |
if (event.shiftKey && event.key === 'F11') { | |
if (document.fullscreenElement) { | |
document.exitFullscreen() | |
} else { | |
document.body.requestFullscreen() | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment