Keyboard Actions -> Keybinds

This commit is contained in:
James Campos 2010-11-18 21:05:01 -08:00
parent 822f7c3327
commit 5ace92792e
2 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@ config =
'Reply Hiding': [true, 'Hide single replies'] 'Reply Hiding': [true, 'Hide single replies']
'Show Stubs': [true, 'Of hidden threads / replies'] 'Show Stubs': [true, 'Of hidden threads / replies']
'Thread Navigation': [true, 'Navigate to previous / next thread'] 'Thread Navigation': [true, 'Navigate to previous / next thread']
'Keyboard Actions': [true, 'Perform actions with your keyboard'] 'Keybinds': [true, 'Binds actions to keys']
'Reply Navigation': [true, 'Navigate to the beginning / end of a thread'] 'Reply Navigation': [true, 'Navigate to the beginning / end of a thread']
'Thread Watcher': [true, 'Bookmark threads'] 'Thread Watcher': [true, 'Bookmark threads']
'Thread Expansion': [true, 'View all replies'] 'Thread Expansion': [true, 'View all replies']
@ -439,7 +439,7 @@ keydown = (e) ->
g.keyCode = kc g.keyCode = kc
keyActAdd = -> keyActAdd = ->
if getConfig 'Keyboard Actions' if getConfig 'Keybinds'
d.addEventListener 'keydown', keydown, true d.addEventListener 'keydown', keydown, true
d.addEventListener 'keypress', keypress, true d.addEventListener 'keypress', keypress, true
@ -552,7 +552,7 @@ quickReply = (e) ->
m clone, m clone,
listener: ['submit', formSubmit] listener: ['submit', formSubmit]
target: 'iframe' target: 'iframe'
if getConfig 'Keyboard Actions' if getConfig 'Keybinds'
inputs = $$ 'input[type=text], textarea', clone inputs = $$ 'input[type=text], textarea', clone
for input in inputs for input in inputs
input.addEventListener 'focus', keyActRem, true input.addEventListener 'focus', keyActRem, true
@ -961,7 +961,7 @@ if getConfig 'Reply Navigation'
addTo span, tn(' '), up, tn(' '), down addTo span, tn(' '), up, tn(' '), down
inAfter el, span inAfter el, span
if getConfig 'Keyboard Actions' if getConfig 'Keybinds'
form = $ 'div.postarea > form' form = $ 'div.postarea > form'
inputs = $$ 'input[type=text], textarea', form inputs = $$ 'input[type=text], textarea', form
for input in inputs for input in inputs

View File

@ -6,7 +6,7 @@
'Reply Hiding': [true, 'Hide single replies'], 'Reply Hiding': [true, 'Hide single replies'],
'Show Stubs': [true, 'Of hidden threads / replies'], 'Show Stubs': [true, 'Of hidden threads / replies'],
'Thread Navigation': [true, 'Navigate to previous / next thread'], 'Thread Navigation': [true, 'Navigate to previous / next thread'],
'Keyboard Actions': [true, 'Perform actions with your keyboard'], 'Keybinds': [true, 'Binds actions to keys'],
'Reply Navigation': [true, 'Navigate to the beginning / end of a thread'], 'Reply Navigation': [true, 'Navigate to the beginning / end of a thread'],
'Thread Watcher': [true, 'Bookmark threads'], 'Thread Watcher': [true, 'Bookmark threads'],
'Thread Expansion': [true, 'View all replies'], 'Thread Expansion': [true, 'View all replies'],
@ -554,7 +554,7 @@
} }
}; };
keyActAdd = function() { keyActAdd = function() {
if (getConfig('Keyboard Actions')) { if (getConfig('Keybinds')) {
d.addEventListener('keydown', keydown, true); d.addEventListener('keydown', keydown, true);
return d.addEventListener('keypress', keypress, true); return d.addEventListener('keypress', keypress, true);
} }
@ -714,7 +714,7 @@
listener: ['submit', formSubmit], listener: ['submit', formSubmit],
target: 'iframe' target: 'iframe'
}); });
if (getConfig('Keyboard Actions')) { if (getConfig('Keybinds')) {
inputs = $$('input[type=text], textarea', clone); inputs = $$('input[type=text], textarea', clone);
_ref = inputs; _ref = inputs;
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
@ -1243,7 +1243,7 @@
return _result; return _result;
}); });
} }
if (getConfig('Keyboard Actions')) { if (getConfig('Keybinds')) {
form = $('div.postarea > form'); form = $('div.postarea > form');
inputs = $$('input[type=text], textarea', form); inputs = $$('input[type=text], textarea', form);
_ref = inputs; _ref = inputs;