commit 6c7dc9266158b2f4ca2b470b15d771bee7061340 Author: michaelachrisco Date: Fri May 3 16:19:50 2024 -0700 Upload files to "/" diff --git a/background.js b/background.js new file mode 100644 index 0000000..0a58818 --- /dev/null +++ b/background.js @@ -0,0 +1,8 @@ +chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { + if (changeInfo.status === 'complete' && tab.url.includes('accela.com')) { + chrome.scripting.executeScript({ + target: {tabId: tabId}, + files: ['content.js'] + }); + } +}); \ No newline at end of file diff --git a/content.js b/content.js new file mode 100644 index 0000000..df16e75 --- /dev/null +++ b/content.js @@ -0,0 +1 @@ +alert('You are on an Accela website!'); \ No newline at end of file diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..60865dc --- /dev/null +++ b/manifest.json @@ -0,0 +1,17 @@ +{ + "manifest_version": 3, + "name": "Accela Alert", + "version": "1.0", + "description": "Alerts users when they navigate to an Accela website.", + "permissions": ["tabs", "scripting","activeTab", "declarativeContent"], + "background": { + "service_worker": "background.js" + }, + "action": { + "default_popup": "popup.html" + }, + "host_permissions": [ + "https://*.accela.com/*" + ] + } + \ No newline at end of file diff --git a/popup.html b/popup.html new file mode 100644 index 0000000..525b0dc --- /dev/null +++ b/popup.html @@ -0,0 +1,16 @@ + + + + Accela Alert + + + +

Accela Alert

+

This extension alerts you when you navigate to an Accela website.

+ +