debian-mirror-gitlab/app/assets/javascripts/shortcuts_blob.coffee

11 lines
295 B
CoffeeScript
Raw Normal View History

2016-06-22 15:30:34 +05:30
#= require shortcuts
class @ShortcutsBlob extends Shortcuts
constructor: (skipResetBindings) ->
super skipResetBindings
Mousetrap.bind('y', ShortcutsBlob.copyToClipboard)
@copyToClipboard: ->
clipboardButton = $('.btn-clipboard')
clipboardButton.click() if clipboardButton