diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-05-01 20:03:39 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-05-01 20:03:39 -0500 |
| commit | 1a9360ca754e684947df566ad8d3c6f0deec8664 (patch) | |
| tree | 634cbcd7512d1c7052b7101b58793dbf7578fb32 /assets | |
| parent | 22b9bbe70271c94937b7c8f9645c23d4a559fb92 (diff) | |
| download | invidious-1a9360ca754e684947df566ad8d3c6f0deec8664.tar.gz invidious-1a9360ca754e684947df566ad8d3c6f0deec8664.tar.bz2 invidious-1a9360ca754e684947df566ad8d3c6f0deec8664.zip | |
Minor formatting changes
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/watch.js | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/assets/js/watch.js b/assets/js/watch.js index 7a68c30c..799d6af9 100644 --- a/assets/js/watch.js +++ b/assets/js/watch.js @@ -1,52 +1,52 @@ function toggle_parent(target) { - body = target.parentNode.parentNode.children[1]; - if (body.style.display === null || body.style.display === "") { - target.innerHTML = "[ + ]"; - body.style.display = "none"; - } else { - target.innerHTML = "[ - ]"; - body.style.display = ""; - } + body = target.parentNode.parentNode.children[1]; + if (body.style.display === null || body.style.display === "") { + target.innerHTML = "[ + ]"; + body.style.display = "none"; + } else { + target.innerHTML = "[ - ]"; + body.style.display = ""; + } } function toggle_comments(target) { - body = target.parentNode.parentNode.parentNode.children[1]; - if (body.style.display === null || body.style.display === "") { - target.innerHTML = "[ + ]"; - body.style.display = "none"; - } else { - target.innerHTML = "[ - ]"; - body.style.display = ""; - } + body = target.parentNode.parentNode.parentNode.children[1]; + if (body.style.display === null || body.style.display === "") { + target.innerHTML = "[ + ]"; + body.style.display = "none"; + } else { + target.innerHTML = "[ - ]"; + body.style.display = ""; + } } function swap_comments(source) { - if (source == "youtube") { - get_youtube_comments(); - } else if (source == "reddit") { - get_reddit_comments(); - } + if (source == "youtube") { + get_youtube_comments(); + } else if (source == "reddit") { + get_reddit_comments(); + } } -String.prototype.supplant = function(o) { - return this.replace(/{([^{}]*)}/g, function(a, b) { - var r = o[b]; - return typeof r === "string" || typeof r === "number" ? r : a; - }); +String.prototype.supplant = function (o) { + return this.replace(/{([^{}]*)}/g, function (a, b) { + var r = o[b]; + return typeof r === "string" || typeof r === "number" ? r : a; + }); }; function show_youtube_replies(target, inner_text, sub_text) { - body = target.parentNode.parentNode.children[1]; - body.style.display = ""; + body = target.parentNode.parentNode.children[1]; + body.style.display = ""; - target.innerHTML = inner_text; - target.setAttribute("onclick", "hide_youtube_replies(this, \'" + inner_text + "\', \'" + sub_text + "\')"); + target.innerHTML = inner_text; + target.setAttribute("onclick", "hide_youtube_replies(this, \'" + inner_text + "\', \'" + sub_text + "\')"); } function hide_youtube_replies(target, inner_text, sub_text) { - body = target.parentNode.parentNode.children[1]; - body.style.display = "none"; + body = target.parentNode.parentNode.children[1]; + body.style.display = "none"; - target.innerHTML = sub_text; - target.setAttribute("onclick", "show_youtube_replies(this, \'" + inner_text + "\', \'" + sub_text + "\')"); + target.innerHTML = sub_text; + target.setAttribute("onclick", "show_youtube_replies(this, \'" + inner_text + "\', \'" + sub_text + "\')"); } |
