更新软件默认使用的字体
This commit is contained in:
@@ -8,6 +8,16 @@
|
||||
<body id="body" style="background-color: transparent;">
|
||||
<div id="root"></div>
|
||||
<script>
|
||||
const formatLang = (lang = 'en') => {
|
||||
if (lang === 'zh-cn') return 'zh-Hans'
|
||||
if (lang === 'zh-tw') return 'zh-Hant'
|
||||
return lang.split('-')[0]
|
||||
}
|
||||
window.setLang = (lang = navigator.language.toLocaleLowerCase()) => {
|
||||
document.documentElement.setAttribute('lang', formatLang(lang))
|
||||
}
|
||||
window.setLang()
|
||||
document.documentElement.classList.add(/os=(\w+)/.exec(window.location.search)[1])
|
||||
window.dom_style_theme = document.createElement('style')
|
||||
window.dom_style_lyric = document.createElement('style')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user