chore: 更新版本至 5.1.5,修复多个问题并增强移动端支持

This commit is contained in:
Harvey Zack committed 2025-01-19 17:34:40 +08:00
1 parent fae71811db
commit c89b9e7871
215 files changed
+2406 -4385

No files matched your search

+10 -2
View File
@@ -8,7 +8,8 @@
if (codeElement) {
const libs = event.target.dataset.libs || '';
const code = encodeURIComponent(codeElement.innerText);
const env = 'https://artplayer.org';
const isDev = location.hostname === 'localhost';
const env = isDev ? 'http://localhost:8082' : 'https://artplayer.org';
const url = env + '/?libs=' + libs + '&code=' + code;
window.open(url);
}
@@ -16,4 +17,11 @@
});
})();
(function () {
const language = window.navigator?.language || '';
const isDev = location.hostname === 'localhost';
if (!language.startsWith('zh') && !localStorage.getItem('lang-init') && !isDev) {
localStorage.setItem('lang-init', 'true');
window.location.href = 'https://artplayer.org/document/en/';
}
})();