summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRadoslavL <rlelchev@abv.bg>2023-10-22 13:54:35 +0300
committerRadoslavL <rlelchev@abv.bg>2023-10-22 13:54:35 +0300
commitc0d75bc52f2d7561d8351e0823c816c8a8f12441 (patch)
treec8d57b9a1f13b08e491aad562ea79dc0f9903b13 /src
parente307fcc9a1a8ea9a181a6f93fb58c630714270ac (diff)
downloadinvidious-c0d75bc52f2d7561d8351e0823c816c8a8f12441.tar.gz
invidious-c0d75bc52f2d7561d8351e0823c816c8a8f12441.tar.bz2
invidious-c0d75bc52f2d7561d8351e0823c816c8a8f12441.zip
Removed <noscript> and the user preferences option
Diffstat (limited to 'src')
-rw-r--r--src/invidious/config.cr1
-rw-r--r--src/invidious/frontend/pagination.cr12
-rw-r--r--src/invidious/routes/preferences.cr5
-rw-r--r--src/invidious/user/preferences.cr1
-rw-r--r--src/invidious/views/channel.ecr3
-rw-r--r--src/invidious/views/user/preferences.ecr5
6 files changed, 3 insertions, 24 deletions
diff --git a/src/invidious/config.cr b/src/invidious/config.cr
index 56c09beb..429d9246 100644
--- a/src/invidious/config.cr
+++ b/src/invidious/config.cr
@@ -44,7 +44,6 @@ struct ConfigPreferences
property vr_mode : Bool = true
property show_nick : Bool = true
property save_player_pos : Bool = false
- property previous_page_button : Bool = true
def to_tuple
{% begin %}
diff --git a/src/invidious/frontend/pagination.cr b/src/invidious/frontend/pagination.cr
index 4a9d76d7..13464503 100644
--- a/src/invidious/frontend/pagination.cr
+++ b/src/invidious/frontend/pagination.cr
@@ -3,10 +3,7 @@ require "uri"
module Invidious::Frontend::Pagination
extend self
- private def first_page(str : String::Builder, locale : String?, url : String, previous_page_button : Bool)
- if previous_page_button
- str << %(<noscript>)
- end
+ private def first_page(str : String::Builder, locale : String?, url : String)
str << %(<a href=") << url << %(" class="pure-button pure-button-secondary">)
if locale_is_rtl?(locale)
@@ -22,9 +19,6 @@ module Invidious::Frontend::Pagination
end
str << "</a>"
- if previous_page_button
- str << "</noscript>"
- end
end
private def previous_page(str : String::Builder, locale : String?, url : String)
@@ -96,7 +90,7 @@ module Invidious::Frontend::Pagination
end
end
- def nav_ctoken(locale : String?, *, base_url : String | URI, ctoken : String?, first_page : Bool, previous_page_button : Bool)
+ def nav_ctoken(locale : String?, *, base_url : String | URI, ctoken : String?, first_page : Bool)
return String.build do |str|
str << %(<div class="h-box">\n)
str << %(<div class="page-nav-container flexible">\n)
@@ -104,7 +98,7 @@ module Invidious::Frontend::Pagination
str << %(<div class="page-prev-container flex-left">)
if !first_page
- self.first_page(str, locale, base_url.to_s, previous_page_button)
+ self.first_page(str, locale, base_url.to_s)
end
str << %(</div>\n)
diff --git a/src/invidious/routes/preferences.cr b/src/invidious/routes/preferences.cr
index 23c91706..abe0f34e 100644
--- a/src/invidious/routes/preferences.cr
+++ b/src/invidious/routes/preferences.cr
@@ -140,10 +140,6 @@ module Invidious::Routes::PreferencesRoute
notifications_only ||= "off"
notifications_only = notifications_only == "on"
- previous_page_button = env.params.body["previous_page_button"]?.try &.as(String)
- previous_page_button ||= "off"
- previous_page_button = previous_page_button == "on"
-
# Convert to JSON and back again to take advantage of converters used for compatibility
preferences = Preferences.from_json({
annotations: annotations,
@@ -179,7 +175,6 @@ module Invidious::Routes::PreferencesRoute
vr_mode: vr_mode,
show_nick: show_nick,
save_player_pos: save_player_pos,
- previous_page_button: previous_page_button,
}.to_json)
if user = env.get? "user"
diff --git a/src/invidious/user/preferences.cr b/src/invidious/user/preferences.cr
index a0ea3018..b3059403 100644
--- a/src/invidious/user/preferences.cr
+++ b/src/invidious/user/preferences.cr
@@ -55,7 +55,6 @@ struct Preferences
property extend_desc : Bool = CONFIG.default_user_preferences.extend_desc
property volume : Int32 = CONFIG.default_user_preferences.volume
property save_player_pos : Bool = CONFIG.default_user_preferences.save_player_pos
- property previous_page_button : Bool = CONFIG.default_user_preferences.previous_page_button
module BoolToString
def self.to_json(value : String, json : JSON::Builder)
diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel.ecr
index 123a0a50..9349fffc 100644
--- a/src/invidious/views/channel.ecr
+++ b/src/invidious/views/channel.ecr
@@ -22,7 +22,6 @@
base_url: relative_url,
ctoken: next_continuation,
first_page: continuation.nil?,
- previous_page_button: env.get("preferences").as(Preferences).previous_page_button
)
%>
@@ -42,9 +41,7 @@
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/channel/<%= ucid %>" />
<%- end -%>
-<%- if env.get("preferences").as(Preferences).previous_page_button -%>
<script src="/js/pagination.js?v=<%= ASSET_COMMIT %>"></script>
-<%- end -%>
<link rel="alternate" href="<%= youtube_url %>">
<title><%= author %> - Invidious</title>
diff --git a/src/invidious/views/user/preferences.ecr b/src/invidious/views/user/preferences.ecr
index 4b915a53..11ec045d 100644
--- a/src/invidious/views/user/preferences.ecr
+++ b/src/invidious/views/user/preferences.ecr
@@ -190,11 +190,6 @@
<% end %>
</div>
- <div class="pure-control-group">
- <label for="previous_page_button"><%= translate(locale, "preferences_previous_page_button_label") %></label>
- <input name="previous_page_button" id="previous_page_button" type="checkbox" <% if preferences.previous_page_button %>checked<% end %>>
- </div>
-
<% if env.get? "user" %>
<div class="pure-control-group">
<label for="show_nick"><%= translate(locale, "preferences_show_nick_label") %></label>