mirror of
https://github.com/Rushilwiz/innhibit.git
synced 2025-04-10 22:40:15 -04:00
first drafts from AI
This commit is contained in:
commit
f608013166
15
content.js
Normal file
15
content.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Check if the current page is the Reservation Information page
|
||||
// (You might need more specific conditions depending on the page structure.)
|
||||
if (document.title.includes('Reservation Information')) {
|
||||
|
||||
// Find the element containing the guest's phone number.
|
||||
// This is a placeholder. You'll need to adjust this based on the actual structure of the webpage.
|
||||
const phoneNumberElement = document.querySelector('.phone-number-class');
|
||||
|
||||
if (phoneNumberElement) {
|
||||
const phoneNumber = phoneNumberElement.textContent.trim();
|
||||
|
||||
// Send the phone number to the background script for further processing.
|
||||
chrome.runtime.sendMessage({type: 'CHECK_DNR', phoneNumber: phoneNumber});
|
||||
}
|
||||
}
|
29
manifest.json
Normal file
29
manifest.json
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"name": "DNR Advantage",
|
||||
"version": "1.0",
|
||||
"description": "Chrome extension for checking guests against a Do Not Rent list.",
|
||||
"permissions": ["notifications", "activeTab", "storage", "http://*/*", "https://*/*"],
|
||||
"background": {
|
||||
"service_worker": "background.js"
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["<URL of the Reservation Information page or pattern>"],
|
||||
"js": ["content.js"]
|
||||
}
|
||||
],
|
||||
"action": {
|
||||
"default_popup": "popup.html",
|
||||
"default_icon": {
|
||||
"16": "icons/icon16.png",
|
||||
"48": "icons/icon48.png",
|
||||
"128": "icons/icon128.png"
|
||||
}
|
||||
},
|
||||
"icons": {
|
||||
"16": "icons/icon16.png",
|
||||
"48": "icons/icon48.png",
|
||||
"128": "icons/icon128.png"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user