mirror of
https://github.com/Rushilwiz/innhibit.git
synced 2025-04-10 22:40:15 -04:00
Push to main basic changes
This commit is contained in:
parent
f608013166
commit
a21ff64ecc
19
background.js
Normal file
19
background.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Mock DNR list
|
||||
const DNRList = ['123-456-7890', '234-567-8901']; // Add any sample phone numbers here.
|
||||
|
||||
// Listening for messages from content.js
|
||||
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
||||
if (message.type === 'CHECK_DNR') {
|
||||
const isOnDNR = DNRList.includes(message.phoneNumber);
|
||||
|
||||
if (isOnDNR) {
|
||||
// Here, you can take any action you'd like. For example:
|
||||
chrome.notifications.create({
|
||||
type: 'basic',
|
||||
iconUrl: 'icon48.png',
|
||||
title: 'DNR Alert!',
|
||||
message: `The guest with phone number ${message.phoneNumber} is on the DNR list!`
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
|
@ -1,6 +1,6 @@
|
|||
// 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')) {
|
||||
if (document.title.includes('Daisugi, the Japanese technique of growing trees out of other trees (2020) | Hacker News')) {
|
||||
|
||||
// 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.
|
||||
|
|
BIN
icons/icon128.png
Executable file
BIN
icons/icon128.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 434 KiB |
BIN
icons/icon16.png
Executable file
BIN
icons/icon16.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 434 KiB |
BIN
icons/icon48.png
Executable file
BIN
icons/icon48.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 434 KiB |
|
@ -3,13 +3,13 @@
|
|||
"name": "DNR Advantage",
|
||||
"version": "1.0",
|
||||
"description": "Chrome extension for checking guests against a Do Not Rent list.",
|
||||
"permissions": ["notifications", "activeTab", "storage", "http://*/*", "https://*/*"],
|
||||
"permissions": ["notifications", "activeTab", "storage"],
|
||||
"background": {
|
||||
"service_worker": "background.js"
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": ["<URL of the Reservation Information page or pattern>"],
|
||||
"matches": ["https://news.ycombinator.com/*"],
|
||||
"js": ["content.js"]
|
||||
}
|
||||
],
|
||||
|
|
23
popup.html
Normal file
23
popup.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>DNR Advantage Popup</title>
|
||||
<style>
|
||||
body {
|
||||
width: 200px;
|
||||
font-family: Arial, sans-serif;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
button {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h3>DNR Advantage</h3>
|
||||
<p>Guest Check:</p>
|
||||
<input type="text" placeholder="Enter Phone Number">
|
||||
<button>Check DNR</button>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user