mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-02 06:26:27 -04:00
handled invalid values in storage
partial rewrite notifications.js innerText to textContent fixed bug with clamping
This commit is contained in:
parent
319bbd2f81
commit
b72b917af2
8 changed files with 128 additions and 109 deletions
|
@ -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 = '';
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue