forked from 027xiguapi/code-box
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
022220f
commit 804bffa
Showing
9 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,19 @@ | ||
import type { PlasmoMessaging } from "@plasmohq/messaging" | ||
import activeUrl from "raw:~/assets/logo.png" | ||
import defaultUrl from "raw:~/assets/icon.png" | ||
|
||
const handler: PlasmoMessaging.MessageHandler = async (req, res) => { | ||
const { active } = req.body | ||
|
||
if (active) { | ||
chrome.action.setIcon({ path: activeUrl }, () => { | ||
console.log("set icon activeUrl") | ||
}) | ||
} else { | ||
chrome.action.setIcon({ path: defaultUrl }, () => { | ||
console.log("set icon defaultUrl") | ||
}) | ||
} | ||
} | ||
|
||
export default handler |
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,11 @@ | ||
import type { PlasmoMessaging } from "@plasmohq/messaging" | ||
|
||
const handler: PlasmoMessaging.MessageHandler = async (req, res) => { | ||
// const message = await querySomeApi(req.body.id) | ||
// | ||
// res.send({ | ||
// message | ||
// }) | ||
} | ||
|
||
export default handler |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.