mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 06:48:33 +01:00
Merge branch 'main' into main
This commit is contained in:
commit
44f462a65b
3 changed files with 72 additions and 15 deletions
|
@ -941,7 +941,7 @@ display: block; !important;" autoplay controls
|
|||
|
||||
<% } %>
|
||||
|
||||
<div class="pwp" style="display: flex;justify-content: center;align-items: center;flex-direction: row; column-gap: 3px;margin-top: -1em;max-height: 16px;" align="center">
|
||||
<div class="pwp" style="display: flex;justify-content: center;align-items: center;flex-direction: row; column-gap: 3px;margin-top: auto;max-height: 16px;" align="center">
|
||||
|
||||
<% if (!qua) { %>
|
||||
|
||||
|
@ -1732,7 +1732,8 @@ if (userID) {
|
|||
<!-- app.js -->
|
||||
<!-- app.js -->
|
||||
|
||||
<!-- Ambient Mode, for PokeTube --><% if(!IsOldWindows) { %>
|
||||
<!-- Ambient Mode, for PokeTube -->
|
||||
<% if(IsOldWindows) { %>
|
||||
<script>
|
||||
console.error("[AMBIENT MODE] error_device_not_supported")
|
||||
</script>
|
||||
|
@ -2063,7 +2064,7 @@ a {
|
|||
</div>
|
||||
<div class="video-title" style="font-family:'Inter';white-space:yes;padding: 10px;background: #0009;margin-bottom: 6px;margin-left: 6px;margin-right: 12px;border-radius: 15px;margin-top: 4px;">
|
||||
|
||||
<%=inv_vid.title%>
|
||||
<%=inv_vid.title%> <br>
|
||||
<a id="language-button" href="#desc-container" style="color: pink;
|
||||
margin: 0;
|
||||
font-size: 13px;margin:0;padding:0;white-space: nowrap;
|
||||
|
@ -2084,7 +2085,7 @@ font-size: 13px;margin:0;padding:0;white-space: nowrap;
|
|||
<%=k.Video.Channel.Name%></a>
|
||||
|
||||
<div class="subscriber-count" style="write-space:nowraap">
|
||||
<%= k.Video.Channel.subscriberCount %>
|
||||
<%= k.Video.Channel.subscriberCount.replace("subscribers", "Subs") %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -2319,7 +2320,7 @@ font-size: 13px;margin:0;padding:0;white-space: nowrap;
|
|||
<div>
|
||||
|
||||
|
||||
<div style="background:#272727;padding: 5px;margin-top: 12px;border-radius: 11px;font-family: 'PokeTube Flex';font-stretch: extra-expanded;font-weight: 700;">
|
||||
<div class="nerddd" style="background:#272727;padding: 5px;margin-top: 12px;border-radius: 11px;font-family: 'PokeTube Flex';font-stretch: extra-expanded;font-weight: 700;">
|
||||
<%-String(channelurlfixer(inv_vid.descriptionHtml)).replace(/\n/g, " <br> ").replace(/twitter\.com/g, "nitter.net").replace(/reddit\.com/g, "teddit.net") %>
|
||||
|
||||
<div style="margin: 10px;">
|
||||
|
@ -2367,6 +2368,21 @@ the channels social media accounts!
|
|||
<img src="https://p.poketube.fun/https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/52704940-684c-41e8-b0de-cca642fa39f8.image.png?v=1693429793193" class="loaded" style="width: 22px;height: 23px;vertical-align: -7px;"><a style="margin: 1px;" href="https://instagram.com/<%- instagram.name %>"> <%- instagram.name %></a>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<% if (!twitter) { %>
|
||||
<% if (!discord) { %>
|
||||
<% if (!reddit) { %>
|
||||
<% if (!twitch) { %>
|
||||
|
||||
<% if (!instagram) { %>
|
||||
<div style="margin-top: 10px;">
|
||||
Nyo connections found ;_;
|
||||
</div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<% } %> <% } %>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -2415,14 +2431,54 @@ the channels social media accounts!
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<div style="background: #0009;width: fit-content;padding: 5px;border-radius: 6px;">
|
||||
<div style="color:#fff;border:solid 0.5px gray;background: #0009;width: fit-content;padding: 5px;border-radius: 4px;height:2em">
|
||||
<a href="/channel?id=<%=video?.Channel.id || k.Video.Channel.id%>" >
|
||||
View Channel
|
||||
</a> </div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.nerddd {
|
||||
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
white-space: pre-wrap; /* css-3 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
white-space: -webkit-pre-wrap; /* Newer versions of Chrome/Safari*/
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
}
|
||||
</style>
|
||||
<div class="nerddd" style="padding:10px;background: #272727;margin-top:10px;border-radius: 11px;">
|
||||
<div class="video-title" style="color:var(--text-color);font-family:var(--text-font-primary);;font-weight:var(--text-header-weight);font-stretch: extra-expanded;margin-top: 10px;margin-bottom: 10px;">Stats for 🤓 </div>
|
||||
|
||||
Video id : <%=inv_vid.videoId%> <br>
|
||||
ImmersiveAmbientModecolor: <% if (lightOrDark(color) == "light") { %><%=color%> (color 1)<% } %><% if (lightOrDark(color) == "dark") { %> <%=color2%> (color 2) <% } %> <br>
|
||||
Video Format :<% if (!qua) { %> 22 (720p) openh264 ( https://github.com/cisco/openh264) mp4a.40.2 | 44100Hz <% } %>
|
||||
<% if (qua === "medium") { %> 18 (320p) openh264 (https://github.com/cisco/openh264) mp4a.40.2 | 44100Hz <% } %> <br>
|
||||
PokeTubeEncryptID: <%=sha384(inv_vid.videoId)%> <br>
|
||||
<% if (isvidious) { %>
|
||||
|
||||
Proxy : <%= u.replace("https://","") %> - refresh the page to change the proxy location<br>
|
||||
<% } %>
|
||||
<% if (!isvidious) { %>
|
||||
|
||||
Proxy : tube.kuylar.dev - refresh the page to change the proxy location<br>
|
||||
<% } %>
|
||||
Date : <%- Date.now() %> - <%- useragent.os.replace("Linux", "GNU/Linux") %> on <%- useragent.browser %> <br>
|
||||
<% if (isvidious) { %>
|
||||
|
||||
Mystery text : <%=btoa(inv_vid.videoId + " i " + " lov " + " u " + "mobile "+ u.replace("https://","") ) %> <br>
|
||||
<% } %>
|
||||
<% if (!isvidious) { %>
|
||||
|
||||
Mystery text : <%=btoa(inv_vid.videoId + " i " + " lov " + " u " + "tube.kuylar.dev" ) %> <br>
|
||||
<% } %>
|
||||
|
||||
143 : true <br>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -2806,10 +2862,7 @@ timeLinks.forEach(link => {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Set up an interval to check every second
|
||||
setInterval(checkAndToggleRecommended, 1000);
|
||||
|
||||
|
||||
function removeParam(paramName) {
|
||||
|
||||
let searchParams = new URLSearchParams(window.location.search);
|
||||
|
@ -2854,7 +2907,8 @@ if (/[?&]autoplay=/.test(location.search)) {
|
|||
function autoplaynextvideo(e) {
|
||||
location.href = "/watch?v=<%- k.Video.Recommendations.Video[0].id%>&autoplay=<%-btoa("1f739d935676111cfff4b4693e3816e664797050" + k.Video.Recommendations.Video[0].id ) %>"
|
||||
}
|
||||
}var anchor = document.getElementById("sub");
|
||||
}
|
||||
var anchor = document.getElementById("sub");
|
||||
|
||||
// Check if there's a user ID in localStorage
|
||||
var userID = localStorage.getItem("UserID");
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const express = require("express");
|
||||
const fetch = require("node-fetch");
|
||||
const { URL } = require("url");
|
||||
const { Readable } = require("node:stream");
|
||||
|
||||
// Array of hostnames that will be proxied
|
||||
const URL_WHITELIST = [
|
||||
|
@ -58,6 +59,8 @@ app.use(function (req, res, next) {
|
|||
* @param {express.Response} res
|
||||
*/
|
||||
const proxy = async (req, res) => {
|
||||
const { fetch } = await import("undici")
|
||||
|
||||
try {
|
||||
let url;
|
||||
|
||||
|
@ -80,7 +83,7 @@ const proxy = async (req, res) => {
|
|||
method: req.method,
|
||||
});
|
||||
|
||||
f.body.pipe(res);
|
||||
Readable.fromWeb(f.body).pipe(res);
|
||||
} catch (e) {
|
||||
console.log(`==> Error: ${e}`);
|
||||
res.status(500).send("Internal server error");
|
||||
|
|
|
@ -48,11 +48,11 @@ class PokeTubeDislikesAPIManager {
|
|||
|
||||
|
||||
try {
|
||||
const engagement = await fetch(fallbackUrl).then((res) => res.json());
|
||||
const engagement = await fetch(apiUrl).then((res) => res.json());
|
||||
return engagement;
|
||||
} catch {
|
||||
try {
|
||||
const engagement = await fetch(apiUrl).then((res) => res.json());
|
||||
const engagement = await fetch(fallbackUrl).then((res) => res.json());
|
||||
return engagement;
|
||||
} catch {
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue