diff options
| author | meow <woem> | 2022-05-21 13:35:41 +0300 |
|---|---|---|
| committer | meow <woem> | 2022-05-21 13:35:41 +0300 |
| commit | b72b917af239c46dbe3d4592fc8b215e63703459 (patch) | |
| tree | 7bdda9692af29e9e47172b6a1d66d8bd4266a517 /assets/js/watched_widget.js | |
| parent | 319bbd2f8113a775990895fff952a0228fb8f9e1 (diff) | |
| download | invidious-b72b917af239c46dbe3d4592fc8b215e63703459.tar.gz invidious-b72b917af239c46dbe3d4592fc8b215e63703459.tar.bz2 invidious-b72b917af239c46dbe3d4592fc8b215e63703459.zip | |
handled invalid values in storage
partial rewrite notifications.js
innerText to textContent
fixed bug with clamping
Diffstat (limited to 'assets/js/watched_widget.js')
| -rw-r--r-- | assets/js/watched_widget.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/assets/js/watched_widget.js b/assets/js/watched_widget.js index 497b1878..f1ac9cb4 100644 --- a/assets/js/watched_widget.js +++ b/assets/js/watched_widget.js @@ -20,14 +20,14 @@ function mark_unwatched(target) { var tile = target.parentNode.parentNode.parentNode.parentNode.parentNode; tile.style.display = 'none'; var count = document.getElementById('count'); - count.innerText = parseInt(count.innerText) - 1; + count.textContent--; var url = '/watch_ajax?action_mark_unwatched=1&redirect=false' + '&id=' + target.getAttribute('data-id'); helpers.xhr('POST', url, {payload: payload}, { onNon200: function (xhr) { - count.innerText = parseInt(count.innerText) + 1; + count.textContent++; tile.style.display = ''; } }); |
