From 2b80fe699de1bed70b54f81ddc7c7b63f277832b Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 23 Jul 2011 22:48:22 -0700 Subject: [PATCH] conf keybinds cleanup --- 4chan_x.user.js | 6 +++--- script.coffee | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index a76658ddf..688abe813 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1077,7 +1077,7 @@ _ref4 = $$('#keybinds input', dialog); for (_k = 0, _len3 = _ref4.length; _k < _len3; _k++) { input = _ref4[_k]; - input.value = $.getValue("key/" + input.name, config.hotkeys[input.name]); + input.value = conf[input.name]; $.bind(input, 'keydown', options.keybind); } /* @@ -1129,8 +1129,8 @@ } } this.value = key; - $.setValue("key/" + this.name, key); - return keybinds[this.name] = key; + $.setValue(this.name, key); + return conf[this.name] = key; } }, time: function(e) { diff --git a/script.coffee b/script.coffee index 4222d5fc3..f910991dc 100644 --- a/script.coffee +++ b/script.coffee @@ -848,7 +848,7 @@ options = $.bind $('textarea[name=flavors]', dialog), 'change', $.cb.value $.bind $('input[name=time]', dialog), 'keyup', options.time for input in $$ '#keybinds input', dialog - input.value = $.getValue "key/#{input.name}", config.hotkeys[input.name] + input.value = conf[input.name] $.bind input, 'keydown', options.keybind ### @@ -890,8 +890,8 @@ options = key = 'alt+' + key if e.altKey key = 'ctrl+' + key if e.ctrlKey @value = key - $.setValue "key/#{@name}", key - keybinds[@name] = key + $.setValue @name, key + conf[@name] = key time: (e) -> $.setValue 'time', @value Time.foo()