summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-01-19 10:01:50 -0600
committerDouwe Maan <douwe@selenight.nl>2017-01-19 10:01:59 -0600
commit9b800bc6418621b601fead1c18dd0a327534c998 (patch)
tree0bf7d5a37a3f39026a4faa1b0ed2e9e29c6d1590
parent359c41761947ea50b84718b34b327d48a689d147 (diff)
downloadgitlab-ce-9b800bc6418621b601fead1c18dd0a327534c998.tar.gz
Remove unneeded code
-rw-r--r--app/assets/javascripts/copy_as_gfm.js.es64
-rw-r--r--app/assets/javascripts/lib/utils/common_utils.js.es62
2 files changed, 2 insertions, 4 deletions
diff --git a/app/assets/javascripts/copy_as_gfm.js.es6 b/app/assets/javascripts/copy_as_gfm.js.es6
index 6c13ba2ccb8..c55aee39fca 100644
--- a/app/assets/javascripts/copy_as_gfm.js.es6
+++ b/app/assets/javascripts/copy_as_gfm.js.es6
@@ -249,8 +249,8 @@
class CopyAsGFM {
constructor() {
- $(document).on('copy', '.md, .wiki', this.handleCopy.bind(this));
- $(document).on('paste', '.js-gfm-input', this.handlePaste.bind(this));
+ $(document).on('copy', '.md, .wiki', this.handleCopy);
+ $(document).on('paste', '.js-gfm-input', this.handlePaste);
}
handleCopy(e) {
diff --git a/app/assets/javascripts/lib/utils/common_utils.js.es6 b/app/assets/javascripts/lib/utils/common_utils.js.es6
index 43179e8ab88..24aedcae1ed 100644
--- a/app/assets/javascripts/lib/utils/common_utils.js.es6
+++ b/app/assets/javascripts/lib/utils/common_utils.js.es6
@@ -161,8 +161,6 @@
};
w.gl.utils.getSelectedFragment = () => {
- if (!window.getSelection) return null;
-
const selection = window.getSelection();
if (!selection.rangeCount || selection.rangeCount === 0) return null;