Commit ba01ceede5

ba01ceede5bedc8fab0f86e7dff12904af53822b

parent: f943ff78e7

Unsigned

Alicia Sykes <alicia@omg.lol> · 2026-05-12 16:47 UTC

Fixes web-check link, and open in new tab

Layout: unified · split

web/src/components/form/Button.astro +2 −2
@@ -1,9 +1,9 @@
11---
2const { text, url, className, title } = Astro.props;
2const { text, url, className, title, target, rel } = Astro.props;
33---
44
55<div class={`button ${className || ''}`} title={title}>
6 <a href={url}>{text}<slot /></a>
6 <a href={url} target={target} rel={rel}>{text}<slot /></a>
77</div>
88
99<style lang="scss">
web/src/components/things/WebsiteDetailedInfo.astro +10 −2
@@ -41,6 +41,14 @@ else if (risk >= 75) riskText = 'very dangerous';
4141
4242const screenshotUrl = `https://screenshot-cache.as93.workers.dev/${url}`;
4343
44let webCheckTarget: string;
45try {
46 webCheckTarget = new URL(/^https?:\/\//i.test(url) ? url : `https://${url}`).host;
47} catch {
48 webCheckTarget = encodeURIComponent(url);
49}
50const webCheckLink = `https://web-check.xyz/check/${webCheckTarget}`;
51
4452---
4553
4654<div class="website-info-wrapper">
@@ -162,7 +170,7 @@ const screenshotUrl = `https://screenshot-cache.as93.workers.dev/${url}`;
162170 <h4>Website Preview</h4>
163171 <img class="preview-shot" src={screenshotUrl} alt="Website preview" width="300" height="50" />
164172 <div class="link-to-web-check">
165 <Button url={`https://web-check.xyz/check/${url}`}>
173 <Button url={webCheckLink} target="_blank" rel="noopener">
166174 <img width="32" src="https://web-check.xyz/favicon.svg" />
167175 <div class="btn-text">
168176 <span>View full report at</span>
@@ -273,7 +281,7 @@ const screenshotUrl = `https://screenshot-cache.as93.workers.dev/${url}`;
273281 transform: scale(0.8);
274282 opacity: var(--opacity-subtle);
275283 transition: var(--transition-normal);
276 &:hover { transform: scale(0.85); opacity: 1; }
284 &:hover { opacity: 1; }
277285 :global(.button) {
278286 background: var(--accent-3);
279287 }