Commit 0ed7606176

0ed76061767f617532b9f7e8d29887b5460b144d

parent: be761f9f3f

Unsigned

Alicia Sykes <alicia@omg.lol> · 2026-10-11 19:54 UTC

Shows known trackers on each entries page

Layout: unified · split

web/src/components/things/WebsiteDetailedInfo.astro +33 −1
@@ -1,6 +1,7 @@
11---
22
33import type { WebsiteData } from '@utils/fetch-website-info';
4import type { WebsiteTracker } from '@utils/fetch-trackers-info';
45import { analyzeSecurityChecks } from '@utils/security-check-mappings';
56import FontAwesome from "@components/form/FontAwesome.svelte"
67import Button from '@components/form/Button.astro';
@@ -8,9 +9,10 @@ import Button from '@components/form/Button.astro';
89interface Props {
910 websiteInfo: WebsiteData;
1011 url: string;
12 trackers?: WebsiteTracker[];
1113};
1214
13const { websiteInfo, url } = Astro.props;
15const { websiteInfo, url, trackers } = Astro.props;
1416
1517const categoryLabels: {[key: string]: string} = {
1618 is_torrent: 'Torrenting',
@@ -147,6 +149,31 @@ const webCheckLink = `https://web-check.xyz/check/${webCheckTarget}`;
147149 </div>
148150 </div>
149151 <div class="right">
152 {trackers && (
153 <>
154 <h4>Trackers</h4>
155 { trackers.length > 0 ? (
156 <>
157 <p class="explainer">
158 Loads {trackers.length} third-party tracker{trackers.length === 1 ? '' : 's'}
159 </p>
160 <ul>
161 {trackers.map((tracker) => (
162 <li class="all-bad" title={tracker.categories.join(', ') || undefined}>
163 <FontAwesome iconName="warning" /> {tracker.domain}
164 {tracker.owner && <span class="tracker-owner">{tracker.owner}</span>}
165 </li>
166 ))}
167 </ul>
168 </>
169 ) : (
170 <p class="all-good">
171 <FontAwesome iconName="noTrackers" />
172 No known trackers found
173 </p>
174 )}
175 </>
176 )}
150177 <h4>Blacklist Check</h4>
151178 <p>{websiteInfo.url_parts.host} was found on <b>{websiteInfo.domain_blacklist.detections}</b> blacklists</p>
152179 <ul>
@@ -245,6 +272,11 @@ const webCheckLink = `https://web-check.xyz/check/${webCheckTarget}`;
245272 opacity: var(--opacity-subtle);
246273 font-style: italic;
247274 }
275 .tracker-owner {
276 margin-left: var(--space-xs);
277 font-size: var(--text-sm);
278 opacity: var(--opacity-soft);
279 }
248280
249281 .risk {
250282 font-size: var(--text-3xl);
web/src/pages/[...listing].astro +7 −1
@@ -24,6 +24,7 @@ import { fetchGitHubStats } from '@utils/fetch-repo-info';
2424import { fetchSecurityReport } from '@utils/fetch-security-info';
2525import { fetchTosdrPrivacy } from '@utils/fetch-privacy-policy';
2626import { fetchWebsiteInfo } from '@utils/fetch-website-info';
27import { fetchTrackersInfo } from '@utils/fetch-trackers-info';
2728import { fetchDockerData } from '@utils/fetch-docker-instructions';
2829import { fetchIosInfo } from '@utils/fetch-ios-info';
2930import { fetchAndroidInfo } from '@utils/fetch-android-info';
@@ -166,6 +167,7 @@ const websiteData =
166167 url && !ignoredSites.some((s) => url.includes(s))
167168 ? await fetchWebsiteInfo(url)
168169 : null;
170const trackersData = websiteData ? await fetchTrackersInfo(url) : null;
169171
170172const serviceHistory = await fetchChangelog().then(({ entries }) => {
171173 const isMatch = (c: { name: string; category: string; section: string }) =>
@@ -306,7 +308,11 @@ const makeSoftwareSchema = () => {
306308 websiteData && (
307309 <section>
308310 <h2>{name} Website</h2>
309 <WebsiteDetailedInfo url={url} websiteInfo={websiteData} />
311 <WebsiteDetailedInfo
312 url={url}
313 websiteInfo={websiteData}
314 trackers={trackersData?.trackers}
315 />
310316 </section>
311317 )
312318 }
web/src/utils/fetch-trackers-info.ts added +19
@@ -0,0 +1,19 @@
1import { fetchEnrich } from './fetch-enrich';
2
3export const fetchTrackersInfo = (url: string): Promise<TrackersInfo | null> =>
4 fetchEnrich<TrackersInfo>(
5 'Trackers',
6 `/v1/enrich/trackers?url=${encodeURIComponent(url)}`,
7 url,
8 );
9
10export interface WebsiteTracker {
11 domain: string;
12 owner: string;
13 categories: string[];
14}
15
16export interface TrackersInfo {
17 finalUrl: string;
18 trackers: WebsiteTracker[];
19}