gitlab-org--gitlab-foss/app/assets/javascripts/shortcuts_blob.coffee
Luke "Jared" Bennett 20a6111d2b Added ability to skip the Mousetrap binding reset
Added 'y' shortcut for copying a files immutable content hash link

Updated CHANGELOG

changed ! to not

Moved CHANGELOG entry
2016-06-10 17:41:02 +01:00

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