chore: update extension dependencies

This commit is contained in:
Steven 2024-08-22 23:19:00 +08:00
parent 080929faed
commit acb33080f3
4 changed files with 205 additions and 231 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "slash-extension", "name": "slash-extension",
"displayName": "Slash", "displayName": "Slash",
"version": "1.0.10", "version": "1.0.11",
"description": "An open source, self-hosted platform for sharing and managing your most frequently used links. Save and share your links very easily.", "description": "An open source, self-hosted platform for sharing and managing your most frequently used links. Save and share your links very easily.",
"scripts": { "scripts": {
"dev": "plasmo dev", "dev": "plasmo dev",
@ -11,12 +11,11 @@
"lint-fix": "eslint --ext .js,.ts,.tsx, src --fix" "lint-fix": "eslint --ext .js,.ts,.tsx, src --fix"
}, },
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.0", "@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.13.0",
"@mui/joy": "5.0.0-beta.48", "@mui/joy": "5.0.0-beta.48",
"@plasmohq/storage": "^1.11.0", "@plasmohq/storage": "^1.11.0",
"classnames": "^2.5.1", "classnames": "^2.5.1",
"lodash-es": "^4.17.21",
"lucide-react": "^0.419.0", "lucide-react": "^0.419.0",
"plasmo": "^0.88.0", "plasmo": "^0.88.0",
"react": "^18.3.1", "react": "^18.3.1",
@ -26,9 +25,8 @@
"devDependencies": { "devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0", "@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/chrome": "^0.0.268", "@types/chrome": "^0.0.268",
"@types/lodash-es": "^4.17.12", "@types/node": "^20.16.1",
"@types/node": "^20.15.0", "@types/react": "^18.3.4",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0", "@typescript-eslint/parser": "^7.18.0",

File diff suppressed because it is too large Load Diff

View File

@ -30,19 +30,19 @@ const getShortcutNameFromUrl = (urlString: string) => {
const getShortcutNameFromSearchUrl = (urlString: string) => { const getShortcutNameFromSearchUrl = (urlString: string) => {
const url = new URL(urlString); const url = new URL(urlString);
if ((url.hostname === "www.google.com" || url.hostname === "www.bing.com") && url.pathname === "/search") { if ((url.hostname.endsWith("google.com") || url.hostname.endsWith("bing.com")) && url.pathname === "/search") {
const params = new URLSearchParams(url.search); const params = new URLSearchParams(url.search);
const shortcutName = params.get("q"); const shortcutName = params.get("q");
if (typeof shortcutName === "string" && shortcutName.startsWith("s/")) { if (typeof shortcutName === "string" && shortcutName.startsWith("s/")) {
return shortcutName.slice(2); return shortcutName.slice(2);
} }
} else if (url.hostname === "www.baidu.com" && url.pathname === "/s") { } else if (url.hostname.endsWith("baidu.com") && url.pathname === "/s") {
const params = new URLSearchParams(url.search); const params = new URLSearchParams(url.search);
const shortcutName = params.get("wd"); const shortcutName = params.get("wd");
if (typeof shortcutName === "string" && shortcutName.startsWith("s/")) { if (typeof shortcutName === "string" && shortcutName.startsWith("s/")) {
return shortcutName.slice(2); return shortcutName.slice(2);
} }
} else if (url.hostname === "duckduckgo.com" && url.pathname === "/") { } else if (url.hostname.endsWith("duckduckgo.com") && url.pathname === "/") {
const params = new URLSearchParams(url.search); const params = new URLSearchParams(url.search);
const shortcutName = params.get("q"); const shortcutName = params.get("q");
if (typeof shortcutName === "string" && shortcutName.startsWith("s/")) { if (typeof shortcutName === "string" && shortcutName.startsWith("s/")) {

View File

@ -7,7 +7,6 @@
".plasmo/index.d.ts", ".plasmo/index.d.ts",
"./**/*.ts", "./**/*.ts",
"./**/*.tsx", "./**/*.tsx",
"../types"
], ],
"compilerOptions": { "compilerOptions": {
"paths": { "paths": {