-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathfullscreenHotkey.uc.js
More file actions
23 lines (22 loc) · 1.32 KB
/
fullscreenHotkey.uc.js
File metadata and controls
23 lines (22 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// ==UserScript==
// @name Fullscreen Hotkey
// @version 1.2.0
// @author aminomancer
// @homepageURL https://github.com/aminomancer
// @description All this does is remap the fullscreen shortcut from F11 to Ctrl+E, since I already use F11 for other stuff.
// @downloadURL https://cdn.jsdelivr.net/gh/aminomancer/uc.css.js@master/JS/fullscreenHotkey.uc.js
// @updateURL https://cdn.jsdelivr.net/gh/aminomancer/uc.css.js@master/JS/fullscreenHotkey.uc.js
// @license This Source Code Form is subject to the terms of the Creative Commons Attribution-NonCommercial-ShareAlike International License, v. 4.0. If a copy of the CC BY-NC-SA 4.0 was not distributed with this file, You can obtain one at http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
// ==/UserScript==
SessionStore.promiseInitialized.then(() => {
for (let keyId of ["key_enterFullScreen", "key_exitFullScreen"]) {
let key = document.getElementById(keyId);
key.removeAttribute("keycode");
key.setAttribute("key", "E");
key.setAttribute("modifiers", "accel");
}
let keySearchAlt = document.getElementById("key_search2");
if (keySearchAlt?.getAttribute("key") === "E") {
keySearchAlt.setAttribute("modifiers", "accel,shift");
}
});