Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let generateDefaultSettings = () => {
settings.set('sampleRate', 1140000);
settings.set('stereo', true);
settings.set('lastTuned', true);
settings.set('localPlayer', true);
settings.set('serverPort', 1337);
settings.set('lastFrequency', '93200000');
settings.set('ppm',0);
settings.set('recordingsPath', app.getPath('music'));
//var R4.set('name','BBC R4').set('freq',91000000)
//console.log(settings.get('presets').length);
settings = settings.set('offsetTuning', true);
};
function setPreferences() {
document.getElementById("restartDiv").style.visibility = "visible";
settings.set("militaryTime", (document.getElementById("timeType").checked).toString());
settings.set("defaultTime", document.getElementById("defaultTime").value);
settings.set("closeOnX", (document.getElementById("closeOnXcheck").checked).toString());
settings.set("lagHours", document.getElementById("lagHours").value);
settings.set("lagMinutes", document.getElementById("lagMinutes").value);
settings.set("upTimeHours", document.getElementById("upTimeHours").value);
settings.set("upTimeMinutes", document.getElementById("upTimeMinutes").value);
settings.set("upTime", (document.getElementById("upTime").checked).toString());
var tempstring = settings.get("closeOnX") + " Sandman";
writeFile(tempstring);
return;
//console.log(settings.getAll());
}
function set(key, value) {
if(activeInstance) {
settings.set(key, value);
} else {
memorySettings[key] = value;
}
}
export function set(key: settingKeys, value: any): Promise {
if (isDev) {
DEV_CONFIG[key] = value;
return Promise.resolve()
}
return settings.set(key, value)
}
settings.get('steam_api_key').then(val => {
if (val === undefined) {
steamApiKey = key;
steamUser = new SteamApi.User(key);
}
settings.set('steam_api_key', key);
Materialize.toast('Steam API key saved!', 5000, 'rounded');
getHeroesList();
});
});
update: (address) => {
addresses[address.infoHash] = address
settings.set('addressbook', addresses)
},
updateList: (addressList) => {
function unsubscribe(host, titlekey) {
let key_path = "comic." + host + "." + titlekey;
let comicData = settings.get(key_path);
if (comicData) {
comicData.subscribed = false;
settings.set(key_path, comicData);
updateSubscribeUIStatus();
}
}
setSettings (notifications, tray, kiosk, toolbar, icon, c_user, c_password) {
settings.set('notifications', notifications)
settings.set('tray', tray)
settings.set('kiosk', kiosk)
settings.set('toolbar_always', toolbar)
settings.set('icon', icon)
settings.set('c_user', c_user)
settings.set('c_password', c_password)
}
setSettings (notifications, tray, kiosk, toolbar, icon, c_user, c_password) {
settings.set('notifications', notifications)
settings.set('tray', tray)
settings.set('kiosk', kiosk)
settings.set('toolbar_always', toolbar)
settings.set('icon', icon)
settings.set('c_user', c_user)
settings.set('c_password', c_password)
}