Skip to content

Commit

Permalink
Fixed css
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxianqiao committed Mar 13, 2022
1 parent 189dec4 commit 556dfe0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"start": "nodemon --watch dist --exec \"electron ./dist --inspect\"",
"install": "electron-rebuild",
"build:bridge": "cargo build --release --manifest-path src/bridge/Cargo.toml",
"build": "npm run clean && npm run lint && cross-env NODE_ENV=production webpack && npm run build:bridge"
"build": "npm run clean && npm run lint && cross-env NODE_ENV=production webpack && npm run build:bridge",
"release": "npx release patch"
},
"keywords": [
"google",
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export default {
isDebug: process.env.NODE_ENV !== 'production',
translateUrl: 'https://translate.google.com',
translateUrlFallback: 'https://translate.google.cn',
repoRawURL: 'https://raw.githubusercontent.com/mantou132/GoogleTranslate/master/src/preload/config.js',
repoRawURL: 'https://raw.githubusercontent.com/mantou132/GoogleTranslate/master/src/preload/config.json',
};
8 changes: 4 additions & 4 deletions src/preload/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"signIn": "a[href*=\"https://accounts.google.com/ServiceLogin\"]",
"signOut": "a[href*=\"https://accounts.google.com/Logout\"]",
"sourceDetectLabel": "div[data-auto-open-search] > div > div> div div[data-language-code=\"auto\"]",
"sourceCurrentLabel": "h1#i5 + div > div > c-wiz[jsmodel] > div > c-wiz > div:nth-of-type(1)",
"targetCurrentLabel": "h1#i5 + div > div > c-wiz[jsmodel] > div > c-wiz > div:nth-of-type(3)",
"targetENLabel": "h1#i5 + div > div > c-wiz[jsmodel] > div > c-wiz > div:nth-of-type(2) > div[data-auto-open-search] > div > div> div div[data-language-code=\"en\"]",
"targetZHCNLabel": "h1#i5 + div > div > c-wiz[jsmodel] > div > c-wiz > div:nth-of-type(2) > div[data-auto-open-search] > div > div> div div[data-language-code=\"zh-CN\"]"
"sourceCurrentLabel": "h1 + div > div > c-wiz[jsmodel] > div > c-wiz > div:nth-of-type(1)",
"targetCurrentLabel": "h1 + div > div > c-wiz[jsmodel] > div > c-wiz > div:nth-of-type(3)",
"targetENLabel": "h1 + div > div > c-wiz[jsmodel] > div > c-wiz > div:nth-of-type(2) > div[data-auto-open-search] > div > div> div div[data-language-code=\"en\"]",
"targetZHCNLabel": "h1 + div > div > c-wiz[jsmodel] > div > c-wiz > div:nth-of-type(2) > div[data-auto-open-search] > div > div> div div[data-language-code=\"zh-CN\"]"
}
2 changes: 2 additions & 0 deletions src/preload/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export default async () => {
::-webkit-scrollbar,
/* share button */
div[data-enable-toggle-playback-speed][data-location='2'] ~ span,
/* translate arrow */
c-wiz c-wiz c-wiz c-wiz > h2 ~ div > div[aria-label="Translate"],
/* ad */
h1#i5 + div c-wiz > h2 ~ div[jsaction] > div[aria-label],
/* translate website */
Expand Down

0 comments on commit 556dfe0

Please sign in to comment.