2022-08-12 20:02:07 +02:00
<!--
2022-06-08 16:13:19 +02:00
This Source Code Form is subject to the terms of the GNU General Public License:
2023-03-22 18:28:36 +01:00
Copyright (C) 2021-2023 POKETUBE (https://github.com/iamashley0/poketube)
2022-06-08 16:13:19 +02:00
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/.
-->
<!DOCTYPE html>
<head>
2022-10-20 16:39:58 +02:00
<head>
2022-06-08 18:05:05 +02:00
<title>Searching <%=q%> - PokeTube</title>
2022-08-15 11:09:02 +02:00
<link href=/css/yt-ukraine.svg?v=6 rel=icon>
2022-09-01 14:54:15 +02:00
<link href="https://fonts.poketube.fun/css/fonts.css" rel=stylesheet>
2022-06-08 16:13:19 +02:00
<link href=/css/app-cdn.min.css rel=stylesheet>
<link href=/css/app.main.css rel=stylesheet>
2022-08-15 11:09:02 +02:00
<link href=/css/search.main.css rel=stylesheet>
2022-08-12 02:20:36 +02:00
<link href=/css/watch.main.css rel=stylesheet>
2022-09-17 20:46:58 +02:00
<link rel="search" type="application/opensearchdescription+xml" title="PokeTube" href="https://poketube.fun/api/opensearch" />
2022-10-05 17:45:58 +02:00
<meta content="Searching <%=q%> - PokeTube" property=og:title>
<% if (q == "do the harlem shake") { %>
<meta content="DO THE HARLEM SHAKE" property=twitter:description>
<% } %>
<% if (q != "do the harlem shake") { %>
<meta content="Ur Searching <%=q%> on PokeTube! it has total of <%=j.Search.estimatedResults.toLocaleString()%> Results holy crap thats alot" property=twitter:description>
<% } %>
2022-11-06 14:14:01 +01:00
<meta content="https://cdn.glitch.global/43b6691a-c8db-41d4-921c-8cf6aa0d9108/17a7fa1d-cdf9-4b73-9686-21e62c7fb285.image.png?v=1667739586452" property=og:image>
2022-10-05 17:45:58 +02:00
<meta content=summary_large_image name=twitter:card>
2022-11-06 14:14:01 +01:00
<meta content="#1a1a1a" name="theme-color">
2022-06-08 16:13:19 +02:00
<style>
a.class:hover {
text-decoration:underline;
font-weight:bold
}
summary{
color:blue;
}
summary:hover{
color:red;
}
2022-08-12 15:46:36 +02:00
* {
2022-10-20 16:39:58 +02:00
color:#fff;
}
nav {
background:#111111
}
2023-01-31 21:31:18 +01:00
2022-07-07 13:34:13 +02:00
2022-10-20 16:39:58 +02:00
</style>
<link href=https://p.poketube.fun/https://site-assets.fontawesome.com/releases/v6.1.1/css/all.css rel=stylesheet>
2022-08-12 15:46:36 +02:00
2022-08-12 02:20:36 +02:00
<style>
2023-01-31 21:31:18 +01:00
.info > div {
font-family:Ubuntu, sans-serif;
}
2023-03-26 20:14:43 +02:00
#fetch-spinner {
position: fixed;
top: 10px;
right: 10px;
z-index: 9999;
width: 20px;
height: 20px;
border-radius: 50%;
border-top: 2px solid #fff;
border-right: 2px solid #fff;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
#fetch-text {
position: fixed;
top: 10px;
right: 40px;
color: #fff;
font-weight: bold;
text-transform: uppercase;
z-index: 9999;
}
.hide {
display: none;
}
2022-08-12 15:46:36 +02:00
.app{
2022-10-20 16:39:58 +02:00
/* background-image:url("/css/head.svg"); */
2022-09-01 13:45:38 +02:00
background-size: cover;
2022-09-01 13:30:39 +02:00
background-repeat: no-repeat;
2022-08-12 15:46:36 +02:00
}
2022-10-04 22:09:46 +02:00
.shake {
animation: linear infinite alternate;
animation-name: DOTHESHAKE;
animation-duration: 1.5s;
}
@-webkit-keyframes DOTHESHAKE {
0% {
left: 0;
transform: translateX(0);
}
100% {
left: 900%;
transform: translateX(-90%);
}
}
2022-08-12 15:46:36 +02:00
/* nice classname am i rigth */
.discover-some-bitches{
text-align: center;
width: 673px;
margin: auto;
}
2022-10-20 16:39:58 +02:00
2022-11-18 12:14:48 +01:00
.shelf {
max-width: 51em;
margin: auto;
display: flex;
flex-direction: column;
row-gap: 16px;
padding: 16px;
background: #111111;
border: #333333 solid;
border-radius: 19px;
margin-top: 1em;
}
2022-10-20 16:39:58 +02:00
@font-face {
font-family: 'Ginto Nord';
font-weight: 800;
src:url('https://p.poketube.fun/https://cdn.statically.io/gh/brecert/discord-quote-generator/main/Ginto-Nord-800.woff') format("woff");
}
2022-11-06 14:24:37 +01:00
.video-list > .video {
background: #111;
padding: 10px;
border-radius: 10px;
border: #333 solid;
}
2022-08-12 02:20:36 +02:00
</style>
2022-11-06 11:36:01 +01:00
<style>section p {
font-family:Whitney, Helvetica Neue, Helvetica, Arial, sans-serif;
font-weight:400;
color:#fff;
font-size:16px;
line-height:24px;
margin-top:12px
}
2022-11-18 12:14:48 +01:00
.wiki > p {
margin-top: -2em;
}
2022-11-20 09:46:15 +01:00
* {
text-rendering: auto;
}
2022-11-06 11:36:01 +01:00
.sticky-top {
position: sticky;
top: 0px;
z-index: 999;
}
.responsive {
width: 100%;
overflow-x: auto;
}
.tabs {
display: table;
font-family:inter;
border-collapse: separate;
table-layout: auto;
}
2023-02-13 12:33:23 +01:00
.video:hover{
border:solid;
}
2022-11-06 11:36:01 +01:00
.tabs.tabs-center {
margin: auto;
}
.tabs.tabs-justify {
width: 100%;
table-layout: fixed;
}
.tabs a.tab {
position: relative;
display: table-cell;
transition: all ease 0.3s;
padding: 1em 1.6em;
transform: translate3d(0, 0, 0);
color: #fff;
white-space: nowrap;
cursor: pointer;
}
.tabs a.tab:hover {
color: #3cb4fa;
}
2023-03-26 20:14:43 +02:00
2022-11-06 11:36:01 +01:00
.tabs a.tab:after {
transition: all 0.3s cubic-bezier(1, 0, 0, 1);
will-change: transform, box-shadow, opacity;
position: absolute;
content: '';
height: 3px;
bottom: 0px;
left: 0px;
right: 0px;
border-radius: 3px 3px 0px 0px;
background: #9fdafd;
box-shadow: 0px 4px 10px 3px rgba(60, 180, 250, .15);
opacity: 0;
transform: scale(0, 1);
}
.tabs a.tab.active {
color: #fff;
}
.tabs a.tab.active:after {
opacity: 1;
transform: scale(1, 1);
}
2023-03-12 08:29:19 +01:00
2023-03-06 20:58:37 +01:00
.loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
}
.loading .spinner {
display: inline-block;
border: 5px solid rgba(255, 255, 255, 0.2);
border-top-color: #fff;
border-radius: 50%;
animation: spin 1s ease-in-out infinite;
width: 50px;
height: 50px;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
2023-03-12 08:29:19 +01:00
.a {
display:none;
}
2022-11-06 11:36:01 +01:00
</style>
2022-06-08 18:05:05 +02:00
</head>
2023-05-16 20:12:39 +02:00
<% if(IsOldWindows) { %>
<style>
.title.max-lines-2 {
font-family:"Inter " !important;
}
</style>
<% } %>
2022-06-08 18:05:05 +02:00
2022-06-08 16:13:19 +02:00
<body>
2022-09-01 14:54:15 +02:00
2022-08-12 20:02:07 +02:00
2022-10-04 22:09:46 +02:00
<div class="app">
2022-08-12 15:46:36 +02:00
<nav>
2022-10-20 16:39:58 +02:00
<div class=left>
2022-10-04 22:09:46 +02:00
2022-10-20 16:39:58 +02:00
<% if (q == "do the harlem shake") { %>
2022-10-04 22:09:46 +02:00
<a class="shake" href="/143" style=font-family:Inter,sans-serif;color:#fff> <img style="transform: scale(1.3);width:8.5em;display: block;margin-left: auto;margin-right: auto;" src="/css/logo.svg?v=5"></a>
<audio class="player" autoplay loop controls src="https://p.poketube.fun/https://tube.kuylar.dev/proxy/media/8vJiSSAMNWw/18?e=ca0ac04022e782540e1f2fe4d6c2994949f33184ccc07568b4b1d7c93dfebd28119cb7b9e8b5db12039ba553ed861736ca0ac04022e782540e1f2fe4d6c2994949f33184ccc07568b4b1d7c93dfebd28119cb7b9e8b5db12039ba553ed861736Piwikd74c7f459daf669799074a22bcf7d79bb66e03dbd9899a2089e0bee8ed383f0c3b928c4477a42208cbd69a77549e3451
" style="display:none;">
<script>
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0-or-later
setTimeout(function () {
const video = document.getElementsByClassName("video")
for(var counter = 0; counter < video.length; counter++){
video[counter].classList.add("shake");
}
}, 13700)
// @license-end
</script>
<% } %>
<% if (q != "do the harlem shake") { %>
2022-12-27 00:54:21 +01:00
<% if (q != "want you gone") { %> <% if (q != "portal 2 ending") { %> <% if (q != "credits") { %> <% if (q != "glados") { %>
2022-08-12 15:46:36 +02:00
<a class="class" href="/143" style=font-family:Inter,sans-serif;color:#fff> <img style="transform: scale(1.3);width:8.5em;display: block;margin-left: auto;margin-right: auto;" src="/css/logo.svg?v=5"></a>
2022-12-27 00:54:21 +01:00
<% } %>
<% } %>
2022-10-04 22:09:46 +02:00
<% } %>
2022-12-27 00:54:21 +01:00
<% } %>
<% if (q == "want you gone" || q == "portal 2 ending" || q == "credits" || q == "glados ") { %>
<a class="class" href="/credits" style=font-family:Inter,sans-serif;color:#fff> <img style="transform: scale(1.3);width:8.5em;display: block;margin-left: auto;margin-right: auto;" src="/css/logo-orng.svg?v=5"></a>
<% } %>
<% } %>
2022-10-20 16:39:58 +02:00
</div>
<div class="middle">
<div class="search">
<form action=/search><input class=search-bar autocomplete="on" value="<%=q%>" id=fname name=query style="color:#fff;font-family:Inter,sans-serif;border-radius: 8px;">
<button class="btn btn-success" type=submit><i class="fa-light fa-search"></i></button>
</form>
<img src="https://search-metrics.poketube.fun/t/rep.gif" style="border:0;width: 0;visibility: hidden;">
</div> </div>
2023-03-12 08:29:19 +01:00
2022-08-12 15:46:36 +02:00
<div class=right>
2023-03-12 08:29:19 +01:00
<button title="Play/Pause Ambient music" class="a" id="audioButton" onclick="toggleAudio()">
<i id="audioIcon" class="fas fa-pause"></i>
</button>
2022-08-12 15:46:36 +02:00
<a href="/domains"><i style="display: block;margin-left: auto;margin-right: auto;" class="fa-light fa-server"></i> </a>
<a href="/privacy"><i class="fa-light fa-shield"></i></a>
<a href="/video/upload?from="><i class="fa-light fa-video"></i></a>
<a href="https://github.com/iamashley0/poketube/issues"><i class="fa-light fa-bug"></i></a>
2022-06-08 16:13:19 +02:00
</div>
2022-08-12 15:46:36 +02:00
2022-10-20 16:39:58 +02:00
</nav>
2022-08-12 15:46:36 +02:00
2022-08-12 20:02:07 +02:00
2022-08-12 15:46:36 +02:00
</div>
2022-08-12 20:02:07 +02:00
2022-10-20 16:39:58 +02:00
2022-08-12 15:46:36 +02:00
</div>
2022-10-04 22:09:46 +02:00
<div class="channel-page" style="background-color: var(--channel-contents-background);">
2022-11-06 11:36:01 +01:00
2022-08-24 15:22:16 +02:00
<% if (Array.isArray( j.Search.Results.Video)) { %>
2022-10-20 16:39:58 +02:00
<center>
2022-11-18 12:38:13 +01:00
<% if (j.Search.Results.DynamicItem) { %>
2022-11-18 12:14:48 +01:00
<% if (j.Search.Results.DynamicItem.id == "didYouMeanRenderer") { %>
2023-02-02 22:14:30 +01:00
<% if (h) { %>
<% if (h.correctedQueryEndpoint) { %>
<% if (h.correctedQueryEndpoint.searchEndpoint) { %>
2022-11-18 13:08:49 +01:00
<div style="text-align: left;margin-left: 14.5em;">
2022-11-18 10:52:35 +01:00
<p>
2022-11-18 12:14:48 +01:00
Did you mean: <a href="/search?query=<%= h.correctedQueryEndpoint.searchEndpoint.query %>"><i><%= h.correctedQueryEndpoint.searchEndpoint.query %></i></a> :3
2022-11-18 10:52:35 +01:00
</p>
</div>
2022-11-18 13:05:56 +01:00
2022-11-18 12:14:48 +01:00
<% } %> <% } %>
2023-02-02 22:14:30 +01:00
<% } %> <% } %>
<% } %>
2022-11-18 10:52:35 +01:00
2022-11-18 12:14:48 +01:00
</center>
2022-11-18 13:08:49 +01:00
<% if (!j.Search.Results.DynamicItem) { %>
<% if (!continuation) { %>
2022-11-18 12:14:48 +01:00
<% if (summary.extract_html) { %>
<div class="shelf wiki" style="white-space: -moz-pre-wrap !important;white-space: -pre-wrap;white-space: -o-pre-wrap;white-space: pre-wrap;word-wrap: break-word;white-space: -webkit-pre-wrap;word-break: break-all;white-space: normal;background: #1c1c1c;padding: 10px;margin-top: 10px;max-width: 51.8em;width: max-content;">
2022-10-20 17:24:46 +02:00
2022-11-18 12:14:48 +01:00
<div class="video-title" style="color:#fff;font-family:PokeTube Flex;font-weight:700;margin-top: 0em;font-weight: 1000;font-stretch: ultra-expanded;font-size: large;">From da web <span style="font-size: small;font-family: sans-serif;"> <a href=" <%-summary.content_urls.desktop.page%>
">From wikipedia </a> under CC-BY-SA 3.0
</span></div>
2022-10-20 17:24:46 +02:00
<hr style="clear: both;display: block;border: none;border-bottom: 0.5px solid #2f2f2f;/*! width: 4.5em; */height: 0;">
<%-summary.extract_html%>
2022-11-18 12:14:48 +01:00
<span style="margin-bottom: -3em;">
2022-10-20 17:24:46 +02:00
2022-11-18 12:14:48 +01:00
2022-10-20 17:24:46 +02:00
</p>
</div>
2022-11-18 12:14:48 +01:00
<% } %> <% } %>
2022-11-18 13:08:49 +01:00
<% } %>
2022-11-18 12:14:48 +01:00
<% if (j.Search.Results.CardList) { %>
<% if (j.Search.Results.CardList.title == "People also search for") { %>
2022-11-18 10:52:35 +01:00
2022-11-19 19:06:33 +01:00
<div class="shelf" style="color:#fff;text-align: left;font-weight: 1000;">
2022-11-18 12:14:48 +01:00
<h2 style="font-family: 'PokeTube Flex';font-weight: 1000;font-size: large;text-align: left;font-stretch: extra-expanded;">People also search for</h2>
<div class="card-list " style="overflow-y: hidden;">
<% j.Search.Results.CardList.Card.forEach (x => { %>
<a style="background: #333;" class="card" href="/search?query=<%= x.title %> ">
<% if (!x.Thumbnail.$t.endsWith("mqdefault.jpg")) { %>
<img src="https://p.poketube.fun/<%= x.Thumbnail.$t%>" onerror="">
<% } %>
<% if (x.Thumbnail.$t.endsWith("mqdefault.jpg")) { %>
<img src="https://p.poketube.fun/<%= x.Thumbnail.$t.replace("//","https://")%>" onerror="">
<% } %>
<span><%= x.title %></span></a>
<% }) %>
</div>
</div>
<hr style="clear: both;display: block;border: none;border-bottom: 0.5px solid #2f2f2f;margin: 0 16em;/*! width: 4.5em; */height: 0;margin-top: 1em;">
<% } %> <% } %>
2022-11-18 10:52:35 +01:00
2022-06-08 16:13:19 +02:00
<% j.Search.Results.Video.forEach(x => { %>
2022-10-04 22:09:46 +02:00
<div class="video-list" >
2022-09-25 18:05:23 +02:00
2022-06-08 16:13:19 +02:00
<div class="video">
<a
href="/watch?v=<%= x.id %>"
class="thumbnail"
2022-10-20 16:39:58 +02:00
style="background-image: url('https://p.poketube.fun/https://i.ytimg.com/vi/<%= x.id %>/hqdefault.jpg?sqp=-oaymwEXCNAFEJQDSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLBmAOZV7CM3NdDKlEFxGX7PpI5UWQ');border-radius: 10px;"
2022-06-08 16:13:19 +02:00
><span class="video-length"><%=x.duration %></span></a>
2022-11-19 19:06:33 +01:00
<div class="info" style="color:#fff;text-align: left;font-weight: 1000;">
2022-11-20 09:46:15 +01:00
<a style="font-family: 'PokeTube Flex';font-size: large;text-align: left;font-stretch: extra-expanded;
font-weight: 1000;
2022-11-19 19:06:33 +01:00
" href="/watch?v=<%= x.id %>" class="title max-lines-2"
2022-06-08 16:13:19 +02:00
><%= x.Title %></a>
2022-11-19 19:06:33 +01:00
<div style="display: flex; flex-direction: column; row-gap: 8px;font-weight:bold">
2022-06-22 15:33:55 +02:00
<a href="/watch?v=<%= x.id %>"><span><%= x.views %> views</span> <span>•</span> <span><%= x.uploadedAt %></span></a>
2022-06-08 18:05:05 +02:00
<a href="/channel?id=<%= x.Channel.id %>">By <%=x.Channel.Name %></a>
2022-06-08 16:13:19 +02:00
</div>
</div>
</div>
2022-08-12 20:02:07 +02:00
</div>
2022-10-04 22:09:46 +02:00
</div>
2022-11-18 12:14:48 +01:00
<% }) %>
2022-11-18 12:38:13 +01:00
<p style="font-family: Inter;text-align: left;margin-left: 16em;">
<%=j.Search.estimatedResults.toLocaleString()%> Results (estimated)
</p>
2022-11-18 12:14:48 +01:00
2023-03-12 08:29:19 +01:00
<audio id="audio" style="display:none;" loop autoplay></audio>
2022-11-18 12:14:48 +01:00
<center> <hr style="clear: both;display: block;border: none;border-bottom: 0.5px solid #2f2f2f;margin: 0 16em;/*! width: 4.5em; */height: 0;margin-top: 1em;">
2022-10-04 22:09:46 +02:00
2022-10-20 16:39:58 +02:00
<div style="border-top: 1px solid var(--border-color);width: 100%;display: flex;gap: 43em;padding: 0;margin: 0;">
2022-09-25 18:05:23 +02:00
2022-10-20 16:39:58 +02:00
<% if (continuation) { %>
<p style="text-align: left;margin-left: 16em;color: var(--text-secondary);text-decoration: none;">
<a href="/search?query=<%=q%>">First Page</a> </p>
<p style="text-align: left;;color: var(--text-secondary);text-decoration: none;">
<a href="/search?query=<%=q%>&continuation=<%=j.Search.continuation%>">Next Page</a>
</p>
<% } %>
<% if (!continuation) { %>
<p style="text-align: left;margin-left: 16em;;color: var(--text-secondary);text-decoration: none;">
<a href="/search?query=<%=q%>&continuation=<%=j.Search.continuation%>">Next Page</a>
</p>
<% } %>
</div>
</center>
2022-10-04 22:09:46 +02:00
2022-08-24 15:22:16 +02:00
<% } %>
<% if (!Array.isArray( j.Search.Results.Video)) { %>
<br>
2022-11-06 11:36:01 +01:00
<center>
2022-08-24 15:22:16 +02:00
<h1 style="font-family:'Ginto nord';font-weight:900;white-space:yes;">
<img src="https://p.poketube.fun/https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftse2.explicit.bing.net%2Fth%3Fid%3DOIP.GUMY7MavfJyrfhjKbPKB9wHaDt%26pid%3DApi&f=1">
</h1>
<p>A error occured while searching. perhaps try refresing the page lol</p>
<p>
You can try other alternatives to access this resource such as:
<b>
<a href="https://invidio.us/results?q=<%=q%>">Invidious</a>
</b>
or
<b>
<a href="https://tube.kuylar.dev/results?search_query=<%=q%>">lighttube</a>
</b>
</p>
2022-10-20 17:29:29 +02:00
<p>
This page will be refreshed after 10 seconds
</p>
<meta http-equiv="refresh" content="10">
<% } %>
2022-11-06 11:36:01 +01:00
</center>
2022-10-04 22:09:46 +02:00
2022-08-24 15:22:16 +02:00
2022-08-12 20:44:27 +02:00
</a>
</div>
2022-10-04 22:09:46 +02:00
2023-03-06 20:58:37 +01:00
<script src="/css/custom-css.js"> </script>
<script>
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0-or-later
// Get all anchor links on the page
const links = document.querySelectorAll('a');
// Add a click event listener to each link
links.forEach(link => {
link.addEventListener('click', e => {
e.preventDefault(); // Prevent the default link behavior
// Create a loading spinner element
const spinner = document.createElement('div');
spinner.classList.add('spinner');
// Create a loading overlay element
const loading = document.createElement('div');
loading.classList.add('loading');
loading.appendChild(spinner);
// Add the loading overlay to the body
document.body.appendChild(loading);
// Redirect to the link after a short delay to show the loading overlay
setTimeout(() => {
window.location.href = link.href;
}, 500);
});
2023-03-12 08:29:19 +01:00
});
const audioElement = document.getElementById("audio");
audioElement.volume = 0.1;
let audioToggled = JSON.parse(localStorage.getItem("audioToggled"));
// When the audio player is loaded, check for stored time value and set current time
audioElement.addEventListener("loadedmetadata", () => {
if (audioToggled) {
const storedTime = localStorage.getItem("audioTime");
if (storedTime) {
audioElement.currentTime = storedTime;
}
}
});
// When the user leaves the page, store the current time value
window.addEventListener("beforeunload", () => {
if (audioToggled) {
localStorage.setItem("audioTime", audioElement.currentTime);
}
});
const audio = document.getElementById("audio");
const button = document.getElementById("audioButton");
const icon = document.getElementById("audioIcon");
function toggleAudio() {
if (audio.paused) {
audio.play();
audio.volume = 0.1;
button.classList.add("playing");
icon.classList.remove("fa-play");
icon.classList.add("fa-pause");
localStorage.setItem("audioToggled", true); // save that audio is toggled
} else {
audio.pause();
button.classList.remove("playing");
icon.classList.remove("fa-pause");
icon.classList.add("fa-play");
localStorage.setItem("audioToggled", false); // save that audio is not toggled
}
}
2023-03-26 20:14:43 +02:00
2023-03-26 14:24:57 +02:00
2023-03-12 08:29:19 +01:00
if (audioToggled === null || audioToggled === undefined) {
audioToggled = true;
}
if (audioToggled == false) {
audio.pause();
button.classList.remove("playing");
icon.classList.remove("fa-pause");
icon.classList.add("fa-play");
} else {
audio.play();
audio.volume = 0.1;
audio.src = "https://tube.kuylar.dev/proxy/media/MGPx242O--U/18"
button.classList.add("playing");
icon.classList.remove("fa-play");
icon.classList.add("fa-pause");
}
// Show the audio button
button.style.display = "block";
2023-03-22 18:28:36 +01:00
// @license-end
2023-06-04 14:31:31 +02:00
const urls = document.querySelectorAll('a[href*="/watch?v="]'); // get all links with "/watch?v=" in href attribute
const spinner = document.createElement('div');
spinner.id = 'fetch-spinner';
spinner.classList.add('hide');
document.body.appendChild(spinner);
const text = document.createElement('div');
text.id = 'fetch-text';
text.classList.add('hide');
document.body.appendChild(text);
document.body.classList.add('blur');
let fetchedCount = 0;
urls.forEach(link => {
const url = new URL(link.href);
if (url.host !== 'www.youtube.com' && url.host !== 'youtube.com') {
if (url.host !== "redirect.poketube.fun") {
console.log(`Fetching ${url.origin}`);
spinner.classList.remove('hide');
text.classList.remove('hide');
fetch(url.href)
.then(response => {
if (response.status === 500) {
// do nothing
}
console.log(`Fetched ${url.origin}`);
fetchedCount++;
console.clear()
if (fetchedCount === urls.length) {
spinner.classList.add('hide');
text.classList.add('hide');
document.body.classList.remove('blur');
}
// Do something with the response
})
.catch(error => {
spinner.classList.add('hide');
text.classList.add('hide');
console.clear()
// Ignore network errors
if (!(error instanceof TypeError && error.message.includes('Failed to fetch'))) {
console.error(`Error fetching ${url.origin}: ${error}`);
}
});
}
}
});
console.clear()
2023-03-12 08:29:19 +01:00
</script>
2023-03-06 20:58:37 +01:00
</body>
2022-06-08 16:13:19 +02:00
2023-02-22 17:00:46 +01:00