From 5f0e28e506559d3066327c4cf3d9073664b7809a Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Fri, 23 Dec 2022 03:05:09 +0100 Subject: [PATCH] Only count views on the official instances --- src/count.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/count.js b/src/count.js index f2cf888..a69f3d0 100644 --- a/src/count.js +++ b/src/count.js @@ -38,6 +38,14 @@ fetch("//gc.zgo.at/", { method: "HEAD" }) return; } + if ( + window.location.host !== "toot.kytta.dev" && + window.location.host !== "s2f.kytta.dev" && + window.location.host !== "share2fedi.kytta.dev" + ) { + return; + } + const screen = encodeURIComponent( [ window.screen.width,