diff --git a/assets/js/_helpers.js b/assets/js/_helpers.js
index 8e18169e..ae3b157c 100644
--- a/assets/js/_helpers.js
+++ b/assets/js/_helpers.js
@@ -211,9 +211,9 @@ window.helpers = window.helpers || {
helpers.storage.remove(key);
}
},
- set: function (key, value) {
+ set: function (key, value) {
let encoded_value = encodeURIComponent(JSON.stringify(value))
- localStorage.setItem(key, encoded_value);
+ localStorage.setItem(key, encoded_value);
},
remove: function (key) { localStorage.removeItem(key); }
};
diff --git a/assets/js/player.js b/assets/js/player.js
index a166ff9e..7c0b4146 100644
--- a/assets/js/player.js
+++ b/assets/js/player.js
@@ -153,7 +153,7 @@ player.on('timeupdate', function () {
let base_url_yt_watch = elem_yt_watch.getAttribute('data-base-url');
elem_yt_watch.href = addCurrentTimeToURL(base_url_yt_watch);
}
-
+
let elem_yt_embed = document.getElementById('link-yt-embed');
if (elem_yt_embed) {
let base_url_yt_embed = elem_yt_embed.getAttribute('data-base-url');
@@ -170,7 +170,7 @@ player.on('timeupdate', function () {
let base_url_iv_embed = elem_iv_embed.getAttribute('data-base-url');
elem_iv_embed.href = addCurrentTimeToURL(base_url_iv_embed, domain);
}
-
+
let elem_iv_other = document.getElementById('link-iv-other');
if (elem_iv_other) {
let base_url_iv_other = elem_iv_other.getAttribute('data-base-url');
@@ -640,7 +640,7 @@ function toggle_caption_window() {
player.textTrackSettings.setValues({ windowOpacity: options.windowOpacity[newIndex] });
update_captions();
}
-
+
function toggle_caption_opacity() {
const numOptions = options.textOpacity.length;
const textOpacity = player.textTrackSettings.getValues().textOpacity || '1';
@@ -745,7 +745,7 @@ addEventListener('keydown', function (e) {
case '>': action = increase_playback_rate.bind(this, 1); break;
case '<': action = increase_playback_rate.bind(this, -1); break;
-
+
case '=': action = increase_caption_size.bind(this, 1); break;
case '-': action = increase_caption_size.bind(this, -1); break;
diff --git a/config/config.example.yml b/config/config.example.yml
index 91bb1dc9..e916257c 100644
--- a/config/config.example.yml
+++ b/config/config.example.yml
@@ -144,7 +144,7 @@ db:
##
## When this setting is commented out, Invidious companion is not used.
## Otherwise, Invidious will proxy the requests to Invidious companion.
-##
+##
## Note: multiple URL can be configured. In this case, Invidious will
## randomly pick one every time video data needs to be retrieved. This
## URL is then kept in the video metadata cache to allow video playback
@@ -154,7 +154,7 @@ db:
## The parameter private_url is required for the internal communication
## between Invidious companion and Invidious.
##
-## The optional parameter public_url is the public URL from which
+## The optional parameter public_url is the public URL from which
## Invidious companion is listening to the requests from the user(s).
## When this setting is commented out, Invidious proxy all requests to
## Invidious companion. Useful for simple setups.
@@ -337,7 +337,7 @@ https_only: false
## Configuration for using a HTTP proxy
## If unset, then no HTTP proxy will be used.
## Proxy type supported: HTTP, HTTPS
-##
+##
## This is not used for loading the video streams from YouTube servers (circumvent YouTube restrictions)
## Please instead configure the proxy in Invidious companion:
## https://github.com/iv-org/invidious-companion/blob/master/config/config.example.toml
diff --git a/scripts/git/pre-commit b/scripts/git/pre-commit
index 4460b670..0b19802d 100644
--- a/scripts/git/pre-commit
+++ b/scripts/git/pre-commit
@@ -3,7 +3,7 @@
# Crystal linter
# This is a modified version of the pre-commit hook from the crystal repo. https://github.com/crystal-lang/crystal/blob/master/scripts/git/pre-commit
-# Please refer to that if you'd like an version that doesn't automatically format staged files.
+# Please refer to that if you'd like an version that doesn't automatically format staged files.
changed_cr_files=$(git diff --cached --name-only --diff-filter=ACM | grep '\.cr$')
if [ ! -z "$changed_cr_files" ]; then
if [ -x bin/crystal ]; then
diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr
index 0378836f..424302f7 100644
--- a/src/invidious/views/components/player.ecr
+++ b/src/invidious/views/components/player.ecr
@@ -25,8 +25,7 @@
audio_streams.each_with_index do |fmt, i|
src_url = "/latest_version?id=#{video.id}&itag=#{fmt["itag"]}"
src_url += "&local=true" if params.local
- companion_public_url = env.get("companion_companion_public_url").as(String)
- src_url = companion_public_url + src_url +
+ src_url = invidious_companion.public_url.to_s + src_url +
"&check=#{invidious_companion_check_id}" if (invidious_companion)
bitrate = fmt["bitrate"]
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
index 59dcffe4..bbcb19fd 100644
--- a/src/invidious/views/watch.ecr
+++ b/src/invidious/views/watch.ecr
@@ -145,7 +145,7 @@ we're going to need to do it here in order to allow for translations.
end
-%>
<%= translate(locale, "videoinfo_watch_on_youTube") %>
- (<%= translate(locale, "videoinfo_youTube_embed_link") %>)
+ (<%= translate(locale, "videoinfo_youTube_embed_link") %>)
<% if CONFIG.materialious_domain %>