mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-01-30 10:42:53 +00:00
chore: Store preferences in a variable when reused and rename prefs to preferences (#5450)
A little code cleanup on places where `preferences` is used more than one time and rename `prefs` to `preferences` to maintain consistency.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%= env.get("preferences").as(Preferences).locale %>">
|
||||
<html lang="<%= preferences.locale %>">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"params" => {
|
||||
"comments": ["youtube"]
|
||||
},
|
||||
"preferences" => prefs,
|
||||
"preferences" => preferences,
|
||||
"base_url" => "/api/v1/post/#{URI.encode_www_form(id)}/comments",
|
||||
"ucid" => ucid
|
||||
}.to_pretty_json
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<%
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
dark_mode = env.get("preferences").as(Preferences).dark_mode
|
||||
preferences = env.get("preferences").as(Preferences)
|
||||
locale = preferences.locale
|
||||
dark_mode = preferences.dark_mode
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%= locale %>">
|
||||
|
||||
Reference in New Issue
Block a user