Merge pull request 'main' (#6) from ashley/poke:main into main

Reviewed-on: https://codeberg.org/Korbs/poke/pulls/6
This commit is contained in:
Korbs 2024-05-24 03:26:58 +00:00
commit cf048ce7d8
6 changed files with 82 additions and 23 deletions

View file

@ -831,7 +831,7 @@ marquee {
}
@media screen and (max-height: 840px) {
.video-player-container {
.theatermodeon {
max-height: 10% !important;
}
}

View file

@ -896,8 +896,15 @@ white-space: nowrap;text-decoration: none;" href="/feeds/videos.xml?channel_id=<
<% } %>
<% if (tab === "shorts") { %>
<% if (Array?.isArray(tj?.videos)) { %>
<% if (tj?.videos[0]) { %>
<% if (turntomins(tj?.videos[0]?.lengthSeconds) != "aN:aN" ) { %>
<a href="/channel?id=<%=ID%>" class="tab" style="color:#cfe2f3;">Videos</a>
<% } %>
<% } %>
<% } %>
<% if (Array?.isArray(shorts?.videos)) { %>
<a href="/channel?id=<%=ID%>&tab=shorts" class="tab active shr">Shorts</a>
@ -1240,7 +1247,10 @@ width: fit-content;
<div class="video-grid" >
<% if (!Array.isArray( tj?.videos)) { %>
<p> No content on this channel :c <% if (Array?.isArray( shorts.videos)) { %> try <a href="/channel?id=<%=ID%>&tab=shorts"> Try Looking at shorts maybe lol :p</a> </p>
<% } %>
<% } %>
<% if (Array.isArray( tj?.videos)) { %>
@ -1254,9 +1264,10 @@ width: fit-content;
</a>
<% }) %>
<% } %>

View file

@ -10,8 +10,7 @@
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@ -23,7 +22,7 @@
<html lang="en">
<head>
<title>Poke | The Ultimate Privacy App!</title>
<title>Poke | The privacy app of your dreams!</title>
<meta charset="UTF-8">
<meta name="theme-color" content="#414161">
<meta http-equiv="content-language" content="en-us">
@ -34,11 +33,11 @@
<link href=/css/yt-ukraine.svg?v=6 rel=icon>
<link rel="manifest" href="/manifest.json">
<meta name="darkreader-lock"> <!-- tells dark reader that the site has a dark theme and to turn itself off -->
<meta content="▶▶ Poke - The Ultimate privacy App!" property=og:title>
<meta content="Watch Silly videos or search the interwebs while being anonymous on poke!"
<meta content="▶▶ Poke - The privacy app of your dreams!" property=og:title>
<meta content="Poke is a free software youtube front-end, search engine, translator, map app and even more!! Watch silly videos, search stuff on the internet and do all of that and more anonymously in this all-in-one privacy app!!!"
property=twitter:description>
<meta
content="https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/aa70111e-5bcd-4379-8b23-332a33012b78.image.png?v=1701898829884"
content="https://cdn.glitch.global/302c6ee0-629f-453b-9024-bad1f8d7be36/poke.png?v=1716216428745"
property="og:image" />
<meta content="summary_large_image" name="twitter:card" />
<% if(isOldWindows) { %>
@ -60,6 +59,26 @@
overflow-x: hidden;
}
.discover-video-button > a {
border: 2px white solid;
border-radius: 3rem;
padding: 12px 1em 12px 12px;
display: flex;
align-items: center;
width: 146px;
text-align: center;
margin: auto;
color: #fff;
margin-bottom: 2em;
margin-top: 26px;
text-decoration: none;
}
.discover-video-button > a:hover {
filter: brightness(0.8);
}
.subtitle {
text-align: center;
color: #FFFF00;
@ -87,21 +106,20 @@
<body>
<%- include('./partials/header.ejs') %>
<video id="HD-BG" playsinline autoplay muted loop><source src="/bg-480.webm" type="video/webm"/></video>
<video playsinline autoplay muted loop><source src="/bg-480.webm" type="video/webm"/></video>
<div class="landing">
<h1>The Ultimate Privacy App</h1>
<p style="max-width: 800px;"> Be Anonymous watching epic videos, searching
thingys on the interwebs and listening to music on poketube - the free yt front end thats focused on ur privacy!!
</p><br>
<h1>PRIVACY APP OF YOUR DREAMS</h1>
<p style="max-width: 800px;">Poke is a free software youtube front-end, search engine, translator, map app and even more!!1!! Watch silly videos, search stuff on the internet and do all of that and more anonymously in this all-in-one privacy app!!!1! :3</p><br>
<a style="color: white; text-decoration: underline;" href="https://buildpalestine.com/2021/05/15/trusted-organizations-to-donate-to-palestine">Help & Support Palestine</a> - <a style="color: white; text-decoration: underline;" href="https://war.ukraine.ua/donate"> Donate to Ukraine </a>
<img src="/static/poke-chan-outfit-a.png" title="Poke-chan sitting :3">
<div style="display: flex; gap: 12px;">
<img src="/static/poke-screnshot-v2.png" />
<img src="/static/Poke-Mobile.jpg" />
</div>
</div>
<!-- Icons are from Iconoir -->
<h1 style="margin-left: auto;margin-right: auto;text-align: center;margin-bottom: -1em;margin-top: 1em;"> Why Choose Poke Lol? </h1>
<div class="new-feature-set">
<div class="feature-set">
<div class="feature-set-title">
@ -182,7 +200,11 @@
primary_link='https://codeberg.org/ashley/poke'
)%>
</div>
<h1 style="font-size: xx-large;text-align: center;">So, wha ru waiting 4? </h1>
<div class="discover-video-button">
<a href="/app">Start Discovering! :3</a>
</div>
<script>
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0-or-later

View file

@ -375,7 +375,7 @@ a[data-onclick="jump_to_time"] {
<link href="/css/watch.main.css?v=9893448" rel=stylesheet>
<link href="/css/watch-util.css?v=9893448" rel=stylesheet>
<link href="/css/watch-navbar.css?v=9893448" rel=stylesheet>
<link href="/css/poketube.css?v=98934844" rel=stylesheet>
<link href="/css/poketube.css?v=9489344844" rel=stylesheet>
<% if (k.Video.Channel.Name == "7clouds") { %>
<style>
@ -1075,7 +1075,7 @@ Privacy
</label>
<a onclick="if(document.querySelector('.watch-page').style.display === 'grid') {document.querySelector('.watch-page').style.display = 'flex'} else {document.querySelector('.watch-page').style.display = 'grid'}" class="theather"><i class="fa-sharp fa-light fa-up-right-and-down-left-from-center"></i> Theater</a>
<a onclick="toggleTheaterMode()"" class="theather"><i class="fa-sharp fa-light fa-up-right-and-down-left-from-center"></i> Theater</a>
<% if (inv.comments) { %>
<input type="checkbox" class="hj" id="j" style="display:none">
@ -1785,7 +1785,7 @@ Recommended Videos
history.replaceState(null, '', newUrl);
}
}
<% if (Array.isArray(inv_vid.recommendedVideos) && inv_vid.recommendedVideos.length > 1) { %>
let checkbox = document.getElementById("continue");
@ -1859,6 +1859,22 @@ if (/[?&]autoplay=/.test(location.search)) {
</script>
<script>
function toggleTheaterMode() {
var videoPlayerContainer = document.querySelector('.video-player-container');
if (videoPlayerContainer.classList.contains('theatermodeon')) {
videoPlayerContainer.classList.remove('theatermodeon');
} else {
videoPlayerContainer.classList.add('theatermodeon');
}
var watchPage = document.querySelector('.watch-page');
if (watchPage.style.display === 'grid') {
watchPage.style.display = 'flex';
} else {
watchPage.style.display = 'grid';
}
}
const languageCode = localStorage.getItem("Language");
const regionCode = localStorage.getItem("Region");
const currentURL = location.href;

View file

@ -62,6 +62,7 @@ summary:hover{
</style>
<link href=https://p.poketube.fun/https://site-assets.fontawesome.com/releases/v6.1.1/css/all.css rel=stylesheet>
<link href="https://p.poketube.fun/https://cdn.jsdelivr.net/npm/ionicons@4.5.0-0/dist/css/ionicons.min.css" rel=stylesheet>
<style>
@ -545,8 +546,11 @@ font-weight: 1000;
><%= x.title %></a>
<div style="display: flex; flex-direction: column; row-gap: 8px;font-weight:bold">
<a href="/watch?v=<%= x.videoId %>"><span><%= x.viewCountText %></span> <span>•</span> <span><%= x.publishedText %></span></a>
<a href="/channel?id=<%= x.authorId %>"><%=x.author %></a>
<a href="/download?v=<%= x.videoId %>" style="display: flex;align-self: end;"><i class="fa-light fa-download" style="display: flex;align-self: end;margin-top: 3.1em;font-size: 19px;padding: 5px;border-radius: 18px;margin-left: 16em;"></i></a>
<a href="/channel?id=<%= x.authorId %>"><%=x.author %><% if (x?.authorVerified) { %>
<i class="icon ion ion-md-checkmark-circle" title="verified channel"></i><% } %>
</a>
<a href="/download?v=<%= x.videoId %>" style="background: #333;width: 7.6em;border-radius: 18px;"><div style="display: flex;">
<i class="fa-light fa-download" style="display: flex;font-size: 16px;padding: 5px;border-radius: 18px;margin-left: 2px;"> </i><span style="margin-top: 6px;">Download</span></div> </a>
</div>
</div>
</div>

View file

@ -190,13 +190,14 @@ module.exports = function (app, config, renderTemplate) {
const { fetch } = await import("undici");
const search = await fetch(
`https://4get.sudovanilla.com/api/v1/web?s=${query}`
`https://4get.sudovanilla.org/api/v1/web?s=${query}`
);
const web = getJson(await search.text());
if (req.query.lucky === "true") {
res.redirect("/im-feeling-lucky?query=" + query);
}
var uaos = req.useragent.os;
var IsOldWindows;
@ -268,6 +269,7 @@ module.exports = function (app, config, renderTemplate) {
if (ID.endsWith("@poketube.fun")) {
ID = ID.slice(0, -"@poketube.fun".length);
}
const tab = req.query.tab;
const cache = {};
@ -366,6 +368,10 @@ module.exports = function (app, config, renderTemplate) {
" <br> "
);
const dnoreplace = about?.Description.toString();
renderTemplate(res, req, "channel.ejs", {
ID,