Last active
September 26, 2023 20:57
-
-
Save raidan00/fe87ef7b5fec537e7738ffa13503893d to your computer and use it in GitHub Desktop.
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 StarBreak: Super Macorn | |
// @namespace http://ryara.net/ | |
// @version 0.1 | |
// @author tobbez | |
// @match http*://www.starbreak.com/* | |
// @grant none | |
// @downloadURL https://gist.github.com/tobbez/f28a7abbdd956c3b783c/raw/starbreak-quick-swap.user.js | |
// @updateURL https://gist.github.com/tobbez/f28a7abbdd956c3b783c/raw/starbreak-quick-swap.user.js | |
// ==/UserScript== | |
var pd = function dummyPreventDefault() {}; | |
function onLoaded(){ | |
(function (orig) { | |
XDL.onKey = function(e) { | |
if(!XDL.textInputActive){ | |
if(e.keyCode == 65 || e.keyCode == 83 || e.keyCode == 16 || e.keyCode == 35){ | |
var ev = { type:'keyup', keyCode:67, preventDefault: pd }; | |
orig(ev); | |
} | |
} | |
orig.apply(null, arguments); | |
}; | |
})(XDL.onKey); | |
} | |
function waitUntilLoaded () { | |
if (typeof XDL == 'undefined') { | |
setTimeout(waitUntilLoaded, 0); | |
return; | |
} | |
onLoaded(); | |
} | |
waitUntilLoaded(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment