summaryrefslogtreecommitdiff
path: root/source/features/upload-button.tsx
diff options
context:
space:
mode:
authorGravatar Federico Brigante <github@bfred.it> 2019-03-08 09:23:51 +0800
committerGravatar GitHub <noreply@github.com> 2019-03-08 09:23:51 +0800
commitebc1ae69216a6a736c0b81588c062bf4e7120834 (patch)
treeebaa6b179ecdb5272a98019956eb48c0c84601cd /source/features/upload-button.tsx
parent10a6b30c335e2d196b33d8eb8d8b0d6576f94372 (diff)
downloadrefined-github-ebc1ae69216a6a736c0b81588c062bf4e7120834.tar.gz
refined-github-ebc1ae69216a6a736c0b81588c062bf4e7120834.tar.zst
refined-github-ebc1ae69216a6a736c0b81588c062bf4e7120834.zip
Replace `delegate` with `delegate-it` (#1834)
Diffstat (limited to 'source/features/upload-button.tsx')
-rw-r--r--source/features/upload-button.tsx9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/features/upload-button.tsx b/source/features/upload-button.tsx
index a93ac884..d7d01ddd 100644
--- a/source/features/upload-button.tsx
+++ b/source/features/upload-button.tsx
@@ -1,7 +1,6 @@
import React from 'dom-chef';
import select from 'select-dom';
-import delegate from 'delegate';
-import onetime from 'onetime';
+import delegate from 'delegate-it';
import features from '../libs/features';
import * as icons from '../libs/icons';
@@ -31,13 +30,9 @@ function triggerUploadUI({target}) {
.click(); // Open UI
}
-const listenOnce = onetime(() => {
- delegate('.rgh-upload-btn', 'click', triggerUploadUI);
-});
-
function init() {
addButtons();
- listenOnce();
+ delegate('.rgh-upload-btn', 'click', triggerUploadUI);
}
features.add({