We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2937db3 commit 4d4aadfCopy full SHA for 4d4aadf
plugins/downloader/front.js
@@ -19,6 +19,14 @@ const observer = new MutationObserver((mutations, observer) => {
19
}
20
});
21
22
+const reinit = () => {
23
+ if (!progress) {
24
+ console.warn("Cannot update progress");
25
+ } else {
26
+ progress.innerHTML = "Download";
27
+ }
28
+};
29
+
30
global.download = () => {
31
const videoUrl = window.location.href;
32
@@ -33,14 +41,9 @@ global.download = () => {
33
41
},
34
42
(error) => {
35
43
triggerAction(CHANNEL, ACTIONS.ERROR, error);
44
+ reinit();
36
45
37
- () => {
38
- if (!progress) {
39
- console.warn("Cannot update progress");
40
- } else {
- progress.innerHTML = "Download";
- }
46
+ reinit
47
);
48
};
49
0 commit comments