Add [eqn] tags keybind.

This commit is contained in:
Nicolas Stepien 2013-03-12 14:57:46 +01:00
parent d789ec0f3e
commit 0f1d536f5f
4 changed files with 12 additions and 1 deletions

View File

@ -151,6 +151,7 @@
'Close': ['Esc', 'Close Settings, Notifications or QR.'], 'Close': ['Esc', 'Close Settings, Notifications or QR.'],
'Spoiler tags': ['Ctrl+s', 'Insert spoiler tags.'], 'Spoiler tags': ['Ctrl+s', 'Insert spoiler tags.'],
'Code tags': ['Alt+c', 'Insert code tags.'], 'Code tags': ['Alt+c', 'Insert code tags.'],
'Eqn tags': ['Alt+e', 'Insert egn tags.'],
'Math tags': ['Alt+m', 'Insert math tags.'], 'Math tags': ['Alt+m', 'Insert math tags.'],
'Submit QR': ['Alt+s', 'Submit post.'], 'Submit QR': ['Alt+s', 'Submit post.'],
'Watch': ['w', 'Watch thread.'], 'Watch': ['w', 'Watch thread.'],
@ -2861,6 +2862,12 @@
} }
Keybinds.tags('code', target); Keybinds.tags('code', target);
break; break;
case Conf['Eqn tags']:
if (target.nodeName !== 'TEXTAREA') {
return;
}
Keybinds.tags('eqn', target);
break;
case Conf['Math tags']: case Conf['Math tags']:
if (target.nodeName !== 'TEXTAREA') { if (target.nodeName !== 'TEXTAREA') {
return; return;

View File

@ -51,7 +51,7 @@ beta
Recursive Hiding will be automatically applied when manually hiding a post. Recursive Hiding will be automatically applied when manually hiding a post.
Added touch and multi-touch support for dragging windows. Added touch and multi-touch support for dragging windows.
Added [math] tags keybind. Added [eqn] and [math] tags keybind.
Fix Chrome's install warning saying that 4chan X would execute on all domains. Fix Chrome's install warning saying that 4chan X would execute on all domains.
Fix Quote Backlinks not affecting inlined quotes. Fix Quote Backlinks not affecting inlined quotes.
Fix Quote Highlighting not affecting inlined quotes. Fix Quote Highlighting not affecting inlined quotes.

View File

@ -139,6 +139,7 @@ Config =
'Close': ['Esc', 'Close Settings, Notifications or QR.'] 'Close': ['Esc', 'Close Settings, Notifications or QR.']
'Spoiler tags': ['Ctrl+s', 'Insert spoiler tags.'] 'Spoiler tags': ['Ctrl+s', 'Insert spoiler tags.']
'Code tags': ['Alt+c', 'Insert code tags.'] 'Code tags': ['Alt+c', 'Insert code tags.']
'Eqn tags': ['Alt+e', 'Insert egn tags.']
'Math tags': ['Alt+m', 'Insert math tags.'] 'Math tags': ['Alt+m', 'Insert math tags.']
'Submit QR': ['Alt+s', 'Submit post.'] 'Submit QR': ['Alt+s', 'Submit post.']
# Thread related # Thread related

View File

@ -1581,6 +1581,9 @@ Keybinds =
when Conf['Code tags'] when Conf['Code tags']
return if target.nodeName isnt 'TEXTAREA' return if target.nodeName isnt 'TEXTAREA'
Keybinds.tags 'code', target Keybinds.tags 'code', target
when Conf['Eqn tags']
return if target.nodeName isnt 'TEXTAREA'
Keybinds.tags 'eqn', target
when Conf['Math tags'] when Conf['Math tags']
return if target.nodeName isnt 'TEXTAREA' return if target.nodeName isnt 'TEXTAREA'
Keybinds.tags 'math', target Keybinds.tags 'math', target