Add toggle_parent to dynamic handlers

This commit is contained in:
Omar Roth 2020-03-15 18:52:49 -04:00
parent 59a15ceef6
commit bd7950b757
No known key found for this signature in database
GPG Key ID: B8254FB7EC3D37F2

View File

@ -24,6 +24,9 @@
var load_more = e.getAttribute('data-load-more') !== null; var load_more = e.getAttribute('data-load-more') !== null;
get_youtube_replies(e, load_more); get_youtube_replies(e, load_more);
break; break;
case 'toggle_parent':
toggle_parent(e);
break;
default: default:
break; break;
} }
@ -46,9 +49,6 @@
e.onsubmit = function () { return false; }; e.onsubmit = function () { return false; };
}); });
n2a(document.querySelectorAll('[data-onclick="toggle_parent"]')).forEach(function(e) {
e.onclick = function() { toggle_parent(e); };
});
n2a(document.querySelectorAll('[data-onclick="mark_watched"]')).forEach(function (e) { n2a(document.querySelectorAll('[data-onclick="mark_watched"]')).forEach(function (e) {
e.onclick = function () { mark_watched(e); }; e.onclick = function () { mark_watched(e); };
}); });