trumeet / dir-issues-tracker Goto Github PK
View Code? Open in Web Editor NEWDir (https://dir.trumeet.top) 的 Issues Tracker 以及 版本发布
Dir (https://dir.trumeet.top) 的 Issues Tracker 以及 版本发布
就是https://dir.yuuta.moe这个域名在Firefox上无法正常跳转,我在我的网站https://kirbyassistant.tk上也遇到了这个问题,这里我来告诉你一下解决方法
就是https://dir.yuuta.moe的index.html上进行修改
具体是index.html的31行起的
<script>
var lang = navigator.language || navigator.userLanguage; if(lang.substr(0, 2) == "en") location = "https://dir.yuuta.moe/en/";
else if(lang.substr(0, 2) == "zh") location = "https://dir.yuuta.moe/zh/";
</script>
需要修改为
<script type="text/javascript">
var type = navigator.appName;
if (type == "Netscape"){
var lang = navigator.language;//获取浏览器配置语言,支持非IE浏览器
}else{
var lang = navigator.userLanguage;//获取浏览器配置语言,支持IE5+ == navigator.systemLanguage
};
var lang = lang.substr(0, 2);//获取浏览器配置语言前两位
if (lang == "zh"){
window.location.replace('https://dir.yuuta.moe/zh/');//中文编码时打开链接
}else if (lang == "en"){
window.location.replace('https://dir.yuuta.moe/en/');
}else{//其他语言编码时打开以下链接
window.location.replace('https://dir.yuuta.moe/en/');
};
</script>
这里我已经把注释写上去了,经测试这样做可以兼容IE,Firefox和Chrome
还希望你修改一下
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.