Posted by Rambler in Incognet (edited )

Because it's required to be in compliance with the usage of invidious to publicly publish any/all changes to the source regardless of it they're just cosmetic or not....

For: https://tube.incog.host

Modified template.ecr file:

<!DOCTYPE html>
<html lang="<%= env.get("preferences").as(Preferences).locale %>">

<head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <%= yield_content "header" %>
 <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=<%= ASSET_COMMIT %>">
 <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=<%= ASSET_COMMIT %>">
 <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=<%= ASSET_COMMIT %>">
 <link rel="manifest" href="/site.webmanifest?v=<%= ASSET_COMMIT %>">
 <link rel="mask-icon" href="/safari-pinned-tab.svg?v=<%= ASSET_COMMIT %>" color="#575757">
 <meta name="msapplication-TileColor" content="#575757">
 <meta name="theme-color" content="#575757">
 <link title="Invidious" type="application/opensearchdescription+xml" rel="search" href="/opensearch.xml">
 <link rel="stylesheet" href="/css/pure-min.css?v=<%= ASSET_COMMIT %>">
 <link rel="stylesheet" href="/css/grids-responsive-min.css?v=<%= ASSET_COMMIT %>">
 <link rel="stylesheet" href="/css/ionicons.min.css?v=<%= ASSET_COMMIT %>">
 <link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>">
</head>

<% locale = LOCALES[env.get("preferences").as(Preferences).locale]? %>
<% dark_mode = env.get("preferences").as(Preferences).dark_mode %>

<body class="<%= dark_mode.blank? ? "no" : dark_mode %>-theme">
 <span style="display:none" id="dark_mode_pref"><%= env.get("preferences").as(Preferences).dark_mode %></span>
 <div class="pure-g">
 <div class="pure-u-1 pure-u-md-2-24"></div>
 <div class="pure-u-1 pure-u-md-20-24">
 <div class="pure-g navbar h-box">
 <div class="pure-u-1 pure-u-md-4-24" align="center">
 <small>View</small> <a href="/" class="index-link pure-menu-heading">Invidious</a> <small>on:</small> <br>
					<small>( <a href="https://tube.incog.host/">WWW</a> | <a href="http://tuberyps2pn6dor6h47brof3w2asmauahhk4ei42krugybzzzo55klad.onion/">TOR</a> | <a href="http://vipzc556nzjraiqsk5xwvyhz54fvtqt3vrepdarat3zsj4a6eypq.b32.i2p/">I2P</a> | <a href="http://[200:46bf:ee17:939:f846:572f:72db:d4d]/">YGG</a> )</small><br>
 </div>
 <div class="pure-u-1 pure-u-md-12-24 searchbar">
 <form class="pure-form" action="/search" method="get">
 <fieldset>
 <input type="search" style="width:100%" name="q" placeholder="<%= translate(locale, "search") %>" value="<%= env.get?("search").try {|x| HTML.escape(x.as(String)) } %>">
 </fieldset>
 </form>
 </div>
 <div class="pure-u-1 pure-u-md-8-24 user-field">
 <% if env.get? "user" %>
 <div class="pure-u-1-4">
 <a id="toggle_theme" href="/toggle_theme?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
 <% if env.get("preferences").as(Preferences).dark_mode == "dark" %>
 <i class="icon ion-ios-sunny"></i>
 <% else %>
 <i class="icon ion-ios-moon"></i>
 <% end %>
 </a>
 </div>
 <div class="pure-u-1-4">
 <a id="notification_ticker" title="<%= translate(locale, "Subscriptions") %>" href="/feed/subscriptions" class="pure-menu-heading">
 <% notification_count = env.get("user").as(User).notifications.size %>
 <% if notification_count > 0 %>
 <span id="notification_count"><%= notification_count %></span> <i class="icon ion-ios-notifications"></i>
 <% else %>
 <i class="icon ion-ios-notifications-outline"></i>
 <% end %>
 </a>
 </div>
 <div class="pure-u-1-4">
 <a title="<%= translate(locale, "Preferences") %>" href="/preferences?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
 <i class="icon ion-ios-cog"></i>
 </a>
 </div>
 <div class="pure-u-1-4">
 <form action="/signout?referer=<%= env.get?("current_page") %>" method="post">
 <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>">
 <a class="pure-menu-heading" href="#">
 <input style="all:unset" type="submit" value="<%= translate(locale, "Log out") %>">
 </a>
 </form>
 </div>
 <% else %>
 <div class="pure-u-1-3">
 <a id="toggle_theme" href="/toggle_theme?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
 <% if env.get("preferences").as(Preferences).dark_mode == "dark" %>
 <i class="icon ion-ios-sunny"></i>
 <% else %>
 <i class="icon ion-ios-moon"></i>
 <% end %>
 </a>
 </div>
 <div class="pure-u-1-3">
 <a title="<%= translate(locale, "Preferences") %>" href="/preferences?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
 <i class="icon ion-ios-cog"></i>
 </a>
 </div>
 <% if CONFIG.login_enabled %>
 <div class="pure-u-1-3">
 <a href="/login?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
 <%= translate(locale, "Log in") %></a>
 </div>
 <% end %>
 <% end %>
 </div>
 </div>

 <% if CONFIG.banner %>
 <div class="h-box">
 <h3><%= CONFIG.banner %></h3>
 </div>
 <% end %>

 <%= content %>

 <div class="footer">
				<div class="h-box">
 <center>Available at <a href="https://tube.incog.host/">tube.incog.host</a> as well on Tor ( <a href="http://tuberyps2pn6dor6h47brof3w2asmauahhk4ei42krugybzzzo55klad.onion">.onion</a> ), I2P (<a href="http://vipzc556nzjraiqsk5xwvyhz54fvtqt3vrepdarat3zsj4a6eypq.b32.i2p/"> B32</a> | <a href="http://tube.i2p">.I2P</a> | <a href="http://tube.i2p/?i2paddresshelper=B2J5FacsN-tHOdTTwNmEXJIEDq59XNgGF-QxuOG5FA87rze4V-GnAoLyaS60wIcEkVMcjwHe8kW8itq3MbHlIt4G6~gzbK-BHUA-ZcCHcsIS35ylQdhPNH5VXCL2ukPvyRTeGeYxgtEKqm9vmLU0QLDFQb-cdaa~kWsbg2JEwjNz1yFIvnvOBoE~BfAQZDJyiMfNEOrHzJYsV8xGRR8igMI3dBVVsz1arVm0h~hZBGdMxqhzSIE8J2KGzW2pJl~2QRz5LFWJ4guQgZN5caGEyFVVw1IAzLwu3huYTlGIWMkBirqVR4hX8gaiTpFXKDFWCSjAI-jQvpA~YRknSUopprJaMC-OrpcnKUxSFU7hm2kq9J9i6pqXklS2d24qiavZZPGHqfg8KrnOyXsdfvYxy4tChRZV4vosXopu7Ft9IHBZj0Kd3imFTFSz8m0dKxypQn1oN~rN5uYeFWJmChOOJwug7iCMYIh2ziMFc0hlyyLBfUySmDz-GvZE5OBnsEgABQAEAAcAAA==">helper</a> ) and Yggdrasil ( <a href="http://[200:46bf:ee17:939:f846:572f:72db:d4d]/">IPv6</a> | <a href="http://utube.ygg">.ygg</a> )</center>
 <p align="center"><b>This instance sponsored by:</b> <a href="https://incog.host">INCOG.HOST</a><br />
 </div> 
				<div class="pure-g">
 <div class="pure-u-1 pure-u-md-1-3">
 <p>INVIDIOUS is open sourced software:</p>
 <ul align="left">
						<li><a href="https://github.com/iv-org/invidious"><%= translate(locale, "Released under the AGPLv3 by Omar Roth.") %></a></li>
						<li><a href="https://github.com/iv-org/documentation">Documentation</a></li>
						<li><i class="icon ion-logo-github"></i><%= translate(locale, "Current version: ") %> <%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %> @ <%= CURRENT_BRANCH %></p></li>
 </ul>
 </div>
 
					<div class="pure-u-1 pure-u-md-1-3">
					<p>You can donate to help the development:</p>
					<ul align="left">
						<li><i class="icon ion-ios-wallet"></i>BTC: <a href="bitcoin:bc1qfhe7rq3lqzuayzjxzyt9waz9ytrs09kla3tsgr">Click Here</a></li>
						<li><i class="icon ion-ios-wallet"></i>XMR: <a href="monero:41nMCtek197boJtiUvGnTFYMatrLEpnpkQDmUECqx5Es2uX3sTKKWVhSL76suXsG3LXqkEJBrCZBgPTwJrDp1FrZJfycGPR">Click here</a></li>
					</ul>
					</div>					
					<div class="pure-u-1 pure-u-md-1-3">
					<p>Prviacy and Other info:</p>
					<ul align="left">
						<li><i class="icon ion-logo-javascript"></i> <a rel="jslicense" href="/licenses"><%= translate(locale, "View JavaScript license information.") %></a></li>
						<li><i class="icon ion-ios-paper"></i><a href="/privacy"><%= translate(locale, "View privacy policy.") %></a></li>
					</ul>
					</div>
				</div>
 </div>
 </div>
 <div class="pure-u-1 pure-u-md-2-24">
 <p align="center">
 </p>
 </div>
 </div>
 <script src="/js/handlers.js?v=<%= ASSET_COMMIT %>"></script>
 <script src="/js/themes.js?v=<%= ASSET_COMMIT %>"></script>
 <% if env.get? "user" %>
 <script src="/js/sse.js?v=<%= ASSET_COMMIT %>"></script>
 <script id="notification_data" type="application/json">
 <%=
 {
 "upload_text" => HTML.escape(translate(locale, "`x` uploaded a video")),
 "live_upload_text" => HTML.escape(translate(locale, "`x` is live"))
 }.to_pretty_json
 %>
 </script>
 <script src="/js/notifications.js?v=<%= ASSET_COMMIT %>"></script>
 <% end %>
</body>
</html>

Original template.ecr file:

<!DOCTYPE html>
<html lang="<%= env.get("preferences").as(Preferences).locale %>">

<head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <%= yield_content "header" %>
 <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=<%= ASSET_COMMIT %>">
 <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=<%= ASSET_COMMIT %>">
 <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=<%= ASSET_COMMIT %>">
 <link rel="manifest" href="/site.webmanifest?v=<%= ASSET_COMMIT %>">
 <link rel="mask-icon" href="/safari-pinned-tab.svg?v=<%= ASSET_COMMIT %>" color="#575757">
 <meta name="msapplication-TileColor" content="#575757">
 <meta name="theme-color" content="#575757">
 <link title="Invidious" type="application/opensearchdescription+xml" rel="search" href="/opensearch.xml">
 <link rel="stylesheet" href="/css/pure-min.css?v=<%= ASSET_COMMIT %>">
 <link rel="stylesheet" href="/css/grids-responsive-min.css?v=<%= ASSET_COMMIT %>">
 <link rel="stylesheet" href="/css/ionicons.min.css?v=<%= ASSET_COMMIT %>">
 <link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>">
</head>

<% locale = LOCALES[env.get("preferences").as(Preferences).locale]? %>
<% dark_mode = env.get("preferences").as(Preferences).dark_mode %>

<body class="<%= dark_mode.blank? ? "no" : dark_mode %>-theme">
 <span style="display:none" id="dark_mode_pref"><%= env.get("preferences").as(Preferences).dark_mode %></span>
 <div class="pure-g">
 <div class="pure-u-1 pure-u-md-2-24"></div>
 <div class="pure-u-1 pure-u-md-20-24">
 <div class="pure-g navbar h-box">
 <div class="pure-u-1 pure-u-md-4-24">
 <a href="/" class="index-link pure-menu-heading">Invidious</a>
 </div>
 <div class="pure-u-1 pure-u-md-12-24 searchbar">
 <form class="pure-form" action="/search" method="get">
 <fieldset>
 <input type="search" style="width:100%" name="q" placeholder="<%= translate(locale, "search") %>" value="<%= env.get?("search").try {|x| HTML.escape(x.as(String)) } %>">
 </fieldset>
 </form>
 </div>
 <div class="pure-u-1 pure-u-md-8-24 user-field">
 <% if env.get? "user" %>
 <div class="pure-u-1-4">
 <a id="toggle_theme" href="/toggle_theme?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
 <% if env.get("preferences").as(Preferences).dark_mode == "dark" %>
 <i class="icon ion-ios-sunny"></i>
 <% else %>
 <i class="icon ion-ios-moon"></i>
 <% end %>
 </a>
 </div>
 <div class="pure-u-1-4">
 <a id="notification_ticker" title="<%= translate(locale, "Subscriptions") %>" href="/feed/subscriptions" class="pure-menu-heading">
 <% notification_count = env.get("user").as(User).notifications.size %>
 <% if notification_count > 0 %>
 <span id="notification_count"><%= notification_count %></span> <i class="icon ion-ios-notifications"></i>
 <% else %>
 <i class="icon ion-ios-notifications-outline"></i>
 <% end %>
 </a>
 </div>
 <div class="pure-u-1-4">
 <a title="<%= translate(locale, "Preferences") %>" href="/preferences?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
 <i class="icon ion-ios-cog"></i>
 </a>
 </div>
 <div class="pure-u-1-4">
 <form action="/signout?referer=<%= env.get?("current_page") %>" method="post">
 <input type="hidden" name="csrf_token" value="<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>">
 <a class="pure-menu-heading" href="#">
 <input style="all:unset" type="submit" value="<%= translate(locale, "Log out") %>">
 </a>
 </form>
 </div>
 <% else %>
 <div class="pure-u-1-3">
 <a id="toggle_theme" href="/toggle_theme?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
 <% if env.get("preferences").as(Preferences).dark_mode == "dark" %>
 <i class="icon ion-ios-sunny"></i>
 <% else %>
 <i class="icon ion-ios-moon"></i>
 <% end %>
 </a>
 </div>
 <div class="pure-u-1-3">
 <a title="<%= translate(locale, "Preferences") %>" href="/preferences?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
 <i class="icon ion-ios-cog"></i>
 </a>
 </div>
 <% if CONFIG.login_enabled %>
 <div class="pure-u-1-3">
 <a href="/login?referer=<%= env.get?("current_page") %>" class="pure-menu-heading">
 <%= translate(locale, "Log in") %>
 </a>
 </div>
 <% end %>
 <% end %>
 </div>
 </div>

 <% if CONFIG.banner %>
 <div class="h-box">
 <h3><%= CONFIG.banner %></h3>
 </div>
 <% end %>

 <%= content %>

 <div class="footer">
 <div class="pure-g">
 <div class="pure-u-1 pure-u-md-1-3">
 <a href="https://github.com/iv-org/invidious">
 <%= translate(locale, "Released under the AGPLv3 by Omar Roth.") %>
 </a>
 </div>
 <div class="pure-u-1 pure-u-md-1-3">
 <i class="icon ion-ios-wallet"></i>
 BTC: <a href="bitcoin:bc1qfhe7rq3lqzuayzjxzyt9waz9ytrs09kla3tsgr">bc1qfhe7rq3lqzuayzjxzyt9waz9ytrs09kla3tsgr</a>
 </div>
 <div class="pure-u-1 pure-u-md-1-3">
 <i class="icon ion-ios-wallet"></i>
 XMR: <a href="monero:41nMCtek197boJtiUvGnTFYMatrLEpnpkQDmUECqx5Es2uX3sTKKWVhSL76suXsG3LXqkEJBrCZBgPTwJrDp1FrZJfycGPR">Click here</a>
 </div>
 <div class="pure-u-1 pure-u-md-1-3">
 <a href="https://github.com/iv-org/documentation">Documentation</a>
 </div>
 <div class="pure-u-1 pure-u-md-1-3">
 <i class="icon ion-logo-javascript"></i>
 <a rel="jslicense" href="/licenses">
 <%= translate(locale, "View JavaScript license information.") %>
 </a>
 /
 <i class="icon ion-ios-paper"></i>
 <a href="/privacy">
 <%= translate(locale, "View privacy policy.") %>
 </a>
 </div>
 <div class="pure-u-1 pure-u-md-1-3">
 <i class="icon ion-logo-github"></i>
 <%= translate(locale, "Current version: ") %> <%= CURRENT_VERSION %>-<%= CURRENT_COMMIT %> @ <%= CURRENT_BRANCH %>
 </div>
 </div>
 </div>
 </div>
 <div class="pure-u-1 pure-u-md-2-24"></div>
 </div>
 <script src="/js/handlers.js?v=<%= ASSET_COMMIT %>"></script>
 <script src="/js/themes.js?v=<%= ASSET_COMMIT %>"></script>
 <% if env.get? "user" %>
 <script src="/js/sse.js?v=<%= ASSET_COMMIT %>"></script>
 <script id="notification_data" type="application/json">
 <%=
 {
 "upload_text" => HTML.escape(translate(locale, "`x` uploaded a video")),
 "live_upload_text" => HTML.escape(translate(locale, "`x` is live"))
 }.to_pretty_json
 %>
 </script>
 <script src="/js/notifications.js?v=<%= ASSET_COMMIT %>"></script>
 <% end %>
</body>

</html>

I'll do a proper fork if anyone from invidious cries about this not being enough.

1

Comments

You must log in or register to comment.

There's nothing here…