summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-10-15 11:15:23 -0500
committerOmar Roth <omarroth@hotmail.com>2018-10-15 11:15:23 -0500
commit57d88ffcc8e68aa3f057a37b94bbe5cef6c895cf (patch)
treeef84ef1f175957998408c244fcd5ae40bb0de1a5 /assets
parente46e6183aeeaa4ba5a9ee04f800cfbd96427cf80 (diff)
downloadinvidious-0.10.0.tar.gz
invidious-0.10.0.tar.bz2
invidious-0.10.0.zip
Fix fallback for comments0.10.0
Diffstat (limited to 'assets')
-rw-r--r--assets/js/watch.js21
1 files changed, 16 insertions, 5 deletions
diff --git a/assets/js/watch.js b/assets/js/watch.js
index 7301f075..4a84769e 100644
--- a/assets/js/watch.js
+++ b/assets/js/watch.js
@@ -21,11 +21,6 @@ function toggle_comments(target) {
}
function swap_comments(source) {
- comments = document.getElementById("comments");
- var fallback = comments.innerHTML;
- comments.innerHTML =
- '<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
-
if (source == "youtube") {
get_youtube_comments();
} else if (source == "reddit") {
@@ -46,3 +41,19 @@ String.prototype.supplant = function(o) {
return typeof r === "string" || typeof r === "number" ? r : a;
});
};
+
+function show_youtube_replies(target) {
+ body = target.parentNode.parentNode.children[1];
+ body.style.display = "";
+
+ target.innerHTML = "Hide replies";
+ target.setAttribute("onclick", "hide_youtube_replies(this)");
+}
+
+function hide_youtube_replies(target) {
+ body = target.parentNode.parentNode.children[1];
+ body.style.display = "none";
+
+ target.innerHTML = "Show replies";
+ target.setAttribute("onclick", "show_youtube_replies(this)");
+}