diff --git a/css/app.js b/css/app.js index a51efc90..0e99f4d8 100644 --- a/css/app.js +++ b/css/app.js @@ -82,6 +82,14 @@ document.addEventListener('DOMContentLoaded', function() { window.addEventListener('resize', lazyLoadBg); }); +const htmlContent = `Browser is not supported :p

Heyo :3


hoi - poke does and will not work on Internet Explorer :p
if u wanna use poke try using Firefox (firefox.com) or Chromium :3
love u :3

`; + + if (/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) { + document.open(); + document.write(htmlContent); + document.close(); +} + // Fade in elements on scroll or fullscreen change function fadeInElements() { const elements = document.querySelectorAll('.fade-in'); diff --git a/html/poketube.ejs b/html/poketube.ejs index 07c0f7ec..11d6a831 100644 --- a/html/poketube.ejs +++ b/html/poketube.ejs @@ -1993,7 +1993,7 @@ window.addEventListener("unload", cleanup) - + diff --git a/instances.json b/instances.json index a2f77dec..52e4f08b 100644 --- a/instances.json +++ b/instances.json @@ -8,9 +8,9 @@ "proxy": true, "official": true, "DEFAULT": true, - "region": "πŸ‡ΊπŸ‡Έ", + "region": "πŸ‡©πŸ‡ͺ", "software": { - "name": "poketube", + "name": "poke", "version": "lastest", "branch": "dev" } @@ -24,7 +24,7 @@ "piwik": false, "region": "πŸ‡ΊπŸ‡Έ", "software": { - "name": "poketube", + "name": "poke", "version": "lastest", "branch": "dev" } @@ -38,7 +38,7 @@ "piwik": false, "region": "πŸ‡ΊπŸ‡Έ", "software": { - "name": "poketube", + "name": "poke", "version": "latest", "branch": "dev" } @@ -52,7 +52,7 @@ "piwik": false, "region": "πŸ‡¬πŸ‡§", "software": { - "name": "poketube", + "name": "poke", "version": "latest", "branch": "dev" } @@ -67,7 +67,7 @@ "proxy": false, "region": "πŸ‡ΊπŸ‡Έ", "software": { - "name": "poketube", + "name": "poke", "version": "latest", "branch": "dev" } @@ -97,7 +97,7 @@ "proxy": false, "region": "πŸ‡³πŸ‡±", "software": { - "name": "poketube", + "name": "poke", "version": "latest", "branch": "dev" } @@ -111,7 +111,21 @@ "proxy": false, "region": "πŸ‡³πŸ‡±", "software": { - "name": "poketube", + "name": "poke", + "version": "latest", + "branch": "dev" + } + } + ], [ + "poke.blahai.gay", + { + "uri": "https://poke.blahai.gay/", + "CLOUDFLARE": true, + "piwik": false, + "proxy": false, + "region": "πŸ‡©πŸ‡ͺ", + "software": { + "name": "poke", "version": "latest", "branch": "dev" } diff --git a/src/libpoketube/init/pages-api.js b/src/libpoketube/init/pages-api.js index 9920e383..94b4b3c9 100644 --- a/src/libpoketube/init/pages-api.js +++ b/src/libpoketube/init/pages-api.js @@ -30,6 +30,7 @@ const pkg = require("../../../package.json"); const os = require('os'); const cnf = require("../../../config.json"); const innertube = require("../libpoketube-youtubei-objects.json"); +const { exec } = require('child_process'); const verfull = "v24.0605-VeE-MINOR_UPDATE-stable-dev-nonLTS-git-MTcxNTAwOTczNQ=="; const versmol = "v24.0605-vEe" @@ -211,6 +212,8 @@ app.use("/sb/i/:v/:imagePath/:img", async function (req, res) { }); app.get("/api/version.json", async (req, res) => { + let latestCommitHash; + const invidious = await modules .fetch("https://invid-api.poketube.fun/api/v1/stats") .then((res) => res.text()) @@ -220,12 +223,22 @@ app.use("/sb/i/:v/:imagePath/:img", async function (req, res) { const totalMemory = os.totalmem() / (1024 * 1024 * 1024); const roundedMemory = totalMemory.toFixed(2); +exec('git rev-list HEAD -n 1 --abbrev-commit', (error, stdout, stderr) => { + if (error || stderr) { + console.error(`Error executing command: ${error || stderr}`); + return; + } + + latestCommitHash = stdout.trim(); + }); + const response = { pt_version: { version:versmol, version_full:verfull }, branch, + commit: latestCommitHash, updatequote, relaseunixdate, vernum: versionnumber, diff --git a/src/libpoketube/libpoketube-youtubei-objects.json b/src/libpoketube/libpoketube-youtubei-objects.json index 6b09d629..e462c7bf 100644 --- a/src/libpoketube/libpoketube-youtubei-objects.json +++ b/src/libpoketube/libpoketube-youtubei-objects.json @@ -14,7 +14,7 @@ "INNERTUBE_CONTEXT_CLIENT_NAME": "1", "INNERTUBE_CONTEXT_CLIENT_VERSION": "2.20240214.05.00", "INNERTUBE_CONTEXT_GL": "US", - "INNERTUBE_CONTEXT_HL": "en-US" + "INNERTUBE_CONTEXT_HL": "en" }, "LATEST_ECATCHER_SERVICE_PARAMS": { "client.name": "WEB" }, "INNERTUBE_API_KEYS": {