From 7542f4d9b29ab3c49bfed79643ddaea73656138c Mon Sep 17 00:00:00 2001 From: sk5s Date: Tue, 25 Jan 2022 21:49:19 +0800 Subject: [PATCH] update i18n --- js/i18n.js | 6 +++++- sw.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/i18n.js b/js/i18n.js index 1b1fd9f..eab08bd 100644 --- a/js/i18n.js +++ b/js/i18n.js @@ -74,7 +74,11 @@ function getLanguage() { let browser = navigator.language if (!user_selected_lang) { if (browser.includes('zh') || browser.includes('en')) { - return browser + if (browser.includes('zh')) { + return 'zh' + } else { + return 'en' + } } else { return 'en' } diff --git a/sw.js b/sw.js index 5d0f592..0aa3c4c 100644 --- a/sw.js +++ b/sw.js @@ -1,4 +1,4 @@ -const version = '0.6.0' +const version = '0.7.0' const message = 'hi, alsoweather url has been changed to https://sk5s.cyou/alsoweather' self.addEventListener('install', (e) => {