From 2011fed9f204f2f805459924b16847ff18e35fcb Mon Sep 17 00:00:00 2001
From: "legendary.fish"
<129801050+legendaryfishwastaken@users.noreply.github.com>
Date: Fri, 8 Nov 2024 17:21:53 -0500
Subject: [PATCH] Update index.js
---
src/pub/index.js | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/pub/index.js b/src/pub/index.js
index 4dacee5..686795c 100644
--- a/src/pub/index.js
+++ b/src/pub/index.js
@@ -50,7 +50,15 @@ document.addEventListener("DOMContentLoaded", async () => {
handleStatusUpdate("extension_page", currentUrl);
return; // Skip further processing since it's an internal page
}
-
+
+ // Check if the URL is a chrome page
+ if (
+ currentUrl.startsWith("chrome://")
+ ) {
+ handleStatusUpdate("chrome_page", currentUrl);
+ return; // Skip further processing since it's an internal page
+ }
+
// Send a message to the background script to check the site's status
const response = await browserAPI.runtime.sendMessage({
action: "checkSiteStatus",
@@ -112,6 +120,9 @@ document.addEventListener("DOMContentLoaded", async () => {
case "no_data":
message = `No data available for ${displayUrl}.`;
break;
+ case "chrome_page":
+ message =
+ "You are on a chrome page. This page is managed by your browser.";
default:
message = `An unknown status was received for ${displayUrl}.`;
}
@@ -132,6 +143,7 @@ document.addEventListener("DOMContentLoaded", async () => {
safe: "../res/icons/safe.png",
starred: "../res/icons/starred.png",
extension_page: "../res/ext_icon_144.png",
+ chrome_page: "../res/ext_icon_144.png",
no_data: "../res/ext_icon_144.png",
error: "../res/icons/error.png",
unknown: "../res/ext_icon_144.png",