Description
Currently after scanning a URL, there is no way to share the result with someone else.
Users who find a suspicious link and want to warn others have to manually copy and
explain the result. A shareable link would make this much easier.
Expected Behaviour
After a scan completes (safe or danger), a "Share Result" button should appear on the
result card. Clicking it should generate a link like:
https://cybershield-url.netlify.app/?url=https://suspicious-site.com
Opening that link should auto-fill the URL input and immediately trigger the scan,
so the recipient sees the result without any extra steps.
Implementation Suggestion
- Add a "Share" button inside
showResult() in script.js
- On click, construct
window.location.origin + '?url=' + encodeURIComponent(scannedUrl)
and copy it to clipboard using navigator.clipboard.writeText()
- On page load, check
new URLSearchParams(window.location.search).get('url') —
if present, auto-fill the input and call checkSecurity() automatically
- Show "Link copied!" feedback for ~2 seconds after clicking
- Button should use existing design tokens (no new dependencies)
Files to change
script.js — update showResult() to add Share button, add URL param auto-scan on load
style.css — add share button styles matching existing design system
heyy @Mrinalray ,I'd like to work on this issue.
Description
Currently after scanning a URL, there is no way to share the result with someone else.
Users who find a suspicious link and want to warn others have to manually copy and
explain the result. A shareable link would make this much easier.
Expected Behaviour
After a scan completes (safe or danger), a "Share Result" button should appear on the
result card. Clicking it should generate a link like:
https://cybershield-url.netlify.app/?url=https://suspicious-site.com
Opening that link should auto-fill the URL input and immediately trigger the scan,
so the recipient sees the result without any extra steps.
Implementation Suggestion
showResult()inscript.jswindow.location.origin + '?url=' + encodeURIComponent(scannedUrl)and copy it to clipboard using
navigator.clipboard.writeText()new URLSearchParams(window.location.search).get('url')—if present, auto-fill the input and call
checkSecurity()automaticallyFiles to change
script.js— updateshowResult()to add Share button, add URL param auto-scan on loadstyle.css— add share button styles matching existing design systemheyy @Mrinalray ,I'd like to work on this issue.