From 8797b4b6b2725769dd9ed98e7b13b653368e9ec1 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 13 Oct 2015 18:08:13 -0700 Subject: [PATCH] Add SJIS tag keybind. --- src/General/Config.coffee | 4 ++++ src/Miscellaneous/Keybinds.coffee | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 356432b76..a1dbd7f46 100755 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -818,6 +818,10 @@ Config = 'Alt+m' 'Insert math tags.' ] + 'SJIS tags': [ + 'Alt+a' + 'Insert SJIS tags.' + ] 'Toggle sage': [ 'Alt+s' 'Toggle sage in options field.' diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 9c686fd85..c9c4f2f1f 100755 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -71,6 +71,9 @@ Keybinds = when Conf['Math tags'] return unless target.nodeName is 'TEXTAREA' Keybinds.tags 'math', target + when Conf['SJIS tags'] + return unless target.nodeName is 'TEXTAREA' + Keybinds.tags 'sjis', target when Conf['Toggle sage'] return unless QR.nodes and !QR.nodes.el.hidden Keybinds.sage() @@ -243,6 +246,7 @@ Keybinds = when 'spoiler' then !!$ '.postForm input[name=spoiler]' when 'code' then g.BOARD.ID is 'g' when 'math', 'eqn' then g.BOARD.ID is 'sci' + when 'sjis' then g.BOARD.ID is 'jp' new Notice 'warning', "[#{tag}] tags are not supported on /#{g.BOARD}/.", 20 unless supported value = ta.value