freechat/freechat-client/preload.js
shockrah 09f27dd554 ! More restructuring changes
The client is basically gonna get served from a localhost server via electron. It's a little weird but it has to do for now, also fuck mobile
2020-12-06 14:45:06 -08:00

16 lines
515 B
JavaScript

// Doing this since the projcet this base work is based off uses the same thing
// Kinda looks like something to do with compatibility so I'll keep this here
// until I know if its _actually_ required
window.addEventListener('DOMContentLoaded', () => {
const replaceText = function (selector, text) {
const element = document.getElementById(selector);
if(element) { element.innerText = text; }
}
for(const type of ['chrome', 'node', 'electron']) {
replaceText(`${type}`, process.versions[type]);
}
});