From e2e3646d77403dc52f97ed55ea488cb2bf3546c0 Mon Sep 17 00:00:00 2001 From: ashley Date: Thu, 6 Nov 2025 23:19:20 +0100 Subject: [PATCH] Update src/libpoketube/init/pages-api.js --- src/libpoketube/init/pages-api.js | 121 ++++++++++++++++++++---------- 1 file changed, 82 insertions(+), 39 deletions(-) diff --git a/src/libpoketube/init/pages-api.js b/src/libpoketube/init/pages-api.js index 1c880600..77d9089b 100644 --- a/src/libpoketube/init/pages-api.js +++ b/src/libpoketube/init/pages-api.js @@ -131,7 +131,7 @@ if (!data.users) data.users = {} }) } - // Human view – /api/stats?view=human + // Human view – /api/stats?view=human (just stats UI) if (view === "human") { const telemetryOn = telemetryConfig.telemetry @@ -139,7 +139,7 @@ if (!data.users) data.users = {} - Improving Poke + Improving Poke – Stats + + +
+ Poke logo +

Improving Poke

+

Private by design

- if (!data.videos) data.videos = {} - if (!data.browsers) data.browsers = {} - if (!data.os) data.os = {} - if (!data.users) data.users = {} +

+ At Poke, we do not collect or share any personal information. + That's our privacy promise in a nutshell. + To improve Poke we use a completely anonymous, local-only way to figure out how the site is being used. +

- const sortedVideos = Object.entries(data.videos) - .sort((a, b) => b[1] - a[1]) - .slice(0, 10) +

+ Any anonymous stats recorded by this instance come from the /api/stats system. + You can read exactly what is measured (and what is not) in our privacy policy: + /policies/privacy#stats. +

- const topVideos = Object.fromEntries(sortedVideos) - - res.json({ - videos: topVideos, - browsers: data.browsers, - os: data.os, - totalUsers: Object.keys(data.users).length - }) +
+
+ +`) }) + app.get("/avatars/:v", async function (req, res) { var url = `https://yt3.ggpht.com/${req.params.v}`;