diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index 6d931f9..c1d3536 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -1,6 +1,6 @@ { "app_name": { - "message": "KISS Translator (by Gabe)" + "message": "KISS Translator" }, "app_description": { "message": "A minimalist bilingual translation Extension & Greasemonkey Script" diff --git a/public/_locales/zh/messages.json b/public/_locales/zh-CN/messages.json similarity index 75% rename from public/_locales/zh/messages.json rename to public/_locales/zh-CN/messages.json index 0efd121..5ec9fca 100644 --- a/public/_locales/zh/messages.json +++ b/public/_locales/zh-CN/messages.json @@ -1,6 +1,6 @@ { "app_name": { - "message": "简约翻译 (by Gabe)" + "message": "简约翻译" }, "app_description": { "message": "一个简约的双语网页翻译扩展 & 油猴脚本" diff --git a/public/images/logo128.png b/public/images/logo128.png new file mode 100644 index 0000000..972f774 Binary files /dev/null and b/public/images/logo128.png differ diff --git a/public/images/logo16.png b/public/images/logo16.png new file mode 100644 index 0000000..28909fc Binary files /dev/null and b/public/images/logo16.png differ diff --git a/public/images/logo32.png b/public/images/logo32.png new file mode 100644 index 0000000..8312907 Binary files /dev/null and b/public/images/logo32.png differ diff --git a/public/images/logo48.png b/public/images/logo48.png new file mode 100644 index 0000000..24bb76e Binary files /dev/null and b/public/images/logo48.png differ diff --git a/public/manifest.firefox.json b/public/manifest.firefox.json index 572081d..7293688 100644 --- a/public/manifest.firefox.json +++ b/public/manifest.firefox.json @@ -3,7 +3,7 @@ "name": "__MSG_app_name__", "description": "__MSG_app_description__", "version": "1.4.0", - "default_locale": "zh", + "default_locale": "zh-CN", "author": "Gabe", "homepage_url": "https://github.com/fishjar/kiss-translator", "background": { @@ -17,11 +17,14 @@ ], "permissions": ["", "storage"], "icons": { - "192": "images/logo192.png" + "16": "icon16.png", + "32": "icon32.png", + "48": "icon48.png", + "128": "icon128.png" }, "browser_action": { "default_icon": { - "192": "images/logo192.png" + "128": "icon128.png" }, "default_title": "__MSG_app_name__", "default_popup": "popup.html" diff --git a/public/manifest.json b/public/manifest.json index 642bcdb..95c71c6 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -3,7 +3,7 @@ "name": "__MSG_app_name__", "description": "__MSG_app_description__", "version": "1.4.0", - "default_locale": "zh", + "default_locale": "zh-CN", "author": "Gabe", "homepage_url": "https://github.com/fishjar/kiss-translator", "background": { @@ -19,11 +19,14 @@ "permissions": ["storage"], "host_permissions": [""], "icons": { - "192": "images/logo192.png" + "16": "icon16.png", + "32": "icon32.png", + "48": "icon48.png", + "128": "icon128.png" }, "action": { "default_icon": { - "192": "images/logo192.png" + "128": "icon128.png" }, "default_title": "__MSG_app_name__", "default_popup": "popup.html" diff --git a/src/config/rules.js b/src/config/rules.js index f037a18..8c6aa4c 100644 --- a/src/config/rules.js +++ b/src/config/rules.js @@ -7,6 +7,42 @@ export const RULES = [ pattern: `bearblog.dev, www.theverge.com, www.tampermonkey.net/documentation.php`, selector: DEFAULT_SELECTOR, }, + { + pattern: `https://news.google.com/`, + selector: `h4`, + }, + { + pattern: `themessenger.com`, + selector: `.leading-tight, .leading-tighter, .my-2 p, .font-body p, article ${DEFAULT_SELECTOR}`, + }, + { + pattern: `www.telegraph.co.uk`, + selector: `article ${DEFAULT_SELECTOR}`, + }, + { + pattern: `www.theguardian.com`, + selector: `.show-underline, .dcr-hup5wm div, .dcr-7vl6y8 div, .dcr-12evv1c, figcaption, article ${DEFAULT_SELECTOR}, [data-cy="mostviewed-footer"] h4`, + }, + { + pattern: `www.semafor.com`, + selector: `${DEFAULT_SELECTOR}, .styles_intro__IYj__, [class*="styles_description"]`, + }, + { + pattern: `www.noemamag.com`, + selector: `.splash__title, .single-card__title, .single-card__type, .single-card__topic, .highlighted-content__title, .single-card__author, article ${DEFAULT_SELECTOR}, .quote__text, .wp-caption-text div`, + }, + { + pattern: `restofworld.org`, + selector: `${DEFAULT_SELECTOR}, .recirc-story__headline, .recirc-story__dek`, + }, + { + pattern: `www.axios.com`, + selector: `.h7, ${DEFAULT_SELECTOR}`, + }, + { + pattern: `www.newyorker.com`, + selector: `.summary-item__hed, .summary-item__dek, .summary-collection-grid__dek, .dqtvfu, .rubric__link, .caption, article ${DEFAULT_SELECTOR}, .HEhan ${DEFAULT_SELECTOR}, .ContributorBioBio-fBolsO`, + }, { pattern: `https://time.com/`, selector: `h1, h3, .summary, .video-title, #article-body ${DEFAULT_SELECTOR}, .image-wrap-container .credit.body-caption, .media-heading`, @@ -72,8 +108,8 @@ export const RULES = [ selector: `h1, .s-prose p, .comment-body .comment-copy`, }, { - pattern: `developer.chrome.com/docs, medium.com, developers.cloudflare.com, react.dev, create-react-app.dev`, - selector: `h1, article ${DEFAULT_SELECTOR}`, + pattern: `www.npmjs.com/package/, developer.chrome.com/docs, medium.com, developers.cloudflare.com, react.dev, create-react-app.dev`, + selector: `article ${DEFAULT_SELECTOR}`, }, { pattern: `news.ycombinator.com`,