Add SJIS tag keybind.

This commit is contained in:
ccd0 2015-10-13 18:08:13 -07:00
parent 1693380891
commit 8797b4b6b2
2 changed files with 8 additions and 0 deletions

View File

@ -818,6 +818,10 @@ Config =
'Alt+m' 'Alt+m'
'Insert math tags.' 'Insert math tags.'
] ]
'SJIS tags': [
'Alt+a'
'Insert SJIS tags.'
]
'Toggle sage': [ 'Toggle sage': [
'Alt+s' 'Alt+s'
'Toggle sage in options field.' 'Toggle sage in options field.'

View File

@ -71,6 +71,9 @@ Keybinds =
when Conf['Math tags'] when Conf['Math tags']
return unless target.nodeName is 'TEXTAREA' return unless target.nodeName is 'TEXTAREA'
Keybinds.tags 'math', target Keybinds.tags 'math', target
when Conf['SJIS tags']
return unless target.nodeName is 'TEXTAREA'
Keybinds.tags 'sjis', target
when Conf['Toggle sage'] when Conf['Toggle sage']
return unless QR.nodes and !QR.nodes.el.hidden return unless QR.nodes and !QR.nodes.el.hidden
Keybinds.sage() Keybinds.sage()
@ -243,6 +246,7 @@ Keybinds =
when 'spoiler' then !!$ '.postForm input[name=spoiler]' when 'spoiler' then !!$ '.postForm input[name=spoiler]'
when 'code' then g.BOARD.ID is 'g' when 'code' then g.BOARD.ID is 'g'
when 'math', 'eqn' then g.BOARD.ID is 'sci' 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 new Notice 'warning', "[#{tag}] tags are not supported on /#{g.BOARD}/.", 20 unless supported
value = ta.value value = ta.value