Skip to content

Instantly share code, notes, and snippets.

@raidan00
Last active September 26, 2023 20:57
Show Gist options
  • Save raidan00/fe87ef7b5fec537e7738ffa13503893d to your computer and use it in GitHub Desktop.
Save raidan00/fe87ef7b5fec537e7738ffa13503893d to your computer and use it in GitHub Desktop.
// ==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