Add command+click as an alternative to ctrl+click on OS X (#162).
This commit is contained in:
parent
5a6ac68548
commit
747c76e08a
@ -71,7 +71,7 @@ Config =
|
||||
]
|
||||
'Custom Board Titles': [
|
||||
true
|
||||
'Allow editing of the board title and subtitle by ctrl+clicking them'
|
||||
'Allow editing of the board title and subtitle by ctrl/\u2318+clicking them.'
|
||||
]
|
||||
'Persistent Custom Board Titles': [
|
||||
false
|
||||
|
||||
@ -21,7 +21,7 @@ Banner =
|
||||
continue
|
||||
|
||||
if Conf['Custom Board Titles']
|
||||
Banner.custom(child).title = "Ctrl+click to edit board #{if i is 3
|
||||
Banner.custom(child).title = "Ctrl/\u2318+click to edit board #{if i is 3
|
||||
'sub'
|
||||
else
|
||||
''}title"
|
||||
@ -45,7 +45,7 @@ Banner =
|
||||
$('img', @parentNode).src = "//s.4cdn.org/image/title/#{banner}"
|
||||
|
||||
click: (e) ->
|
||||
if e.ctrlKey
|
||||
if e.ctrlKey or e.metaKey
|
||||
@contentEditable = true
|
||||
@focus()
|
||||
|
||||
|
||||
@ -384,7 +384,7 @@ QR =
|
||||
e.stopPropagation()
|
||||
if e.shiftKey and e.type is 'click'
|
||||
return QR.selected.rmFile()
|
||||
if e.ctrlKey and e.type is 'click'
|
||||
if (e.ctrlKey or e.metaKey) and e.type is 'click'
|
||||
$.addClass QR.nodes.filename, 'edit'
|
||||
QR.nodes.filename.focus()
|
||||
return $.on QR.nodes.filename, 'blur', -> $.rmClass QR.nodes.filename, 'edit'
|
||||
|
||||
@ -216,7 +216,7 @@ QR.post = class
|
||||
URL.revokeObjectURL @URL
|
||||
|
||||
updateFilename: ->
|
||||
long = "#{@filename} (#{@filesize})\nCtrl+click to edit filename. Shift+click to clear."
|
||||
long = "#{@filename} (#{@filesize})\nCtrl/\u2318+click to edit filename. Shift+click to clear."
|
||||
@nodes.el.title = long
|
||||
return unless @ is QR.selected
|
||||
QR.nodes.fileContainer.title = long
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user