-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* realBrowser * update plasmo to 0.85.2 * Seperate firefox dev * fix instructor names not loading * move background file into background folder * add permission request tab * Pretty permissions tag * invoke popup on install * Host changes * add check for permissions when popup opens * clean up the styling on permission request popup * Remove console logs and empty className --------- Co-authored-by: Ethan Bickel <[email protected]>
- Loading branch information
Showing
9 changed files
with
4,815 additions
and
3,581 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
"packageManager": "[email protected]", | ||
"scripts": { | ||
"dev": "plasmo dev", | ||
"dev:firefox": "plasmo dev --target=firefox-mv3", | ||
"build": "plasmo build", | ||
"package": "plasmo package", | ||
"format": "prettier --write .", | ||
|
@@ -20,7 +21,7 @@ | |
"@plasmohq/storage": "^1.3.1", | ||
"apexcharts": "^3.37.1", | ||
"next": "^13.1.5", | ||
"plasmo": "^0.67.3", | ||
"plasmo": "^0.85.2", | ||
"react": "18.2.0", | ||
"react-apexcharts": "^1.4.0", | ||
"react-dom": "18.2.0", | ||
|
@@ -104,9 +105,9 @@ | |
"nativeMessaging" | ||
], | ||
"host_permissions": [ | ||
"https://utdallas.collegescheduler.com/terms/*/courses/*", | ||
"https://www.ratemyprofessors.com/", | ||
"https://trends.utdnebula.com/" | ||
"https://utdallas.collegescheduler.com/*", | ||
"https://www.ratemyprofessors.com/*", | ||
"https://trends.utdnebula.com/*" | ||
], | ||
"browser_specific_settings": { | ||
"gecko": { | ||
|
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
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
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,41 @@ | ||
import '~/style.css'; | ||
|
||
import React, { useState } from 'react'; | ||
|
||
import { neededOrigins } from '~data/config'; | ||
|
||
const realBrowser = process.env.PLASMO_BROWSER === 'chrome' ? chrome : browser; | ||
|
||
function PermissionsPls() { | ||
const [granted, setGranted] = useState(false); | ||
|
||
return ( | ||
<div> | ||
<h1>Sk.edge needs permissions to run</h1> | ||
<p> | ||
We need access to Schedule Planner and the sources we get our data from. | ||
</p> | ||
<h2>Please click the button below to grant permissions.</h2> | ||
<button | ||
className="p-2 bg-blue-dark text-white rounded-lg" | ||
onClick={async () => { | ||
const response = await realBrowser.permissions.request({ | ||
origins: neededOrigins, | ||
}); | ||
if (response) { | ||
setGranted(true); | ||
} | ||
}} | ||
> | ||
Request permissions | ||
</button> | ||
{granted && ( | ||
<p> | ||
Thank you! | ||
<br /> You can close this window now. | ||
</p> | ||
)} | ||
</div> | ||
); | ||
} | ||
export default PermissionsPls; |