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 @@ |
| 1 | --- |
1 | --- |
| 2 | |
2 | |
| 3 | import type { WebsiteData } from '@utils/fetch-website-info'; |
3 | import type { WebsiteData } from '@utils/fetch-website-info'; |
| |
4 | import type { WebsiteTracker } from '@utils/fetch-trackers-info'; |
| 4 | import { analyzeSecurityChecks } from '@utils/security-check-mappings'; |
5 | import { analyzeSecurityChecks } from '@utils/security-check-mappings'; |
| 5 | import FontAwesome from "@components/form/FontAwesome.svelte" |
6 | import FontAwesome from "@components/form/FontAwesome.svelte" |
| 6 | import Button from '@components/form/Button.astro'; |
7 | import Button from '@components/form/Button.astro'; |
| @@ -8,9 +9,10 @@ import Button from '@components/form/Button.astro'; |
| 8 | interface Props { |
9 | interface Props { |
| 9 | websiteInfo: WebsiteData; |
10 | websiteInfo: WebsiteData; |
| 10 | url: string; |
11 | url: string; |
| |
12 | trackers?: WebsiteTracker[]; |
| 11 | }; |
13 | }; |
| 12 | |
14 | |
| 13 | const { websiteInfo, url } = Astro.props; |
15 | const { websiteInfo, url, trackers } = Astro.props; |
| 14 | |
16 | |
| 15 | const categoryLabels: {[key: string]: string} = { |
17 | const categoryLabels: {[key: string]: string} = { |
| 16 | is_torrent: 'Torrenting', |
18 | is_torrent: 'Torrenting', |
| @@ -147,6 +149,31 @@ const webCheckLink = `https://web-check.xyz/check/${webCheckTarget}`; |
| 147 | </div> |
149 | </div> |
| 148 | </div> |
150 | </div> |
| 149 | <div class="right"> |
151 | <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 | )} |
| 150 | <h4>Blacklist Check</h4> |
177 | <h4>Blacklist Check</h4> |
| 151 | <p>{websiteInfo.url_parts.host} was found on <b>{websiteInfo.domain_blacklist.detections}</b> blacklists</p> |
178 | <p>{websiteInfo.url_parts.host} was found on <b>{websiteInfo.domain_blacklist.detections}</b> blacklists</p> |
| 152 | <ul> |
179 | <ul> |
| @@ -245,6 +272,11 @@ const webCheckLink = `https://web-check.xyz/check/${webCheckTarget}`; |
| 245 | opacity: var(--opacity-subtle); |
272 | opacity: var(--opacity-subtle); |
| 246 | font-style: italic; |
273 | font-style: italic; |
| 247 | } |
274 | } |
| |
275 | .tracker-owner { |
| |
276 | margin-left: var(--space-xs); |
| |
277 | font-size: var(--text-sm); |
| |
278 | opacity: var(--opacity-soft); |
| |
279 | } |
| 248 | |
280 | |
| 249 | .risk { |
281 | .risk { |
| 250 | font-size: var(--text-3xl); |
282 | font-size: var(--text-3xl); |
web/src/pages/[...listing].astro
+7 −1
| @@ -24,6 +24,7 @@ import { fetchGitHubStats } from '@utils/fetch-repo-info'; |
| 24 | import { fetchSecurityReport } from '@utils/fetch-security-info'; |
24 | import { fetchSecurityReport } from '@utils/fetch-security-info'; |
| 25 | import { fetchTosdrPrivacy } from '@utils/fetch-privacy-policy'; |
25 | import { fetchTosdrPrivacy } from '@utils/fetch-privacy-policy'; |
| 26 | import { fetchWebsiteInfo } from '@utils/fetch-website-info'; |
26 | import { fetchWebsiteInfo } from '@utils/fetch-website-info'; |
| |
27 | import { fetchTrackersInfo } from '@utils/fetch-trackers-info'; |
| 27 | import { fetchDockerData } from '@utils/fetch-docker-instructions'; |
28 | import { fetchDockerData } from '@utils/fetch-docker-instructions'; |
| 28 | import { fetchIosInfo } from '@utils/fetch-ios-info'; |
29 | import { fetchIosInfo } from '@utils/fetch-ios-info'; |
| 29 | import { fetchAndroidInfo } from '@utils/fetch-android-info'; |
30 | import { fetchAndroidInfo } from '@utils/fetch-android-info'; |
| @@ -166,6 +167,7 @@ const websiteData = |
| 166 | url && !ignoredSites.some((s) => url.includes(s)) |
167 | url && !ignoredSites.some((s) => url.includes(s)) |
| 167 | ? await fetchWebsiteInfo(url) |
168 | ? await fetchWebsiteInfo(url) |
| 168 | : null; |
169 | : null; |
| |
170 | const trackersData = websiteData ? await fetchTrackersInfo(url) : null; |
| 169 | |
171 | |
| 170 | const serviceHistory = await fetchChangelog().then(({ entries }) => { |
172 | const serviceHistory = await fetchChangelog().then(({ entries }) => { |
| 171 | const isMatch = (c: { name: string; category: string; section: string }) => |
173 | const isMatch = (c: { name: string; category: string; section: string }) => |
| @@ -306,7 +308,11 @@ const makeSoftwareSchema = () => { |
| 306 | websiteData && ( |
308 | websiteData && ( |
| 307 | <section> |
309 | <section> |
| 308 | <h2>{name} Website</h2> |
310 | <h2>{name} Website</h2> |
| 309 | <WebsiteDetailedInfo url={url} websiteInfo={websiteData} /> |
311 | <WebsiteDetailedInfo |
| |
312 | url={url} |
| |
313 | websiteInfo={websiteData} |
| |
314 | trackers={trackersData?.trackers} |
| |
315 | /> |
| 310 | </section> |
316 | </section> |
| 311 | ) |
317 | ) |
| 312 | } |
318 | } |
web/src/utils/fetch-trackers-info.ts
added
+19
| @@ -0,0 +1,19 @@ |
| |
1 | import { fetchEnrich } from './fetch-enrich'; |
| |
2 | |
| |
3 | export const fetchTrackersInfo = (url: string): Promise<TrackersInfo | null> => |
| |
4 | fetchEnrich<TrackersInfo>( |
| |
5 | 'Trackers', |
| |
6 | `/v1/enrich/trackers?url=${encodeURIComponent(url)}`, |
| |
7 | url, |
| |
8 | ); |
| |
9 | |
| |
10 | export interface WebsiteTracker { |
| |
11 | domain: string; |
| |
12 | owner: string; |
| |
13 | categories: string[]; |
| |
14 | } |
| |
15 | |
| |
16 | export interface TrackersInfo { |
| |
17 | finalUrl: string; |
| |
18 | trackers: WebsiteTracker[]; |
| |
19 | } |