mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
24 lines
835 B
JavaScript
24 lines
835 B
JavaScript
exports.Version = require("../package.json").version;
|
|
const fs = require("fs");
|
|
const electron = require("electron");
|
|
const userDataPath = (electron.app || electron.remote.app).getPath("userData");
|
|
const settingsFile= userDataPath + "/settings.json";
|
|
if (!fs.existsSync(settingsFile)) {
|
|
fs.writeFile(settingsFile, "{}", (err) => {
|
|
if (err) throw err;
|
|
});
|
|
console.log("Created settings.json file");
|
|
}
|
|
exports.Channel = require(settingsFile).channel;
|
|
exports.Titlebar = require(settingsFile).titlebar;
|
|
exports.addStyle = function(styleString) {
|
|
const style = document.createElement('style');
|
|
style.textContent = styleString;
|
|
document.head.append(style);
|
|
};
|
|
|
|
exports.addScript = function (scriptString) {
|
|
var script = document.createElement("script");
|
|
script.textContent = scriptString;
|
|
document.body.append(script);
|
|
};
|