hereās a breakdown of what i did in these 4 hours:
gemini api implementation: i connected the extension to the gemini 2.5 pro model (completely free model that i got from google ai studio so users of this extension doesnāt have to pay for anything). now, instead of just checking a list of bad urls, the extension scrapes the dom (headers, buttons, links) and asks the ai to summarize the safety of the page.
access denied ui: designed a custom āinterstitialā block page. if the ai gives a threat rating of 4/10 or higher, the extension injects a full-screen overlay that prevents the user from interacting with the malicious site. (i was gonna add a screenshot of this block page but i couldnāt find any phsihing sites D:)
dynamic whitelisting: implemented a system using chrome.storage.local. users can now manually trust a domain through the popup. once a site is whitelisted, the content script skips the ai scan to save api quota and make browsing faster.
logic flow: structured the messaging between popup.js, content.js, and background.js so the safety verdict stays consistent even if you refresh the page.