Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.onFinish = () =>
{
var koCS = require("ko/colorscheme");
prefs.setString("widget-scheme", fields.colorScheme.value());
koCS.applyEditor(fields.colorScheme.value());
koCS.applyInterface(fields.colorScheme.value(), true);
prefs.setString("keybinding-scheme", fields.keybinding.value());
prefs.setString("selectedbrowser", fields.browser.value());
prefs.setBoolean("ui.classic.mode", fields.classicMode.checked());
prefs.setBoolean("ui.classic.toolbar", fields.classicMode.checked());
prefs.setBoolean("ui.classic.statusbar", fields.classicMode.checked());
prefs.setBoolean("ui.hide.chrome", ! fields.nativeBorders.checked());
prefs.setBoolean("editShowMinimap", fields.minimap.checked());
prefs.setBoolean("useTabs", fields.taborspace.checked());
prefs.setLong("editWrapType", fields.wrapping.checked() ? 2 : 0);
prefs.setBoolean("editSmartWrapSelection", fields.autoDelimiters.checked());
prefs.setBoolean("codeintel_completion_auto_fillups_enabled", fields.autofill.checked());
prefs.setBoolean("showLineNumbers", fields.showLineNumbers.checked());
prefs.setBoolean("useTabs", fields.taborspace.checked());
prefs.setLong("editWrapType", fields.wrapping.checked() ? 2 : 0);
prefs.setBoolean("editSmartWrapSelection", fields.autoDelimiters.checked());
prefs.setBoolean("codeintel_completion_auto_fillups_enabled", fields.autofill.checked());
prefs.setBoolean("showLineNumbers", fields.showLineNumbers.checked());
prefs.setBoolean("codeintelAutoInsertEndTag", fields.softchars.checked());
prefs.setBoolean("editSmartSoftCharacters", fields.softchars.checked());
prefs.setLong("tabWidth", fields.indentWidth.value());
prefs.setLong("indentWidth", fields.indentWidth.value());
prefs.setBoolean("analytics_enabled", fields.analytics.checked());
prefs.setBoolean("enableAutoAbbreviations", true);
if (fields.snippetBehavior.value() == "auto")
prefs.deletePref("autoAbbreviationTriggerCharacters");
else
prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
return true;
};
function setHistory(history) {
var prefs = require("ko/prefs");
prefs.setString("console_history", JSON.stringify(history));
}
this.onFinish = () =>
{
var koCS = require("ko/colorscheme");
prefs.setString("widget-scheme", fields.colorScheme.value());
koCS.applyEditor(fields.colorScheme.value());
koCS.applyInterface(fields.colorScheme.value(), true);
prefs.setString("keybinding-scheme", fields.keybinding.value());
prefs.setString("selectedbrowser", fields.browser.value());
prefs.setBoolean("ui.classic.mode", fields.classicMode.checked());
prefs.setBoolean("ui.classic.toolbar", fields.classicMode.checked());
prefs.setBoolean("ui.classic.statusbar", fields.classicMode.checked());
prefs.setBoolean("ui.hide.chrome", ! fields.nativeBorders.checked());
prefs.setBoolean("editShowMinimap", fields.minimap.checked());
prefs.setBoolean("useTabs", fields.taborspace.checked());
prefs.setLong("editWrapType", fields.wrapping.checked() ? 2 : 0);
prefs.setBoolean("editSmartWrapSelection", fields.autoDelimiters.checked());
prefs.setBoolean("codeintel_completion_auto_fillups_enabled", fields.autofill.checked());
prefs.setBoolean("showLineNumbers", fields.showLineNumbers.checked());
prefs.setBoolean("codeintelAutoInsertEndTag", fields.softchars.checked());
prefs.setBoolean("editSmartSoftCharacters", fields.softchars.checked());
prefs.setLong("tabWidth", fields.indentWidth.value());
prefs.setLong("indentWidth", fields.indentWidth.value());
prefs.setBoolean("analytics_enabled", fields.analytics.checked());
this.applyEditor = (name) =>
{
prefs.setString("editor-scheme", name);
var observerSvc = Cc["@mozilla.org/observer-service;1"].
getService(Ci.nsIObserverService);
observerSvc.notifyObservers(null, 'scheme-changed', name);
}
this.applyInterface = (name, noDelay = false) =>
{
prefs.setString("interface-scheme", name);
var timers = require("sdk/timers");
timers.clearTimeout(_applyInterface.timer);
if (noDelay)
_applyInterface();
else
_applyInterface.timer = timers.setTimeout(_applyInterface, 50);
}
this.populatePropertiesList();
prefs.deletePref(p);
}
else if (language == -2)
{
selectedLanguage = language;
this.loadSample();
this.populateInterfacePropertiesList();
prefs.deletePref(p);
}
else
{
selectedLanguage = language;
this.loadSample();
this.populateLanguagePropertiesList();
prefs.setString(p, language);
}
};
this.onFinish = () =>
{
var koCS = require("ko/colorscheme");
prefs.setString("widget-scheme", fields.colorScheme.value());
koCS.applyEditor(fields.colorScheme.value());
koCS.applyInterface(fields.colorScheme.value(), true);
prefs.setString("keybinding-scheme", fields.keybinding.value());
prefs.setString("selectedbrowser", fields.browser.value());
prefs.setBoolean("ui.classic.mode", fields.classicMode.checked());
prefs.setBoolean("ui.classic.toolbar", fields.classicMode.checked());
prefs.setBoolean("ui.classic.statusbar", fields.classicMode.checked());
prefs.setBoolean("ui.hide.chrome", ! fields.nativeBorders.checked());
prefs.setBoolean("editShowMinimap", fields.minimap.checked());
prefs.setBoolean("useTabs", fields.taborspace.checked());
prefs.setLong("editWrapType", fields.wrapping.checked() ? 2 : 0);
prefs.setBoolean("editSmartWrapSelection", fields.autoDelimiters.checked());
prefs.setBoolean("codeintel_completion_auto_fillups_enabled", fields.autofill.checked());
prefs.setBoolean("showLineNumbers", fields.showLineNumbers.checked());
prefs.setBoolean("codeintelAutoInsertEndTag", fields.softchars.checked());
prefs.setBoolean("editSmartSoftCharacters", fields.softchars.checked());
prefs.setLong("tabWidth", fields.indentWidth.value());
prefs.setLong("indentWidth", fields.indentWidth.value());
prefs.setBoolean("analytics_enabled", fields.analytics.checked());
this.applyWidgets = (name, noDelay = false) =>
{
prefs.setString("widget-scheme", name);
var timers = require("sdk/timers");
timers.clearTimeout(_applyInterface.timer);
if (noDelay)
_applyInterface();
else
_applyInterface.timer = timers.setTimeout(_applyInterface, 50);
}
this._savePinnedObject = () => {
require('ko/prefs').setString('komodo_terminal_pinned_tabs', JSON.stringify(pinned));
};