[MainWindow] Remove GM setting (obsolete / unneeded)

This commit is contained in:
Ducko 2022-03-09 22:24:15 +00:00
parent da406d0fe0
commit ca60ef7ac5
2 changed files with 1 additions and 35 deletions

6
src/bootstrap.js vendored
View file

@ -62,16 +62,12 @@ const startCore = () => {
donePageReady = true;
}
const cmdSwitches = require('./cmdSwitches');
let injectJs = readFileSync(join(__dirname, 'mainWindowInject.js'), 'utf8');
const [ version1, version2 ] = oaVersion.split('-'); // Split via -
injectJs = injectJs
.replaceAll('<oa_version_channel>', version1[0].toUpperCase() + version1.substring(1).toLowerCase())
.replaceAll('<oa_version_hash>', version2 || 'custom')
.replaceAll('<oa_cmd_preset>', cmdSwitches.preset)
.replaceAll('<oa_cmd_full>', cmdSwitches.cmd);
.replaceAll('<oa_version_hash>', version2 || 'custom');
bw.webContents.executeJavaScript(injectJs);
});

View file

@ -46,34 +46,4 @@ el.appendChild(document.createTextNode(css));
document.body.appendChild(el);
const injectGMSettings = async () => {
const sleep = (ms) => new Promise((res) => setTimeout(res, ms));
await sleep(3000);
if (!window.goosemod) return;
goosemod.settings.items.unshift(
['item', 'OpenAsar', ['',
{
type: 'header',
text: 'Info'
},
{
type: 'text',
text: 'Version',
subtext: 'Channel: <oa_version_channel>\nHash: <oa_version_hash>'
},
{
type: 'text',
text: 'Cmd',
subtext: 'Preset: <oa_cmd_preset>\nCmd: <oa_cmd_full>'
}
], undefined, false],
['separator']
)
};
injectGMSettings();
window.openasar = {};