Commit 28207ce6 authored by ThorbenQuast's avatar ThorbenQuast
Browse files

editor: make a "cookie" preference to have the user decide if he allows for cookies

to save the last commands
parent 849d8d42
......@@ -76,6 +76,9 @@ var CommandLine = Emitter.extend({
saveToCookie: function(cmd) {
//make sure the user allows for cookies
if (!this.view.getPreference("cookies"))
var key = this.getCookieKey();
this.commandCookie[key] = cmd;
$.cookie("commands", JSON.stringify(this.commandCookie));
......@@ -87,10 +87,16 @@ var getDefaultCodeEditorPreferences = function() {
//history commands
commandHistory: {
description: "The total number of stored commands.",
description: "The total number of stored commands in a session.",
type: "integer",
value: 3,
range: [1, 10, 1]
cookies: {
description: "Allow the web-browser to store the last executed command.",
type: "boolean",
value: true
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment