-
Notifications
You must be signed in to change notification settings - Fork 36
feat: add options page #158
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
Open
ayoung19
wants to merge
24
commits into
master
Choose a base branch
from
feature/options-page
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,516
−73
Open
Changes from 6 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
1bc0221
Add options page configs
ayoung19 9663c8b
Add settings manipulation
ayoung19 57ec431
Add functionality
ayoung19 4c35d9d
Merge branch 'master' into feature/options-page
ayoung19 40695fd
Remove about page and inventory settings
ayoung19 fc1c3d2
Add settings button, still needs to support firefox
ayoung19 1071527
Add suggestions
ayoung19 00b7ebc
Add get/set wrappers
ayoung19 5dce6e8
Merge
ayoung19 05bb8d3
Merge
ayoung19 ed35677
CSGO -> CS
ayoung19 1e336cc
Revert package/lock json
ayoung19 e5f6f49
Readd dependencies
ayoung19 86facc9
Support firefox manifest
ayoung19 5b0609a
Update logo
ayoung19 48a411c
Merge branch 'master' into feature/options-page
ayoung19 5f34f07
Merge
ayoung19 2bb645e
Import type
ayoung19 fde53b6
Update workflow
ayoung19 153c7ff
Merge branch 'master' into feature/options-page
ayoung19 34ea887
Remove type import
ayoung19 5291ae4
Remove fs
ayoung19 66c5688
Attempt to fix package-lock json changes
ayoung19 ac93406
Revert "Attempt to fix package-lock json changes"
ayoung19 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
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 |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| { | ||
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "ecmaVersion": 12, | ||
| "sourceType": "module" | ||
| }, | ||
| "plugins": ["@typescript-eslint"], | ||
| "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], | ||
| "rules": { | ||
| "@typescript-eslint/no-non-null-assertion": "off", | ||
| "@typescript-eslint/no-explicit-any": "off", | ||
| "@typescript-eslint/no-inferrable-types": "off", | ||
| "@typescript-eslint/ban-ts-comment": "off", | ||
| "@typescript-eslint/no-empty-function": "off", | ||
| "@typescript-eslint/no-unused-vars": "off", | ||
| "@typescript-eslint/no-empty-interface": "off" | ||
| }, | ||
| "env": { | ||
| "browser": true, | ||
| "es2021": true | ||
| } | ||
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "ecmaVersion": 12, | ||
| "sourceType": "module" | ||
| }, | ||
| "plugins": ["@typescript-eslint"], | ||
| "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"], | ||
| "rules": { | ||
| "@typescript-eslint/no-non-null-assertion": "off", | ||
| "@typescript-eslint/no-explicit-any": "off", | ||
| "@typescript-eslint/no-inferrable-types": "off", | ||
| "@typescript-eslint/ban-ts-comment": "off", | ||
| "@typescript-eslint/no-empty-function": "off", | ||
| "@typescript-eslint/no-unused-vars": "off", | ||
| "@typescript-eslint/no-empty-interface": "off" | ||
| }, | ||
| "env": { | ||
| "browser": true, | ||
| "es2021": true | ||
| } | ||
| } |
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
Large diffs are not rendered by default.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import {RequestHandler} from '../types'; | ||
| import {RequestType} from './types'; | ||
| import {isFirefox} from '../../utils/detect'; | ||
|
|
||
| class OpenOptionsPageHandler implements RequestHandler<undefined, void> { | ||
ayoung19 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| getType(): RequestType { | ||
| return RequestType.OPEN_OPTIONS_PAGE; | ||
| } | ||
|
|
||
| async handleRequest(request: undefined, sender: chrome.runtime.MessageSender): Promise<void> { | ||
| if (isFirefox()) { | ||
ayoung19 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return await browser.runtime.openOptionsPage(); | ||
| } | ||
|
|
||
| return chrome.runtime.openOptionsPage(); | ||
| } | ||
| } | ||
|
|
||
| export const OpenOptionsPage = new OpenOptionsPageHandler(); | ||
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 |
|---|---|---|
|
|
@@ -10,4 +10,5 @@ export enum RequestType { | |
| FETCH_PENDING_TRADES, | ||
| FETCH_SKIN_MODEL, | ||
| FETCH_EXTENSION_FILE, | ||
| OPEN_OPTIONS_PAGE, | ||
| } | ||
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
Oops, something went wrong.
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.