first drafts from AI

This commit is contained in:
Max Ace 2023-10-03 23:55:15 -04:00
commit f608013166
2 changed files with 44 additions and 0 deletions

15
content.js Normal file
View 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
View 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"
}
}