-
Notifications
You must be signed in to change notification settings - Fork 27
/
fullscreenHotkey.uc.js
22 lines (21 loc) · 1.24 KB
/
fullscreenHotkey.uc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// ==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");
}
document
.getElementById("key_search2")
.setAttribute("modifiers", "accel,shift");
});