diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-01-26 06:13:01 +0300 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-02-07 01:57:52 +0300 |
commit | 584b86da3408826f776ee5e179af91ab61459a46 (patch) | |
tree | 33059ba30ec961c2b5dde50d80d932b8bd747185 /app/assets/javascripts/shortcuts_blob.js | |
parent | 572fb0be9b1d45437b7c0ed1000399657f471ec7 (diff) |
Add keyboard shortcut to move to file permalink
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/8082
Diffstat (limited to 'app/assets/javascripts/shortcuts_blob.js')
-rw-r--r-- | app/assets/javascripts/shortcuts_blob.js | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/app/assets/javascripts/shortcuts_blob.js b/app/assets/javascripts/shortcuts_blob.js deleted file mode 100644 index a3e549a2735..00000000000 --- a/app/assets/javascripts/shortcuts_blob.js +++ /dev/null @@ -1,29 +0,0 @@ -/* eslint-disable func-names, space-before-function-paren, max-len, one-var, no-var, no-restricted-syntax, vars-on-top, no-use-before-define, no-param-reassign, new-cap, no-underscore-dangle, wrap-iife, consistent-return */ -/* global Shortcuts */ -/* global Mousetrap */ - -require('./shortcuts'); - -(function() { - var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - this.ShortcutsBlob = (function(superClass) { - extend(ShortcutsBlob, superClass); - - function ShortcutsBlob(skipResetBindings) { - ShortcutsBlob.__super__.constructor.call(this, skipResetBindings); - Mousetrap.bind('y', ShortcutsBlob.copyToClipboard); - } - - ShortcutsBlob.copyToClipboard = function() { - var clipboardButton; - clipboardButton = $('.btn-clipboard'); - if (clipboardButton) { - return clipboardButton.click(); - } - }; - - return ShortcutsBlob; - })(Shortcuts); -}).call(this); |