-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework Extension to Remove Hard Coded Constants and Add some Features (…
…#811) * Starting new feature development * changes for 2018 test hunt * Adopt service worker format * Add link to Sheet * Remove hunt and URL constants by sending that information from the web app to the extension * Clean upand remove extension key * remove extra debugging * Formatting * Address comments
- Loading branch information
Showing
6 changed files
with
190 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
chrome.runtime.onMessageExternal.addListener( | ||
async (request, sender, sendResponse) => { | ||
if (request.huntId != undefined) { | ||
chrome.storage.local.set({ huntId: request.huntId }); | ||
} | ||
if (sender.origin != undefined) { | ||
chrome.storage.local.set({ origin: sender.origin }); | ||
} | ||
if (sender.url != undefined) { | ||
chrome.storage.local.set({ huntUrl: sender.url }); | ||
} | ||
sendResponse({ success: true, message: "HuntId has been received" }); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,43 @@ | ||
{ | ||
"manifest_version": 3, | ||
"name": "Cardboard Chrome Extension", | ||
"version": "1.0.2", | ||
"name": "Cardboard Chrome Extension:BETA_LOCAL", | ||
"description": "THIS EXTENSION IS FOR BETA TESTING", | ||
"version": "1.0.4", | ||
"icons": { | ||
"16": "images/cardboard_bird.png", | ||
"32": "images/cardboard_bird.png", | ||
"48": "images/cardboard_bird.png", | ||
"128": "images/cardboard_bird.png" | ||
}, | ||
"action": { | ||
"default_popup": "popup.html" | ||
"default_popup": "popup.html", | ||
"default_icon": { | ||
"16": "images/cardboard_bird.png", | ||
"32": "images/cardboard_bird.png", | ||
"48": "images/cardboard_bird.png", | ||
"128": "images/cardboard_bird.png" | ||
} | ||
}, | ||
"permissions": [ | ||
"activeTab", | ||
"cookies" | ||
"cookies", | ||
"storage" | ||
], | ||
"background": { | ||
"service_worker": "background.js" | ||
}, | ||
"host_permissions": [ | ||
"http://127.0.0.1/*", | ||
"http://localhost/*", | ||
"https://cardboard.rocks/*", | ||
"https://www.cardboard.rocks/*" | ||
] | ||
"http://127.0.0.1/*", | ||
"http://localhost/*", | ||
"https://cardboard.rocks/*", | ||
"https://www.cardboard.rocks/*" | ||
], | ||
"externally_connectable": { | ||
"matches": [ | ||
"http://127.0.0.1/*", | ||
"http://localhost/*", | ||
"https://cardboard.rocks/*", | ||
"https://www.cardboard.rocks/*" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters