diff --git a/_locales/de/messages.json b/_locales/de/messages.json index 544b7b4..c3da482 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -1,3 +1,6 @@ { - -} \ No newline at end of file + "extName": { + "message": "MSDocs Easy Switch Lang", + "description": "Easy switch lang button on msdocs" + } + } \ No newline at end of file diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 544b7b4..52be7b6 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1,3 +1,6 @@ { - + "extName": { + "message": "MSDocs Easy Switch Lang", + "description": "Easy switch lang button on msdocs" + } } \ No newline at end of file diff --git a/_locales/es/messages.json b/_locales/es/messages.json index 544b7b4..29e89fe 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -1,3 +1,6 @@ { - -} \ No newline at end of file + "extName": { + "message": "MSDocs Easy Switch Lang", + "description": "Easy switch lang button on msdocs" + } + } \ No newline at end of file diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index 544b7b4..29e89fe 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -1,3 +1,6 @@ { - -} \ No newline at end of file + "extName": { + "message": "MSDocs Easy Switch Lang", + "description": "Easy switch lang button on msdocs" + } + } \ No newline at end of file diff --git a/_locales/it/messages.json b/_locales/it/messages.json index 544b7b4..29e89fe 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -1,3 +1,6 @@ { - -} \ No newline at end of file + "extName": { + "message": "MSDocs Easy Switch Lang", + "description": "Easy switch lang button on msdocs" + } + } \ No newline at end of file diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index 544b7b4..29e89fe 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -1,3 +1,6 @@ { - -} \ No newline at end of file + "extName": { + "message": "MSDocs Easy Switch Lang", + "description": "Easy switch lang button on msdocs" + } + } \ No newline at end of file diff --git a/_locales/ko/messages.json b/_locales/ko/messages.json index 544b7b4..29e89fe 100644 --- a/_locales/ko/messages.json +++ b/_locales/ko/messages.json @@ -1,3 +1,6 @@ { - -} \ No newline at end of file + "extName": { + "message": "MSDocs Easy Switch Lang", + "description": "Easy switch lang button on msdocs" + } + } \ No newline at end of file diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index 544b7b4..29e89fe 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -1,3 +1,6 @@ { - -} \ No newline at end of file + "extName": { + "message": "MSDocs Easy Switch Lang", + "description": "Easy switch lang button on msdocs" + } + } \ No newline at end of file diff --git a/_locales/zh/messages.json b/_locales/zh/messages.json index 544b7b4..29e89fe 100644 --- a/_locales/zh/messages.json +++ b/_locales/zh/messages.json @@ -1,3 +1,6 @@ { - -} \ No newline at end of file + "extName": { + "message": "MSDocs Easy Switch Lang", + "description": "Easy switch lang button on msdocs" + } + } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 455e9a9..dd4f581 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "MSDocs Easy Switch Lang", - "version": "1.0.1", + "version": "1.0.2", "description": "Easy switch lang button on msdocs for Microsoft Edge.", "default_locale": "en", "icons": { @@ -16,7 +16,9 @@ "tabs" ], "host_permissions": [ - "https://docs.microsoft.com/*" + "https://docs.microsoft.com/*", + "https://learn.microsoft.com/*", + "https://support.microsoft.com/*" ], "background": { "service_worker": "scripts/background.js" diff --git a/scripts/background.js b/scripts/background.js index 75a2d24..468b396 100644 --- a/scripts/background.js +++ b/scripts/background.js @@ -2,7 +2,9 @@ * Switch the language of the page */ chrome.action.onClicked.addListener(function(tab) { - if (tab.url.includes("https://docs.microsoft.com/")) { + if (tab.url.includes("https://docs.microsoft.com/") + || tab.url.includes("https://learn.microsoft.com/") + || tab.url.includes("https://support.microsoft.com/")) { var currentLang = tab.url.split("/")[3]; // ja-jp, en-us var uiLang = chrome.i18n.getUILanguage(); // ja, en-us