-
Notifications
You must be signed in to change notification settings - Fork 33
Fix: Compatibility issues for Firefox #287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a1c7d74
Fixes Support for Setting Net Rules on Firefox
Step7750 81c7a4b
Add simple permission popup
GODrums ae5986f
Restyle popup
GODrums 3f11e79
Make sure to reload extension
GODrums a4d537a
chore: run format
GODrums d5da258
chore: update Chrome types
GODrums 8eec360
Update button style for disabled state
GODrums 16552d8
Update button text
GODrums fc03a66
Adjust offer tracking banner for Firefox
GODrums d6d3a5e
chore: run formatting
GODrums b483749
Update alert text
GODrums 4b702ee
Require optional host permission on Firefox
GODrums File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,66 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" | ||
| rel="stylesheet" | ||
| /> | ||
| <style> | ||
| body { | ||
| width: 300px; | ||
| padding: 16px; | ||
| background-color: #15171c; | ||
| } | ||
| button { | ||
| width: 100%; | ||
| padding: 10px; | ||
| background-color: rgba(35, 123, 255, 0.15); | ||
| color: #237bff; | ||
| border: none; | ||
| border-radius: 8px; | ||
| cursor: pointer; | ||
| font-family: 'Roboto', serif; | ||
| font-size: 14px; | ||
| font-weight: 500; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| gap: 8px; | ||
| } | ||
| button:hover { | ||
| background-color: #2a374d; | ||
| } | ||
| button:disabled { | ||
| cursor: not-allowed; | ||
| background-color: rgba(255, 255, 255, .12); | ||
| color: rgba(255, 255, 255, .5); | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <button id="requestPermissions"> | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="24" | ||
| height="24" | ||
| viewBox="0 0 24 24" | ||
| fill="none" | ||
| stroke="currentColor" | ||
| stroke-width="3" | ||
| stroke-linecap="round" | ||
| stroke-linejoin="round" | ||
| > | ||
| <path | ||
| d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" | ||
| /> | ||
| <path d="M12 8v4" /> | ||
| <path d="M12 16h.01" /> | ||
| </svg> | ||
| <span>Enable Offer Tracking</span> | ||
| </button> | ||
| <script src="popup/popup.js"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or 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,30 @@ | ||
| window.addEventListener('DOMContentLoaded', async () => { | ||
| const requestButton = document.getElementById('requestPermissions'); | ||
| if (!requestButton) { | ||
| return; | ||
| } | ||
|
|
||
| const hasPermissions = await chrome.permissions.contains({ | ||
| origins: ['*://*.steampowered.com/*'], | ||
| }); | ||
|
|
||
| if (hasPermissions) { | ||
| // If permissions are already granted, disable the button | ||
| requestButton.children[1].textContent = 'Offer Tracking Enabled'; | ||
| requestButton.setAttribute('disabled', 'true'); | ||
| } else { | ||
| requestButton.addEventListener('click', async () => { | ||
| try { | ||
| const success = await chrome.permissions.request({ | ||
| origins: ['*://*.steampowered.com/*'], | ||
| }); | ||
| if (success) { | ||
| // extension requires reload to apply permissions | ||
| browser.runtime.reload(); | ||
| } | ||
| } catch (error) { | ||
| console.error('Error requesting permissions:', error); | ||
| } | ||
| }); | ||
| } | ||
| }); | ||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.