mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 07:58:05 +01:00
Merge pull request 'main' (#4) from Ashley/poke:main into main
Reviewed-on: https://codeberg.org/Korbs/poketube/pulls/4
This commit is contained in:
commit
4eaf58a422
14 changed files with 264 additions and 189 deletions
|
@ -1,6 +1,7 @@
|
||||||
Internet : 1GBIT (recommended 5GBIT) <br>
|
Internet : 1GBIT (recommended 5GBIT)
|
||||||
Ram : 2GB <br>
|
|
||||||
Cpu : Any recent one <br>
|
Ram : 2GB
|
||||||
OS: Microsoft Windows, Macos
|
|
||||||
GNU/LINUX (doesnt work on "musl" distros ) <brr>
|
Cpu : Any recent one
|
||||||
systemd or any service manager
|
|
||||||
|
OS: Microsoft Windows, macOs or GNU/LINUX (doesnt work on "musl" distros ) with systemd or any service manager
|
24
README.md
24
README.md
|
@ -6,10 +6,10 @@
|
||||||
</h1>
|
</h1>
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
<span> 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!!</span></div>
|
<span> Be Anonymous watching epic videos, searching thingys on the interwebs and listening to music on poke - the free privacy front end!</span></div>
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
[Welcome!](#welcome) | [Features](#features) | [No non-free codec needed](#no-non-free-codec-needed-3) | [Hosting Poketube~](#hosting-poketube) | [PokeTube community!](#poketube-community) | [The Legal Stuff (boring tbh)](#the-legal-stuff-boring-tbh)
|
[Welcome!](#welcome) | [Features](#features) | [No non-free codec needed](#no-non-free-codec-needed-3) | [Hosting Poke~](#hosting-poketube) | [Poke community!](#poketube-community) | [The Legal Stuff (boring tbh)](#the-legal-stuff-boring-tbh)
|
||||||
|
|
||||||
<a href="https://status.poketube.fun" target="_blank">
|
<a href="https://status.poketube.fun" target="_blank">
|
||||||
<img
|
<img
|
||||||
|
@ -54,20 +54,20 @@ Ambient mode, HQ audio And Even more!!!!!
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## Written by humans - not gpt
|
## Written by humans - not gpt
|
||||||
poketube is made by hard-working hoomans - not gpt :3<br>
|
poke is made by hard-working hoomans - not gpt :3<br>
|
||||||
<a href="https://notbyai.fyi"><img src="https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/Written-By-Human-Not-By-AI-Badge-white.svg?v=1696672202901" alt="Written by Humanss, Not by AI"></a>
|
<a href="https://notbyai.fyi"><img src="https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/Written-By-Human-Not-By-AI-Badge-white.svg?v=1696672202901" alt="Written by Humanss, Not by AI"></a>
|
||||||
|
|
||||||
## No Non-free codec needed :3
|
## No Non-free codec needed :3
|
||||||
|
|
||||||
PokeTube uses openh264 which is free software! poketube does not inculude non free stuff owowowoow!!!!
|
Poke uses openh264 which is free software! poketube does not inculude non free stuff owowowoow!!!!
|
||||||
|
|
||||||
you can view the source code of the openh264 codec in this repo :3 --> https://github.com/cisco/openh264.git
|
you can view the source code of the openh264 codec in this repo :3 --> https://github.com/cisco/openh264.git
|
||||||
|
|
||||||
PLEASE NOTE THAT THIS SOFTWARE MAY INCULUDE CODECS THAT IN CERTAIN COUNTRIES MAY BE COVERED BY PATENTS OR HAVE LEGAL ISSUES. PATENT AND COPYRIGHT LAWS OPERATE DIFFERENTLY DEPENDING ON WHICH COUNTRY YOU ARE IN. PLEASE OBTAIN LEGAL ADVICE IF YOU ARE UNSURE WHETHER A PARTICULAR PATENT OR RESTRICTION APPLIES TO A CODEC YOU WISH TO USE IN YOUR COUNTRY.
|
PLEASE NOTE THAT THIS SOFTWARE MAY INCULUDE CODECS THAT IN CERTAIN COUNTRIES MAY BE COVERED BY PATENTS OR HAVE LEGAL ISSUES. PATENT AND COPYRIGHT LAWS OPERATE DIFFERENTLY DEPENDING ON WHICH COUNTRY YOU ARE IN. PLEASE OBTAIN LEGAL ADVICE IF YOU ARE UNSURE WHETHER A PARTICULAR PATENT OR RESTRICTION APPLIES TO A CODEC YOU WISH TO USE IN YOUR COUNTRY.
|
||||||
|
|
||||||
## Hosting Poketube~
|
## Hosting Poke~
|
||||||
### With NodeJS
|
### With NodeJS
|
||||||
- To self host your own Poketube instance, you'll need the following:
|
- To self host your own Poke instance, you'll need the following:
|
||||||
|
|
||||||
- [Node.js](https://nodejs.org/en/download/)
|
- [Node.js](https://nodejs.org/en/download/)
|
||||||
- [npm](http://npmjs.com) (Included with Node.js)
|
- [npm](http://npmjs.com) (Included with Node.js)
|
||||||
|
@ -75,17 +75,23 @@ PLEASE NOTE THAT THIS SOFTWARE MAY INCULUDE CODECS THAT IN CERTAIN COUNTRIES MAY
|
||||||
Once you have everything, clone our repo:
|
Once you have everything, clone our repo:
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://codeberg.org/ashley/poketube.git
|
git clone https://codeberg.org/ashley/poke.git
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also clone using our Github mirror if you'd prefer:
|
You can also clone using our Github mirror if you'd prefer:
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/ashley0143/poketube.git
|
git clone https://github.com/ashley0143/poke.git
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, install the needed dependencies within the Poketube folder:
|
Or you can use our forgejo instance:
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://git.poketube.fun/ashley/poke.gitt
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, install the needed dependencies within the Poke folder:
|
||||||
|
( go to the folder by running cd pokee)
|
||||||
```
|
```
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"invapi": "https://invid-api.poketube.fun/api/v1",
|
"invapi": "https://invid-api.poketube.fun/api/v1",
|
||||||
"dislikes": "https://returnyoutubedislikeapi.com/votes?videoId=",
|
"dislikes": "https://returnyoutubedislikeapi.com/votes?videoId=",
|
||||||
"invchannel": "https://invid-api.poketube.fun/api/v1",
|
"invchannel": "https://invid-api.poketube.fun/api/v1",
|
||||||
"cacher_max_age": "1800",
|
"cacher_max_age": "864000",
|
||||||
"enablealwayshttps": false,
|
"enablealwayshttps": false,
|
||||||
"t_url": "https://t.poketube.fun/",
|
"t_url": "https://t.poketube.fun/",
|
||||||
"server_port": "6003"
|
"server_port": "6003"
|
||||||
|
|
17
css/app.js
17
css/app.js
|
@ -1,5 +1,22 @@
|
||||||
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0-or-later
|
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-3.0-or-later
|
||||||
|
|
||||||
|
/*
|
||||||
|
CryptoJS v3.1.2
|
||||||
|
code.google.com/p/crypto-js
|
||||||
|
(c) 2009-2013 by Jeff Mott. All rights reserved.
|
||||||
|
code.google.com/p/crypto-js/wiki/License
|
||||||
|
*/
|
||||||
|
var CryptoJS=CryptoJS||function(h,s){var f={},t=f.lib={},g=function(){},j=t.Base={extend:function(a){g.prototype=this;var c=new g;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},
|
||||||
|
q=t.WordArray=j.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=s?c:4*a.length},toString:function(a){return(a||u).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e<a;e++)c[b+e>>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535<d.length)for(e=0;e<a;e+=4)c[b+e>>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<
|
||||||
|
32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=j.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d<a;d+=4)c.push(4294967296*h.random()|0);return new q.init(c,a)}}),v=f.enc={},u=v.Hex={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b<a;b++){var e=c[b>>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b<c;b+=2)d[b>>>3]|=parseInt(a.substr(b,
|
||||||
|
2),16)<<24-4*(b%8);return new q.init(d,c/2)}},k=v.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b<a;b++)d.push(String.fromCharCode(c[b>>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b<c;b++)d[b>>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},l=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}},
|
||||||
|
x=t.BufferedBlockAlgorithm=j.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=l.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var m=0;m<a;m+=e)this._doProcessBlock(d,m);m=d.splice(0,a);c.sigBytes-=b}return new q.init(m,b)},clone:function(){var a=j.clone.call(this);
|
||||||
|
a._data=this._data.clone();return a},_minBufferSize:0});t.Hasher=x.extend({cfg:j.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){x.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(c,d){return(new a.init(d)).finalize(c)}},_createHmacHelper:function(a){return function(c,d){return(new w.HMAC.init(a,
|
||||||
|
d)).finalize(c)}}});var w=f.algo={};return f}(Math);
|
||||||
|
(function(h){for(var s=CryptoJS,f=s.lib,t=f.WordArray,g=f.Hasher,f=s.algo,j=[],q=[],v=function(a){return 4294967296*(a-(a|0))|0},u=2,k=0;64>k;){var l;a:{l=u;for(var x=h.sqrt(l),w=2;w<=x;w++)if(!(l%w)){l=!1;break a}l=!0}l&&(8>k&&(j[k]=v(h.pow(u,0.5))),q[k]=v(h.pow(u,1/3)),k++);u++}var a=[],f=f.SHA256=g.extend({_doReset:function(){this._hash=new t.init(j.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],m=b[2],h=b[3],p=b[4],j=b[5],k=b[6],l=b[7],n=0;64>n;n++){if(16>n)a[n]=
|
||||||
|
c[d+n]|0;else{var r=a[n-15],g=a[n-2];a[n]=((r<<25|r>>>7)^(r<<14|r>>>18)^r>>>3)+a[n-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+a[n-16]}r=l+((p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25))+(p&j^~p&k)+q[n]+a[n];g=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&m^f&m);l=k;k=j;j=p;p=h+r|0;h=m;m=f;f=e;e=r+g|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+m|0;b[3]=b[3]+h|0;b[4]=b[4]+p|0;b[5]=b[5]+j|0;b[6]=b[6]+k|0;b[7]=b[7]+l|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes;
|
||||||
|
d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=g.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=g._createHelper(f);s.HmacSHA256=g._createHmacHelper(f)})(Math);
|
||||||
|
|
||||||
// Get the current URL
|
// Get the current URL
|
||||||
const url = new URL(window.location.href);
|
const url = new URL(window.location.href);
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,51 @@ script_tag.text = localStorage.getItem("poke-custom-script");
|
||||||
|
|
||||||
document.head.appendChild(script_tag);
|
document.head.appendChild(script_tag);
|
||||||
|
|
||||||
|
/* rebranding */
|
||||||
|
function replaceRecursively(element, from, to) {
|
||||||
|
if (element.tagName !== 'STYLE') { // Ignore elements with the tag name "style"
|
||||||
|
if (element.childNodes.length) {
|
||||||
|
element.childNodes.forEach(child => replaceRecursively(child, from, to));
|
||||||
|
} else {
|
||||||
|
const cont = element.textContent;
|
||||||
|
if (cont) element.textContent = cont.replace(from, to);
|
||||||
|
} }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
document.title = document.title.replace("PokeTube", "Poke")
|
||||||
|
|
||||||
|
function replaceText(match) {
|
||||||
|
// Check if the first letter of the matched text is uppercase
|
||||||
|
if (match.charAt(0) === match.charAt(0).toUpperCase()) {
|
||||||
|
// If uppercase, check if the entire text is "Poketube.fun"
|
||||||
|
if (match.toLowerCase() === "poketube.fun") {
|
||||||
|
return "Poketube.fun"; // Keep the original case
|
||||||
|
} else {
|
||||||
|
return "Poke" // Replace with "Poke" + rest of the string
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// If not uppercase, check if the entire text is "poketube.fun"
|
||||||
|
if (match.toLowerCase() === "poketube.fun") {
|
||||||
|
return "poketube.fun"; // Keep the original case
|
||||||
|
} else {
|
||||||
|
return "poke"; // Replace with "poke"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
replaceRecursively(document.body, new RegExp("poketube", "gi"), replaceText);
|
||||||
|
|
||||||
|
function replaceTitle() {
|
||||||
|
if (window.location.pathname === "/watch") {
|
||||||
|
document.title = document.title.replace(/Poke/g, " Watch");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call the function when the page loads
|
||||||
|
replaceTitle();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This script adds the Plausible analytics telemetry code to the page for the
|
* This script adds the Plausible analytics telemetry code to the page for the
|
||||||
* domain poketube.fun.
|
* domain poketube.fun.
|
||||||
|
|
BIN
css/pt.png
BIN
css/pt.png
Binary file not shown.
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 213 KiB |
|
@ -1,94 +1,15 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<svg
|
<circle cx="75" cy="75" r="75" fill="url(#paint0_linear_9_5)"/>
|
||||||
width="215"
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M39.782 41.7207C19.7853 64.3135 20.6858 121.023 38.805 121.023C51.3927 121.023 53.2571 120.788 57.4558 120.258C59.3009 120.025 61.5967 119.735 65.4512 119.384C77.2615 118.306 74.1768 109.697 70.9345 100.649C68.8197 94.7472 66.6379 88.6583 68.4777 84.3493C70.2767 80.1359 79.7085 81.0823 90.1072 82.1258C99.6126 83.0796 109.926 84.1144 115.956 81.3634C128.582 75.6028 127.434 46.3292 115.956 35.9601C104.477 25.591 56.0977 23.2867 39.782 41.7207ZM83.6404 68.2196C88.3063 68.2196 95.0174 66.3534 95.5883 59.8216C95.6171 59.4918 95.647 59.1604 95.6769 58.8279C96.3266 51.6169 97.0214 43.9039 88.2357 41.1593C76.2878 37.4269 70.7734 52.3093 70.7734 59.8216C70.7734 66.3534 78.9744 68.2196 83.6404 68.2196Z" fill="url(#paint1_linear_9_5)"/>
|
||||||
height="215"
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M39.782 41.7207C19.7853 64.3135 20.6858 121.023 38.805 121.023C51.3927 121.023 53.2571 120.788 57.4558 120.258C59.3009 120.025 61.5967 119.735 65.4512 119.384C77.2615 118.306 74.1768 109.697 70.9345 100.649C68.8197 94.7472 66.6379 88.6583 68.4777 84.3493C70.2767 80.1359 79.7085 81.0823 90.1072 82.1258C99.6126 83.0796 109.926 84.1144 115.956 81.3634C128.582 75.6028 127.434 46.3292 115.956 35.9601C104.477 25.591 56.0977 23.2867 39.782 41.7207ZM83.6404 68.2196C88.3063 68.2196 95.0174 66.3534 95.5883 59.8216C95.6171 59.4918 95.647 59.1604 95.6769 58.8279C96.3266 51.6169 97.0214 43.9039 88.2357 41.1593C76.2878 37.4269 70.7734 52.3093 70.7734 59.8216C70.7734 66.3534 78.9744 68.2196 83.6404 68.2196Z" fill="black"/>
|
||||||
viewBox="0 0 215 215"
|
<defs>
|
||||||
fill="none"
|
<linearGradient id="paint0_linear_9_5" x1="0" y1="0" x2="150" y2="150" gradientUnits="userSpaceOnUse">
|
||||||
version="1.1"
|
<stop stop-color="#8EDDFF"/>
|
||||||
id="svg13968"
|
<stop offset="1" stop-color="#EE85FF"/>
|
||||||
sodipodi:docname="yt-ukraine.svg"
|
</linearGradient>
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
<linearGradient id="paint1_linear_9_5" x1="25" y1="28" x2="117.781" y2="127.739" gradientUnits="userSpaceOnUse">
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
<stop stop-color="#8EDDFF"/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
<stop offset="1" stop-color="#EE85FF"/>
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
</linearGradient>
|
||||||
<sodipodi:namedview
|
</defs>
|
||||||
id="namedview13970"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#000000"
|
|
||||||
borderopacity="0.25"
|
|
||||||
inkscape:showpageshadow="2"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#d1d1d1"
|
|
||||||
showgrid="false" />
|
|
||||||
<defs
|
|
||||||
id="defs13962">
|
|
||||||
<linearGradient
|
|
||||||
id="grad"
|
|
||||||
x1="11"
|
|
||||||
y1="11"
|
|
||||||
x2="205"
|
|
||||||
y2="205"
|
|
||||||
gradientUnits="userSpaceOnUse">
|
|
||||||
<stop
|
|
||||||
offset="0%"
|
|
||||||
stop-color="#9666F7"
|
|
||||||
id="stop13957" />
|
|
||||||
<stop
|
|
||||||
offset="100%"
|
|
||||||
stop-color="#B37C6B"
|
|
||||||
id="stop13959" />
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
<rect
|
|
||||||
x="11"
|
|
||||||
y="11"
|
|
||||||
width="194"
|
|
||||||
height="194"
|
|
||||||
rx="97"
|
|
||||||
fill="url(#grad)"
|
|
||||||
id="rect13964"
|
|
||||||
inkscape:export-filename="e.svg"
|
|
||||||
inkscape:export-xdpi="96"
|
|
||||||
inkscape:export-ydpi="96"
|
|
||||||
style="fill:url(#grad)" />
|
|
||||||
<g
|
|
||||||
id="g10691"
|
|
||||||
transform="matrix(0.73889563,0,0,0.73889563,-158.49598,-184.76949)"
|
|
||||||
style="fill:#ffffff;stroke:#ffffff;stroke-width:3.86781;stroke-dasharray:none;stroke-opacity:1">
|
|
||||||
<path
|
|
||||||
sodipodi:type="star"
|
|
||||||
style="fill:none;stroke:#ffffff;stroke-width:11.9061;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="path13604"
|
|
||||||
inkscape:flatsided="false"
|
|
||||||
sodipodi:sides="3"
|
|
||||||
sodipodi:cx="313.24533"
|
|
||||||
sodipodi:cy="230.91805"
|
|
||||||
sodipodi:r1="45.714695"
|
|
||||||
sodipodi:r2="91.42939"
|
|
||||||
sodipodi:arg1="-2.0943951"
|
|
||||||
sodipodi:arg2="-1.0471976"
|
|
||||||
inkscape:rounded="0"
|
|
||||||
inkscape:randomized="0"
|
|
||||||
d="m 290.38798,191.32796 68.57204,-39.59009 1e-5,79.18018 0,79.18017 -68.57205,-39.59009 -68.57204,-39.59008 z"
|
|
||||||
inkscape:transform-center-x="15.739916"
|
|
||||||
transform="matrix(-0.68861541,0,0,-0.68861541,586.11315,555.86413)" />
|
|
||||||
<path
|
|
||||||
sodipodi:type="star"
|
|
||||||
style="fill:#ffffff;stroke:#ffffff;stroke-width:5.61679;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="path10689"
|
|
||||||
inkscape:flatsided="false"
|
|
||||||
sodipodi:sides="3"
|
|
||||||
sodipodi:cx="313.24533"
|
|
||||||
sodipodi:cy="230.91805"
|
|
||||||
sodipodi:r1="45.714695"
|
|
||||||
sodipodi:r2="91.42939"
|
|
||||||
sodipodi:arg1="-2.0943951"
|
|
||||||
sodipodi:arg2="-1.0471976"
|
|
||||||
inkscape:rounded="0"
|
|
||||||
inkscape:randomized="0"
|
|
||||||
d="m 290.38798,191.32796 68.57204,-39.59009 1e-5,79.18018 0,79.18017 -68.57205,-39.59009 -68.57204,-39.59008 z"
|
|
||||||
inkscape:transform-center-x="15.739916"
|
|
||||||
transform="matrix(-0.68861541,0,0,-0.68861541,548.10723,555.86413)" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -52,11 +52,6 @@
|
||||||
<link href="/css/yt-ukraine.svg?v=3" rel=icon>
|
<link href="/css/yt-ukraine.svg?v=3" rel=icon>
|
||||||
<link href=/css/snow.css rel=stylesheet>
|
<link href=/css/snow.css rel=stylesheet>
|
||||||
|
|
||||||
<ptd-event-chunks>
|
|
||||||
poketube.eventloader = this.eventloader
|
|
||||||
load()
|
|
||||||
|
|
||||||
</ptd-event-chunks>
|
|
||||||
<title> <%=inv_vid.title%> | PokeTube </title>
|
<title> <%=inv_vid.title%> | PokeTube </title>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
@ -357,12 +352,12 @@ a[data-onclick="jump_to_time"] {
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- css files -->
|
<!-- css files -->
|
||||||
<link href="/css/app-cdn.min.css?v=<%=btoa(Date.now())%>" rel=stylesheet>
|
<link href="/css/app-cdn.min.css" rel=stylesheet>
|
||||||
<link href="/css/app.main.css?v=<%=btoa(Date.now())%>" rel=stylesheet>
|
<link href="/css/app.main.css" rel=stylesheet>
|
||||||
<link href="/css/watch.main.css?v=<%=btoa(Date.now())%>" rel=stylesheet>
|
<link href="/css/watch.main.css" rel=stylesheet>
|
||||||
<link href="/css/watch-util.css?v=<%=btoa(Date.now())%>" rel=stylesheet>
|
<link href="/css/watch-util.css" rel=stylesheet>
|
||||||
<link href="/css/watch-navbar.css?v=<%=btoa(Date.now())%>" rel=stylesheet>
|
<link href="/css/watch-navbar.css" rel=stylesheet>
|
||||||
<link href="/css/poketube.css?v=<%=btoa(Date.now())%>" rel=stylesheet>
|
<link href="/css/poketube.css" rel=stylesheet>
|
||||||
|
|
||||||
<!-- ICONS -->
|
<!-- ICONS -->
|
||||||
<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://site-assets.fontawesome.com/releases/v6.1.1/css/all.css" rel=stylesheet>
|
||||||
|
@ -1812,9 +1807,78 @@ window.addEventListener("unload", cleanup)
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<% } %>
|
<% } %>
|
||||||
<script src="/static/app.bundle.js?ver=<%-btoa("1f739d93") %>&bundledat=<%- Date.now() %>"></script>
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/static/app.bundle.js" > </script>
|
||||||
|
|
||||||
|
<% if(secure) { %>
|
||||||
|
<!-- Matomo -->
|
||||||
|
<script>
|
||||||
|
function anondocumenttitle(message, times) {
|
||||||
|
var hash = CryptoJS.SHA256(message);
|
||||||
|
|
||||||
|
return hash.toString(CryptoJS.enc.Hex);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
if (typeof Ashley === "undefined") {
|
||||||
|
var Ashley = {};
|
||||||
|
}
|
||||||
|
Ashley.dntEnabled = function (dnt, ua) {
|
||||||
|
"use strict";
|
||||||
|
var dntStatus =
|
||||||
|
dnt || navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||||
|
var userAgent = ua || navigator.userAgent;
|
||||||
|
var anomalousWinVersions = [
|
||||||
|
"Windows NT 6.1",
|
||||||
|
"Windows NT 6.2",
|
||||||
|
"Windows NT 6.3",
|
||||||
|
];
|
||||||
|
var fxMatch = userAgent.match(/Firefox\/(\d+)/);
|
||||||
|
var ieRegEx = /MSIE|Trident/i;
|
||||||
|
var isIE = ieRegEx.test(userAgent);
|
||||||
|
var platform = userAgent.match(/Windows.+?(?=;)/g);
|
||||||
|
if (isIE && typeof Array.prototype.indexOf !== "function") {
|
||||||
|
return false;
|
||||||
|
} else if (fxMatch && parseInt(fxMatch[1], 10) < 32) {
|
||||||
|
dntStatus = "Unspecified";
|
||||||
|
} else if (
|
||||||
|
isIE &&
|
||||||
|
platform &&
|
||||||
|
anomalousWinVersions.indexOf(platform.toString()) !== -1
|
||||||
|
) {
|
||||||
|
dntStatus = "Unspecified";
|
||||||
|
} else {
|
||||||
|
dntStatus = { 0: "Disabled", 1: "Enabled" }[dntStatus] || "Unspecified";
|
||||||
|
}
|
||||||
|
return dntStatus === "Enabled" ? true : false;
|
||||||
|
};
|
||||||
|
// only load if DNT is not enabled
|
||||||
|
if (Ashley && !Ashley.dntEnabled()) {
|
||||||
|
var _paq = window._paq = window._paq || [];
|
||||||
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
|
_paq.push(["setDocumentTitle", anondocumenttitle(document.domain, 5) + "/" + anondocumenttitle(document.title, 5)]);
|
||||||
|
_paq.push(["setDoNotTrack", true]);
|
||||||
|
_paq.push(["disableCookies"]);
|
||||||
|
_paq.push(['trackPageView']);
|
||||||
|
_paq.push(['enableLinkTracking']);
|
||||||
|
(function() {
|
||||||
|
var u="//data.poketube.fun/";
|
||||||
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||||
|
_paq.push(['setSiteId', '2']);
|
||||||
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||||
|
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<noscript><p><img src="//data.poketube.fun/matomo.php?idsite=2&rec=1" style="border:0;" alt="" /></p></noscript>
|
||||||
|
<!-- End Matomo Code -->
|
||||||
|
|
||||||
|
<% } %>
|
||||||
<style> img.emoji {height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;}</style>
|
<style> img.emoji {height: 1em;width: 1em;margin: 0 .05em 0 .1em;vertical-align: -0.1em;}</style>
|
||||||
<script>twemoji.parse(document.body,{ base: 'https://cdn.zptr.cc/twemoji/' })</script><script>
|
<script>
|
||||||
window.GLOBAL_ENV = {
|
window.GLOBAL_ENV = {
|
||||||
API_ENDPOINT_INVID:"https://invid-api.poketube.fun/api/v1",
|
API_ENDPOINT_INVID:"https://invid-api.poketube.fun/api/v1",
|
||||||
API_ENDPOINT_INNER:"https://inner-api.poketube.fun/api/",
|
API_ENDPOINT_INNER:"https://inner-api.poketube.fun/api/",
|
||||||
|
@ -1912,8 +1976,8 @@ fetch(statsurl + "?browser=" + encodedBrowserName)
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
<link href=/css/yt-ukraine.svg?v=6 rel=icon>
|
<link href=/css/yt-ukraine.svg?v=6 rel=icon>
|
||||||
<title> <%=inv_vid.title%> | PokeTube Mobile</title>
|
<title> <%=inv_vid.title%> | PokeTube Mobile</title>
|
||||||
<link href="/css/mobile.css?v=<%=btoa(Date.now())%>" rel=stylesheet>
|
<link href="/css/mobile.css" rel=stylesheet>
|
||||||
<link href="/css/app.main.css?v=<%=btoa(Date.now())%>" rel=stylesheet>
|
<link href="/css/app.main.css" rel=stylesheet>
|
||||||
<link href=https://p.poketube.fun/https://unpkg.com/ionicons@4.5.10-0/dist/css/ionicons.css rel=stylesheet>
|
<link href=https://p.poketube.fun/https://unpkg.com/ionicons@4.5.10-0/dist/css/ionicons.css rel=stylesheet>
|
||||||
|
|
||||||
<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://site-assets.fontawesome.com/releases/v6.1.1/css/all.css rel=stylesheet>
|
||||||
|
@ -1994,7 +2058,7 @@ a {
|
||||||
<div class="video-player-container" style="background-color:#000">
|
<div class="video-player-container" style="background-color:#000">
|
||||||
<% if (lightOrDark(color) == "dark") { %>
|
<% if (lightOrDark(color) == "dark") { %>
|
||||||
|
|
||||||
<video class="player" id="video" style="border-radius: 6px;box-shadow: 0 10em 7em <%=color2
|
<video class="player" id="video" style="border-radius: 6px;box-shadow: 0 13em 14em <%=color2
|
||||||
%>;" autoplay controls
|
%>;" autoplay controls
|
||||||
|
|
||||||
poster="https://p.poketube.fun/https://i.ytimg.com/vi/<%=inv_vid.videoId%>/maxresdefault.jpg?v=607ddcd4">
|
poster="https://p.poketube.fun/https://i.ytimg.com/vi/<%=inv_vid.videoId%>/maxresdefault.jpg?v=607ddcd4">
|
||||||
|
@ -2002,7 +2066,7 @@ a {
|
||||||
<% } %>
|
<% } %>
|
||||||
<% if (lightOrDark(color) == "light") { %>
|
<% if (lightOrDark(color) == "light") { %>
|
||||||
|
|
||||||
<video class="player" id="video" style="border-radius: 6px;box-shadow: 0 10em 7em <%=color
|
<video class="player" id="video" style="border-radius: 6px;box-shadow: 0 13em 14em <%=color
|
||||||
%>;" autoplay controls
|
%>;" autoplay controls
|
||||||
|
|
||||||
poster="https://p.poketube.fun/https://i.ytimg.com/vi/<%=inv_vid.videoId%>/maxresdefault.jpg?v=607ddcd4">
|
poster="https://p.poketube.fun/https://i.ytimg.com/vi/<%=inv_vid.videoId%>/maxresdefault.jpg?v=607ddcd4">
|
||||||
|
@ -2081,7 +2145,7 @@ font-size: 13px;margin:0;padding:0;white-space: nowrap;
|
||||||
|
|
||||||
<div class="name" style="font-family:var(--text-font-primary);font-weight:var(--text-header-weight);">
|
<div class="name" style="font-family:var(--text-font-primary);font-weight:var(--text-header-weight);">
|
||||||
<div>
|
<div>
|
||||||
<a href="/channel?id=<%=k.Video.Channel.id%>" style="color:#fff;max-width: 9.8em;" class="max-lines-1">
|
<a href="/channel?id=<%=k.Video.Channel.id%>" style="color:#fff;max-width: 7.8em;" class="max-lines-1">
|
||||||
<%=k.Video.Channel.Name%></a>
|
<%=k.Video.Channel.Name%></a>
|
||||||
|
|
||||||
<div class="subscriber-count" style="write-space:nowraap">
|
<div class="subscriber-count" style="write-space:nowraap">
|
||||||
|
@ -2208,45 +2272,60 @@ font-size: 13px;margin:0;padding:0;white-space: nowrap;
|
||||||
|
|
||||||
-->
|
-->
|
||||||
</div>
|
</div>
|
||||||
<% let randomNumber = Math.floor(Math.random() * 2) + 1; %>
|
|
||||||
|
|
||||||
<% if (Array.isArray( inv.comments)) { %>
|
|
||||||
|
|
||||||
<div class="comment-mini" style="padding: 0em;background: #0009;border-radius: 16px;align-self: center;align-items: center;margin-left: 8px;margin-right: 12px;padding-bottom: 0;padding-top:1em;<%= randomNumber === 2 ? 'visibility: collapse;' : '' %>"> <a id="language-button" href="#comments-container" style="" class="switch">
|
<div class="fromtheweb-inner" style="margin-left: 8px;margin-right: 12px;margin-bottom:6px;">
|
||||||
|
<div style="display: flex;gap: 3px;">
|
||||||
<div class="video-title" style="font-family:'PokeTube flex';font-weight:1000;white-space:yes;margin-top: -0.5em;margin-left: 0.8em;">Comments - <%- convert(inv.commentCount) %>
|
<% if (twitter) { %>
|
||||||
|
<div style="background: #000;width: fit-content;padding: 5px;border-radius: 6px;margin-bottom: -15px;">
|
||||||
|
<img src="https://p.poketube.fun/https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/8473b88f-36a4-437f-8c14-fb9e38a623d9.image.png?v=1693424579898" class="loaded" style="width: 22px;height: 23px;vertical-align: -7px;"><a style="margin: 1px;" href="https://nitter.net/<%- twitter.name %>"> @<%- twitter.name %></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="" style="padding: 0em !important;margin-left: 0.3em;">
|
|
||||||
|
|
||||||
<div class="desc" style="display: flex;font-size: small;padding: 0;margin: -10px;margin-left: -0.5em">
|
|
||||||
<h5 style="display: flex;margin-top: 7px;padding-top: 10px;margin-left: 12px;">
|
|
||||||
<div class="thumb">
|
|
||||||
|
|
||||||
<div class="thumb">
|
|
||||||
<a href="/channel?id=<%- inv.comments[0].authorId%>" class="avatar" style="width: 40px;height: 40px;margin: 4px;">
|
|
||||||
<img src="/avatars/<%= inv.comments[0].authorThumbnails[1].url.replace("https://yt3.ggpht.com/", "") %>" style="width: 24px;height: 24px;margin-right: inherit;" >
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</h5>
|
|
||||||
<p class="comment" style="font-weight: bold;color: #fff; word-wrap: break-word; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; text-overflow: ellipsis; max-width: 19em;align-self:center;">
|
|
||||||
<%- inv.comments[0].contentHtml %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
<% if (discord) { %>
|
||||||
|
<div style="background: #000;width: fit-content;padding: 5px;border-radius: 6px;margin-bottom: -15px;">
|
||||||
|
<img src="https://p.poketube.fun/https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/34e2accb-41ec-4b10-a1e8-a0d647ea6e76.image.png" class="loaded" style="width: 22px;height: 23px;vertical-align: -7px;"><a style="margin: 1px;" href="https://discord.gg/<%- discord.name %>"> /<%- discord.name %></a>
|
||||||
</div>
|
</div>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
|
|
||||||
|
<% if (twitch) { %>
|
||||||
|
<div style="background: #000;width: fit-content;padding: 5px;border-radius: 6px;margin-bottom: -15px;">
|
||||||
|
<img src="https://p.poketube.fun/https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/d277ed96-59cd-44fe-a75a-56b3170fa634.image.png?v=1693429282139" class="loaded" style="width: 22px;height: 23px;vertical-align: -7px;"><a style="margin: 1px;" href="https://twitch.tv/<%- twitch.name %>"> /<%- twitch.name %></a>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
|
|
||||||
|
<% if (reddit) { %>
|
||||||
|
<div style="background: #000;width: fit-content;padding: 5px;border-radius: 6px;margin-bottom: -15px;">
|
||||||
|
<img src="https://p.poketube.fun/https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/3bea1171-8723-4719-b0ee-d98d1abbd174.image.png?v=1693429333706" class="loaded" style="width: 22px;height: 23px;vertical-align: -7px;"><a style="margin: 1px;" href="https://reddit.com/r/<%- reddit.name %>"> r/<%- reddit.name %></a>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
|
<% if (instagram) { %>
|
||||||
|
<div style="background: #0009;width: fit-content;padding: 5px;border-radius: 6px;margin-bottom: -15px;">
|
||||||
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2338,7 +2417,7 @@ the channels social media accounts!
|
||||||
<div style="display: flex;gap: 3px;">
|
<div style="display: flex;gap: 3px;">
|
||||||
<% if (twitter) { %>
|
<% if (twitter) { %>
|
||||||
<div style="background: #0009;width: fit-content;padding: 5px;border-radius: 6px;margin-bottom: -15px;">
|
<div style="background: #0009;width: fit-content;padding: 5px;border-radius: 6px;margin-bottom: -15px;">
|
||||||
<img src="https://p.poketube.fun/https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/8473b88f-36a4-437f-8c14-fb9e38a623d9.image.png?v=1693424579898" class="loaded" style="width: 22px;height: 23px;vertical-align: -7px;"><a style="margin: 1px;" href="https://x.com/<%- twitter.name %>"> @<%- twitter.name %></a>
|
<img src="https://p.poketube.fun/https://cdn.glitch.global/d68d17bb-f2c0-4bc3-993f-50902734f652/8473b88f-36a4-437f-8c14-fb9e38a623d9.image.png?v=1693424579898" class="loaded" style="width: 22px;height: 23px;vertical-align: -7px;"><a style="margin: 1px;" href="https://nitter.net/<%- twitter.name %>"> @<%- twitter.name %></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
|
@ -223,7 +223,7 @@
|
||||||
<button class="btn btn-success" type="submit" style="margin-top: 1em;margin-left: auto;margin-right: 8em;align-self: center;text-align: center;display: flex;flex-direction: column;height: 5em;background: #fff;color: #000;border: none;width: 8em;"><p style="margin-top: auto;margin-bottom: auto;font-weight: 1000;margin-left: 6px;font-stretch: ultra-expanded;font-family:"poketube flex";Poketube flex;">Search Poke</p></button>
|
<button class="btn btn-success" type="submit" style="margin-top: 1em;margin-left: auto;margin-right: 8em;align-self: center;text-align: center;display: flex;flex-direction: column;height: 5em;background: #fff;color: #000;border: none;width: 8em;"><p style="margin-top: auto;margin-bottom: auto;font-weight: 1000;margin-left: 6px;font-stretch: ultra-expanded;font-family:"poketube flex";Poketube flex;">Search Poke</p></button>
|
||||||
|
|
||||||
<div class="downnav">
|
<div class="downnav">
|
||||||
<span style="color:#fff;" id="weatherInfo"></span> - <a style="color:#fff" href="/account-create">My Account</a> - <a style="color:#fff" href="/privacy">Privacy</a> - <a style="color:#fff" href="https://codeberg.org/ashley/poketube">Git</a>
|
<span style="color:#fff;" id="weatherInfo"></span> - <a style="color:#fff" href="/map"> PokeMaps </a> - <a style="color:#fff" href="/account-create">My Account</a> - <a style="color:#fff" href="/privacy">Privacy</a> - <a style="color:#fff" href="https://codeberg.org/ashley/poketube">Git</a>
|
||||||
<div style="float: right;">
|
<div style="float: right;">
|
||||||
<a style="color:#fff" id="osInfo"></a> <a style="color:#fff;margin-right: 1em;" href="/license">License</a>
|
<a style="color:#fff" id="osInfo"></a> <a style="color:#fff;margin-right: 1em;" href="/license">License</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -46,9 +46,9 @@ app.use(function (req, res, next) {
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.use(function (req, res, next) {
|
app.use(function (_req, res, next) {
|
||||||
res.header("Access-Control-Allow-Origin", "*");
|
res.header("Access-Control-Allow-Origin", "*");
|
||||||
res.setHeader("Cache-Control", "public, max-age=1848"); // cache header
|
res.setHeader("Cache-Control", "public, max-age=232337763"); // cache header
|
||||||
res.setHeader("poketube-cacher", "PROXY_FILES");
|
res.setHeader("poketube-cacher", "PROXY_FILES");
|
||||||
|
|
||||||
next();
|
next();
|
||||||
|
@ -60,6 +60,7 @@ app.use(function (req, res, next) {
|
||||||
*/
|
*/
|
||||||
const proxy = async (req, res) => {
|
const proxy = async (req, res) => {
|
||||||
const { fetch } = await import("undici")
|
const { fetch } = await import("undici")
|
||||||
|
res.setHeader("Cache-Control", "public, max-age=232337763"); // cache header
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let url;
|
let url;
|
||||||
|
@ -97,9 +98,9 @@ const listener = (req, res) => {
|
||||||
app.get("/", (req, res) => {
|
app.get("/", (req, res) => {
|
||||||
var json = {
|
var json = {
|
||||||
status: "200",
|
status: "200",
|
||||||
version: "1.1.0",
|
version: "1.2.0",
|
||||||
URL_WHITELIST,
|
URL_WHITELIST,
|
||||||
cache: "max-age-1848",
|
cache: "max-age-232337763",
|
||||||
};
|
};
|
||||||
|
|
||||||
res.json(json);
|
res.json(json);
|
||||||
|
|
14
poke.service
Normal file
14
poke.service
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Poke
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=node server.js
|
||||||
|
WorkingDirectory=[YOUR DIR HERE]
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/vi/:v/:t", async function (req, res) {
|
app.get("/vi/:v/:t", async function (req, res) {
|
||||||
var url = `https://invid-api.poketube.fun/vi/${req.params.v}/${req.params.t}`
|
var url = `https://invidious.snopyta.org/vi/${req.params.v}/${req.params.t}`
|
||||||
|
|
||||||
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
|
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
|
||||||
method: req.method,
|
method: req.method,
|
||||||
|
@ -63,7 +63,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/avatars/:v", async function (req, res) {
|
app.get("/avatars/:v", async function (req, res) {
|
||||||
var url = `https://invid-api.poketube.fun/ggpht/${req.params.v}`;
|
var url = `https://invidious.snopyta.org/ggpht/${req.params.v}`;
|
||||||
|
|
||||||
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
|
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
|
||||||
method: req.method,
|
method: req.method,
|
||||||
|
@ -73,7 +73,7 @@ app.get("/avatars/:v", async function (req, res) {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/ggpht/:v", async function (req, res) {
|
app.get("/ggpht/:v", async function (req, res) {
|
||||||
var url = `https://invid-api.poketube.fun/ggpht/${req.params.v}`;
|
var url = `https://invidious.snopyta.org/ggpht/${req.params.v}`;
|
||||||
|
|
||||||
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
|
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
|
||||||
method: req.method,
|
method: req.method,
|
||||||
|
@ -84,7 +84,7 @@ app.get("/avatars/:v", async function (req, res) {
|
||||||
|
|
||||||
|
|
||||||
app.get("/avatars/ytc/:v", async function (req, res) {
|
app.get("/avatars/ytc/:v", async function (req, res) {
|
||||||
var url = `https://invid-api.poketube.fun/ggpht/ytc/${req.params.v.replace("ytc", "")}`;
|
var url = `https://invidious.snopyta.org/ggpht/ytc/${req.params.v.replace("ytc", "")}`;
|
||||||
|
|
||||||
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
|
let f = await modules.fetch(url + `?cachefixer=${btoa(Date.now())}`, {
|
||||||
method: req.method,
|
method: req.method,
|
||||||
|
|
|
@ -41,23 +41,14 @@ class PokeTubeDislikesAPIManager {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _getEngagementData() {
|
async _getEngagementData() {
|
||||||
const apiUrl = `https://prod-poketube.testing.poketube.fun/api?v=${this.videoId}&hash=d0550b6e28c8f93533a569c314d5b4e2`;
|
const apiUrl = `https://ryd-proxy.kavin.rocks/votes/${this.videoId}&hash=d0550b6e28c8f93533a569c314d5b4e2`;
|
||||||
const fallbackUrl = `https://returnyoutubedislikeapi.com/votes?videoId=${this.videoId}`;
|
const fallbackUrl = `https://returnyoutubedislikeapi.com/votes?videoId=${this.videoId}`;
|
||||||
|
|
||||||
const { fetch } = await import("undici");
|
const { fetch } = await import("undici");
|
||||||
|
|
||||||
|
|
||||||
try {
|
|
||||||
const engagement = await fetch(apiUrl).then((res) => res.json());
|
const engagement = await fetch(apiUrl).then((res) => res.json());
|
||||||
return engagement;
|
return engagement
|
||||||
} catch {
|
|
||||||
try {
|
|
||||||
const engagement = await fetch(fallbackUrl).then((res) => res.json());
|
|
||||||
return engagement;
|
|
||||||
} catch {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ function toObject(arr) {
|
||||||
|
|
||||||
// Gets Invidious instances
|
// Gets Invidious instances
|
||||||
const invInstanceList = [
|
const invInstanceList = [
|
||||||
"https://yt.miruku.cafe"
|
"https://video-proxy.poketube.fun"
|
||||||
];
|
];
|
||||||
|
|
||||||
// Gets a random instance from the list
|
// Gets a random instance from the list
|
||||||
|
@ -66,7 +66,7 @@ const videoProxyObject = {
|
||||||
cacheBuster: "d0550b6e28c8f93533a569c314d5b4e2",
|
cacheBuster: "d0550b6e28c8f93533a569c314d5b4e2",
|
||||||
InvidiousPoketube: "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8",
|
InvidiousPoketube: "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8",
|
||||||
url: url,
|
url: url,
|
||||||
losslessurl: "https://yt.miruku.cafe"
|
losslessurl: "https://lossless-proxy.poketube.fun"
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = async function (video_id) {
|
module.exports = async function (video_id) {
|
||||||
|
|
Loading…
Reference in a new issue