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("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);
{
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());
prefs.setBoolean("enableAutoAbbreviations", true);
if (fields.snippetBehavior.value() == "auto")
prefs.deletePref("autoAbbreviationTriggerCharacters");
else
prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
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());
prefs.setBoolean("enableAutoAbbreviations", true);
if (fields.snippetBehavior.value() == "auto")
prefs.deletePref("autoAbbreviationTriggerCharacters");
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());
prefs.setBoolean("enableAutoAbbreviations", true);
if (fields.snippetBehavior.value() == "auto")
prefs.deletePref("autoAbbreviationTriggerCharacters");
else
prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
return true;
};
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());
prefs.setBoolean("enableAutoAbbreviations", true);
if (fields.snippetBehavior.value() == "auto")
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());
prefs.setBoolean("enableAutoAbbreviations", true);
if (fields.snippetBehavior.value() == "auto")
prefs.deletePref("autoAbbreviationTriggerCharacters");
else
prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
return true;
};
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());
prefs.setBoolean("enableAutoAbbreviations", true);
if (fields.snippetBehavior.value() == "auto")
prefs.deletePref("autoAbbreviationTriggerCharacters");
else
prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
return true;
};
panel.find('button[label="Ok"]').on("command", () =>
{
if (selectedScheme.writeable)
this.saveScheme();
var applyEditor = !! panel.find('checkbox[name="editor"]').attr("checked");
var applyInterface = !! panel.find('checkbox[name="interface"]').attr("checked");
var applyEditorWidgets = !! panel.find('checkbox[name="editor-widgets"]').attr("checked");
prefs.setBoolean("cached.colorscheme-editor.apply.editor", applyEditor);
prefs.setBoolean("cached.colorscheme-editor.apply.interface", applyInterface);
prefs.setBoolean("cached.colorscheme-editor.apply.editorwidgets", applyEditorWidgets);
if (applyEditor)
require("ko/colorscheme").applyEditor(selectedScheme.name);
if (applyInterface)
require("ko/colorscheme").applyInterface(selectedScheme.name);
if (applyEditorWidgets)
require("ko/colorscheme").applyWidgets(selectedScheme.name);
panel.element().hidePopup();
panel.remove();
});
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());
prefs.setBoolean("enableAutoAbbreviations", true);
if (fields.snippetBehavior.value() == "auto")
prefs.deletePref("autoAbbreviationTriggerCharacters");
else
prefs.setString("autoAbbreviationTriggerCharacters", "\\t");
return true;
};
panel.find('button[label="Ok"]').on("command", () =>
{
if (selectedScheme.writeable)
this.saveScheme();
var applyEditor = !! panel.find('checkbox[name="editor"]').attr("checked");
var applyInterface = !! panel.find('checkbox[name="interface"]').attr("checked");
var applyEditorWidgets = !! panel.find('checkbox[name="editor-widgets"]').attr("checked");
prefs.setBoolean("cached.colorscheme-editor.apply.editor", applyEditor);
prefs.setBoolean("cached.colorscheme-editor.apply.interface", applyInterface);
prefs.setBoolean("cached.colorscheme-editor.apply.editorwidgets", applyEditorWidgets);
if (applyEditor)
require("ko/colorscheme").applyEditor(selectedScheme.name);
if (applyInterface)
require("ko/colorscheme").applyInterface(selectedScheme.name);
if (applyEditorWidgets)
require("ko/colorscheme").applyWidgets(selectedScheme.name);
panel.element().hidePopup();
panel.remove();
});