mirror of
https://github.com/mue/mue.git
synced 2026-06-13 03:58:49 +02:00
fix: custom js, reminder on reset button etc
This commit is contained in:
@@ -3,10 +3,12 @@ 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;
|
||||
|
||||
const code = e.which || e.keyCode;
|
||||
|
||||
switch (code) {
|
||||
case 222:
|
||||
|
||||
@@ -83,7 +83,7 @@ export default class MarketplaceFunctions {
|
||||
break;
|
||||
}
|
||||
|
||||
let installed = JSON.parse(localStorage.getItem('installed'));
|
||||
const installed = JSON.parse(localStorage.getItem('installed'));
|
||||
|
||||
if (sideload) {
|
||||
installed.push({
|
||||
|
||||
@@ -104,11 +104,6 @@ export default class SettingsFunctions {
|
||||
document.head.insertAdjacentHTML('beforeend', '<style id="customcss">' + css + '</style>');
|
||||
}
|
||||
|
||||
const js = localStorage.getItem('customjs');
|
||||
if (js) {
|
||||
document.head.insertAdjacentHTML('beforeend', '<script id="customjs">' + js + '</script>');
|
||||
}
|
||||
|
||||
const font = localStorage.getItem('font');
|
||||
if (font) {
|
||||
const google = localStorage.getItem('fontGoogle');
|
||||
@@ -147,6 +142,12 @@ export default class SettingsFunctions {
|
||||
return;
|
||||
}
|
||||
|
||||
const js = localStorage.getItem('customjs');
|
||||
if (js) {
|
||||
// eslint-disable-next-line no-eval
|
||||
eval(js);
|
||||
}
|
||||
|
||||
if (localStorage.getItem('experimental') === 'true') {
|
||||
experimentalInit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user