Преглед изворни кода

feat: 支持 mail.163.com 的子域名匹配,优化邮箱处理逻辑

QLHazyCoder пре 4 месеци
родитељ
комит
9b4fa7188f
2 измењених фајлова са 3 додато и 2 уклоњено
  1. 1 1
      background.js
  2. 2 1
      manifest.json

+ 1 - 1
background.js

@@ -249,7 +249,7 @@ function matchesSourceUrlFamily(source, candidateUrl, referenceUrl) {
     case 'qq-mail':
       return candidate.hostname === 'mail.qq.com' || candidate.hostname === 'wx.mail.qq.com';
     case 'mail-163':
-      return candidate.hostname === 'mail.163.com';
+      return candidate.hostname === 'mail.163.com' || candidate.hostname.endsWith('.mail.163.com');
     case 'inbucket-mail':
       return Boolean(reference)
         && candidate.origin === reference.origin

+ 2 - 1
manifest.json

@@ -42,7 +42,8 @@
     },
     {
       "matches": [
-        "https://mail.163.com/*"
+        "https://mail.163.com/*",
+        "https://*.mail.163.com/*"
       ],
       "js": ["content/utils.js", "content/mail-163.js"],
       "all_frames": true,