diff options
Diffstat (limited to 'web_src/js/features/clipboard.js')
-rw-r--r-- | web_src/js/features/clipboard.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web_src/js/features/clipboard.js b/web_src/js/features/clipboard.js index 2c7ad013bd..8d28b4e281 100644 --- a/web_src/js/features/clipboard.js +++ b/web_src/js/features/clipboard.js @@ -4,16 +4,18 @@ function onSuccess(btn) { if (!btn.dataset.content) return; $(btn).popup('destroy'); + const oldContent = btn.dataset.content; btn.dataset.content = btn.dataset.success; $(btn).popup('show'); - btn.dataset.content = btn.dataset.original; + btn.dataset.content = oldContent; } function onError(btn) { if (!btn.dataset.content) return; + const oldContent = btn.dataset.content; $(btn).popup('destroy'); btn.dataset.content = btn.dataset.error; $(btn).popup('show'); - btn.dataset.content = btn.dataset.original; + btn.dataset.content = oldContent; } /** |