diff options
| author | meow <woem> | 2022-05-06 04:46:59 +0300 |
|---|---|---|
| committer | meow <woem> | 2022-05-06 04:46:59 +0300 |
| commit | 7dd699370fae20c69119a4117468b1d999a2752a (patch) | |
| tree | a02ff5e2a25bb8ce7a89e5ac43a55a463adbf791 /src | |
| parent | ef8c7184de2da3dd143dfc54dcb8f20d0ab67dc8 (diff) | |
| download | invidious-7dd699370fae20c69119a4117468b1d999a2752a.tar.gz invidious-7dd699370fae20c69119a4117468b1d999a2752a.tar.bz2 invidious-7dd699370fae20c69119a4117468b1d999a2752a.zip | |
js code rewrite. Created _helpers.js with XHR and storage wrapper
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/comments.cr | 2 | ||||
| -rw-r--r-- | src/invidious/views/add_playlist_items.ecr | 1 | ||||
| -rw-r--r-- | src/invidious/views/community.ecr | 1 | ||||
| -rw-r--r-- | src/invidious/views/components/player.ecr | 1 | ||||
| -rw-r--r-- | src/invidious/views/components/subscribe_widget.ecr | 1 | ||||
| -rw-r--r-- | src/invidious/views/embed.ecr | 1 | ||||
| -rw-r--r-- | src/invidious/views/feeds/history.ecr | 1 | ||||
| -rw-r--r-- | src/invidious/views/feeds/subscriptions.ecr | 1 | ||||
| -rw-r--r-- | src/invidious/views/licenses.ecr | 14 | ||||
| -rw-r--r-- | src/invidious/views/playlist.ecr | 1 | ||||
| -rw-r--r-- | src/invidious/views/template.ecr | 1 | ||||
| -rw-r--r-- | src/invidious/views/watch.ecr | 2 |
12 files changed, 26 insertions, 1 deletions
diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index 1f8de657..f50b5907 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -481,7 +481,7 @@ def template_reddit_comments(root, locale) html << <<-END_HTML <p> - <a href="javascript:void(0)" data-onclick="toggle_parent">[ - ]</a> + <a href="javascript:void(0)" data-onclick="toggle_parent">[ − ]</a> <b><a href="https://www.reddit.com/user/#{child.author}">#{child.author}</a></b> #{translate_count(locale, "comments_points_count", child.score, NumberFormatting::Separator)} <span title="#{child.created_utc.to_s(translate(locale, "%a %B %-d %T %Y UTC"))}">#{translate(locale, "`x` ago", recode_date(child.created_utc, locale))}</span> diff --git a/src/invidious/views/add_playlist_items.ecr b/src/invidious/views/add_playlist_items.ecr index 22870317..758f3995 100644 --- a/src/invidious/views/add_playlist_items.ecr +++ b/src/invidious/views/add_playlist_items.ecr @@ -29,6 +29,7 @@ }.to_pretty_json %> </script> +<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/playlist_widget.js?v=<%= ASSET_COMMIT %>"></script> <div class="pure-g"> diff --git a/src/invidious/views/community.ecr b/src/invidious/views/community.ecr index 3bc29e55..154c40b5 100644 --- a/src/invidious/views/community.ecr +++ b/src/invidious/views/community.ecr @@ -93,4 +93,5 @@ }.to_pretty_json %> </script> +<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/community.js?v=<%= ASSET_COMMIT %>"></script> diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr index fffefc9a..483807d7 100644 --- a/src/invidious/views/components/player.ecr +++ b/src/invidious/views/components/player.ecr @@ -66,4 +66,5 @@ }.to_pretty_json %> </script> +<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/player.js?v=<%= ASSET_COMMIT %>"></script> diff --git a/src/invidious/views/components/subscribe_widget.ecr b/src/invidious/views/components/subscribe_widget.ecr index b9d5f783..7a8c7fda 100644 --- a/src/invidious/views/components/subscribe_widget.ecr +++ b/src/invidious/views/components/subscribe_widget.ecr @@ -31,6 +31,7 @@ }.to_pretty_json %> </script> + <script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/subscribe_widget.js?v=<%= ASSET_COMMIT %>"></script> <% else %> <p> diff --git a/src/invidious/views/embed.ecr b/src/invidious/views/embed.ecr index ce5ff7f0..82f80f9d 100644 --- a/src/invidious/views/embed.ecr +++ b/src/invidious/views/embed.ecr @@ -31,6 +31,7 @@ </script> <%= rendered "components/player" %> +<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/embed.js?v=<%= ASSET_COMMIT %>"></script> </body> </html> diff --git a/src/invidious/views/feeds/history.ecr b/src/invidious/views/feeds/history.ecr index 6c1243c5..51dd78bd 100644 --- a/src/invidious/views/feeds/history.ecr +++ b/src/invidious/views/feeds/history.ecr @@ -25,6 +25,7 @@ }.to_pretty_json %> </script> +<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/watched_widget.js"></script> <div class="pure-g"> diff --git a/src/invidious/views/feeds/subscriptions.ecr b/src/invidious/views/feeds/subscriptions.ecr index 8d56ad14..957277fa 100644 --- a/src/invidious/views/feeds/subscriptions.ecr +++ b/src/invidious/views/feeds/subscriptions.ecr @@ -50,6 +50,7 @@ }.to_pretty_json %> </script> +<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/watched_widget.js"></script> <div class="pure-g"> diff --git a/src/invidious/views/licenses.ecr b/src/invidious/views/licenses.ecr index 861913d0..25b24ed4 100644 --- a/src/invidious/views/licenses.ecr +++ b/src/invidious/views/licenses.ecr @@ -11,6 +11,20 @@ <table id="jslicense-labels1"> <tr> <td> + <a href="/js/_helpers.js?v=<%= ASSET_COMMIT %>">_helpers.js</a> + </td> + + <td> + <a href="https://www.gnu.org/licenses/agpl-3.0.html">AGPL-3.0</a> + </td> + + <td> + <a href="/js/_helpers.js?v=<%= ASSET_COMMIT %>"><%= translate(locale, "source") %></a> + </td> + </tr> + + <tr> + <td> <a href="/js/community.js?v=<%= ASSET_COMMIT %>">community.js</a> </td> diff --git a/src/invidious/views/playlist.ecr b/src/invidious/views/playlist.ecr index df3112db..641cbe2c 100644 --- a/src/invidious/views/playlist.ecr +++ b/src/invidious/views/playlist.ecr @@ -97,6 +97,7 @@ }.to_pretty_json %> </script> +<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/playlist_widget.js?v=<%= ASSET_COMMIT %>"></script> <% end %> diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index bd908dd6..79decbe6 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -157,6 +157,7 @@ </div> <div class="pure-u-1 pure-u-md-2-24"></div> </div> + <script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/handlers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/themes.js?v=<%= ASSET_COMMIT %>"></script> <% if env.get? "user" %> diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 8b6eb903..e6a14d0f 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -165,6 +165,7 @@ we're going to need to do it here in order to allow for translations. }.to_pretty_json %> </script> + <script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/playlist_widget.js?v=<%= Time.utc.to_unix_ms %>"></script> <% end %> <% end %> @@ -303,4 +304,5 @@ we're going to need to do it here in order to allow for translations. </div> <% end %> </div> +<script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/watch.js?v=<%= ASSET_COMMIT %>"></script> |
