summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-09-13 18:12:19 -0500
committerOmar Roth <omarroth@hotmail.com>2018-09-13 18:12:19 -0500
commit2232bc04958de6d4c231ca8a76ae43c0631c32be (patch)
tree5b4bf065634824272162db9cd145d1d9ab6fe205
parentf7ca81c38413cc9d9e66551c2dc26aa0de1ad68b (diff)
downloadinvidious-2232bc04958de6d4c231ca8a76ae43c0631c32be.tar.gz
invidious-2232bc04958de6d4c231ca8a76ae43c0631c32be.tar.bz2
invidious-2232bc04958de6d4c231ca8a76ae43c0631c32be.zip
Use escaped newlines instead of graves
-rw-r--r--src/invidious/views/components/player.ecr4
-rw-r--r--src/invidious/views/watch.ecr43
2 files changed, 23 insertions, 24 deletions
diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr
index 38a4bbe1..4bdd7832 100644
--- a/src/invidious/views/components/player.ecr
+++ b/src/invidious/views/components/player.ecr
@@ -63,8 +63,8 @@ var shareOptions = {
title: "<%= video.title.dump_unquoted %>",
description: "<%= description %>",
image: "<%= thumbnail %>",
- embedCode: `<iframe id='ivplayer' type='text/html' width='640' height='360'
- src='<%= host_url %>/embed/<%= video.id %>?<%= host_params %>' frameborder='0'></iframe>`
+ embedCode: "<iframe id='ivplayer' type='text/html' width='640' height='360' \
+ src='<%= host_url %>/embed/<%= video.id %>?<%= host_params %>' frameborder='0'></iframe>"
};
var player = videojs("player", options, function() {
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
index 98c28d6a..9437dba3 100644
--- a/src/invidious/views/watch.ecr
+++ b/src/invidious/views/watch.ecr
@@ -205,19 +205,18 @@ function get_reddit_comments() {
if (xhr.readyState == 4)
if (xhr.status == 200) {
comments = document.getElementById("comments");
- comments.innerHTML = `
- <div>
- <h3>
- <a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a>
- {title}
- </h3>
- <b>
- <a target="_blank" href="https://reddit.com{permalink}">View more comments on Reddit</a>
- </b>
- </div>
- <div>{contentHtml}</div>
-
- <hr>`.supplant({
+ comments.innerHTML = ' \
+ <div> \
+ <h3> \
+ <a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a> \
+ {title} \
+ </h3> \
+ <b> \
+ <a target="_blank" href="https://reddit.com{permalink}">View more comments on Reddit</a> \
+ </b> \
+ </div> \
+ <div>{contentHtml}</div> \
+ <hr>'.supplant({
title: xhr.response.title,
permalink: xhr.response.permalink,
contentHtml: xhr.response.contentHtml
@@ -252,15 +251,15 @@ function get_youtube_comments() {
if (xhr.status == 200) {
comments = document.getElementById("comments");
if (xhr.response.commentCount > 0) {
- comments.innerHTML = `
- <div>
- <h3>
- <a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a>
- View {commentCount} comments
- </h3>
- </div>
- <div>{contentHtml}</div>
- <hr>`.supplant({
+ comments.innerHTML = ' \
+ <div> \
+ <h3> \
+ <a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a> \
+ View {commentCount} comments \
+ </h3> \
+ </div> \
+ <div>{contentHtml}</div> \
+ <hr>'.supplant({
contentHtml: xhr.response.contentHtml,
commentCount: commaSeparateNumber(xhr.response.commentCount)
});