debian-mirror-gitlab/app/assets/javascripts/shortcuts_blob.coffee
2016-06-22 15:30:34 +05:30

10 lines
295 B
CoffeeScript

#= require shortcuts
class @ShortcutsBlob extends Shortcuts
constructor: (skipResetBindings) ->
super skipResetBindings
Mousetrap.bind('y', ShortcutsBlob.copyToClipboard)
@copyToClipboard: ->
clipboardButton = $('.btn-clipboard')
clipboardButton.click() if clipboardButton