Skip to content

Instantly share code, notes, and snippets.

@tientq64
Last active May 24, 2024 09:51
Show Gist options
  • Save tientq64/5b0c6fe94840f0ba7c1ccb22684bdfea to your computer and use it in GitHub Desktop.
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.
// ==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