37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
|
// ==UserScript==
|
||
|
// @name FoundryVTT Helpers
|
||
|
// @namespace https://bullercodeworks.com
|
||
|
// @version 0.1
|
||
|
// @description Some convenience that should probably be modules, but... ¯\_(ツ)_/¯
|
||
|
// @author brian@bullercodeworks.com
|
||
|
// @match https://rpg.br0xen.com/game
|
||
|
// @icon https://www.google.com/s2/favicons?domain=rpg.br0xen.com
|
||
|
// @grant none
|
||
|
// ==/UserScript==
|
||
|
|
||
|
(function() {
|
||
|
'use strict';
|
||
|
|
||
|
document.addEventListener('keyup',(e)=>{
|
||
|
if(e.ctrlKey) {
|
||
|
// Hotbar Hotkeys
|
||
|
switch(e.code){
|
||
|
case 'Digit1':
|
||
|
window.ui.hotbar.changePage(1)
|
||
|
break;
|
||
|
case 'Digit2':
|
||
|
window.ui.hotbar.changePage(2)
|
||
|
break;
|
||
|
case 'Digit3':
|
||
|
window.ui.hotbar.changePage(3)
|
||
|
break;
|
||
|
case 'Digit4':
|
||
|
window.ui.hotbar.changePage(4)
|
||
|
break;
|
||
|
case 'Digit5':
|
||
|
window.ui.hotbar.changePage(5)
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
})();
|