mirror of
https://github.com/mue/mue.git
synced 2026-07-10 14:04:32 +02:00
28 lines
597 B
JavaScript
28 lines
597 B
JavaScript
// todo: add more
|
|
export default function ExperimentalInit() {
|
|
if (localStorage.getItem('debug') === 'true') {
|
|
document.onkeydown = (e) => {
|
|
e = e || window.event;
|
|
if (!e.ctrlKey) {
|
|
return;
|
|
}
|
|
let code = e.which || e.keyCode;
|
|
|
|
switch (code) {
|
|
case 222:
|
|
const timeout = localStorage.getItem('debugtimeout');
|
|
|
|
if (timeout !== '0') {
|
|
setTimeout(() => {
|
|
debugger;
|
|
}, timeout);
|
|
} else {
|
|
debugger;
|
|
}
|
|
break;
|
|
default: break;
|
|
}
|
|
};
|
|
}
|
|
}
|