[MainWindow] Clean up injection source
This commit is contained in:
parent
0c8033616a
commit
4e21350ca3
2 changed files with 7 additions and 8 deletions
13
src/bootstrap.js
vendored
13
src/bootstrap.js
vendored
|
@ -62,14 +62,13 @@ const startCore = () => {
|
|||
donePageReady = true;
|
||||
}
|
||||
|
||||
let injectJs = readFileSync(join(__dirname, 'mainWindowInject.js'), 'utf8');
|
||||
const [ channel, hash ] = oaVersion.split('-'); // Split via -
|
||||
|
||||
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');
|
||||
|
||||
bw.webContents.executeJavaScript(injectJs);
|
||||
bw.webContents.executeJavaScript(
|
||||
readFileSync(join(__dirname, 'mainWindowInject.js'), 'utf8')
|
||||
.replaceAll('<channel>', channel)
|
||||
.replaceAll('<hash>', hash || 'custom')
|
||||
);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
@ -26,7 +26,7 @@ setInterval(() => {
|
|||
|
||||
const css = `
|
||||
[class^="socialLinks-"] + [class^="info-"] [class^="colorMuted-"]:nth-last-child(2)::after {
|
||||
content: " | OpenAsar <oa_version_hash>";
|
||||
content: " | OpenAsar <hash>";
|
||||
display: inline;
|
||||
text-transform: none;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue