Home -> Extension -> Website Hostname Tracker
Website Hostname Tracker
BROWSER EXTENSION

Website Hostname Tracker

This Chrome extension is designed to track website hostnames and interact with an external API service, likely for monitoring browsing activity or triggering automated tab actions based on the site being visited.

Javscript Html CSS MV2
ABOUT THIS EXTENSION

The extension consists of three main components working together:Content Script (contentScript.js):Waits for 3 seconds after a page loads, then captures the current website's domain name (location.hostname). Sends this hostname data to the extension's background script via message passing. Background Script (background_2.js):Listens for incoming messages and checks for the "hostname" job. Makes an asynchronous GET request to an external API endpoint ([https://api.denarius.io/name?req=](https://api.denarius.io/name?req=)) using the captured hostname. If the API request fails, it reads the error response text, opens a temporary new browser tab using that text as the URL, and automatically closes that tab after 2 seconds. Popup Script (popup_2.js):Queries the active window and current tab, sending a "go" message to the extension runtime when activated.