diff --git a/4chan_x.user.js b/4chan_x.user.js index 3480c75d3..78f7cfc1a 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -151,6 +151,7 @@ 'Close': ['Esc', 'Close Settings, Notifications or QR.'], 'Spoiler tags': ['Ctrl+s', 'Insert spoiler tags.'], 'Code tags': ['Alt+c', 'Insert code tags.'], + 'Eqn tags': ['Alt+e', 'Insert egn tags.'], 'Math tags': ['Alt+m', 'Insert math tags.'], 'Submit QR': ['Alt+s', 'Submit post.'], 'Watch': ['w', 'Watch thread.'], @@ -2861,6 +2862,12 @@ } Keybinds.tags('code', target); break; + case Conf['Eqn tags']: + if (target.nodeName !== 'TEXTAREA') { + return; + } + Keybinds.tags('eqn', target); + break; case Conf['Math tags']: if (target.nodeName !== 'TEXTAREA') { return; diff --git a/changelog b/changelog index 88d3cfd4b..d48346d41 100644 --- a/changelog +++ b/changelog @@ -51,7 +51,7 @@ beta Recursive Hiding will be automatically applied when manually hiding a post. 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 Quote Backlinks not affecting inlined quotes. Fix Quote Highlighting not affecting inlined quotes. diff --git a/src/config.coffee b/src/config.coffee index 62060df04..89f28624b 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -139,6 +139,7 @@ Config = 'Close': ['Esc', 'Close Settings, Notifications or QR.'] 'Spoiler tags': ['Ctrl+s', 'Insert spoiler tags.'] 'Code tags': ['Alt+c', 'Insert code tags.'] + 'Eqn tags': ['Alt+e', 'Insert egn tags.'] 'Math tags': ['Alt+m', 'Insert math tags.'] 'Submit QR': ['Alt+s', 'Submit post.'] # Thread related diff --git a/src/features.coffee b/src/features.coffee index 29835be07..44be60db8 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -1581,6 +1581,9 @@ Keybinds = when Conf['Code tags'] return if target.nodeName isnt 'TEXTAREA' Keybinds.tags 'code', target + when Conf['Eqn tags'] + return if target.nodeName isnt 'TEXTAREA' + Keybinds.tags 'eqn', target when Conf['Math tags'] return if target.nodeName isnt 'TEXTAREA' Keybinds.tags 'math', target