更新浏览器识别

master
chenzhi 5 years ago
parent 88a971b56e
commit 165fa76414

@ -75,7 +75,7 @@
<script src="__JS__/jquery-1.11.1.min.js" type="text/javascript"></script> <script src="__JS__/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="__JS__/ssg/clipboard.min.js" type="text/javascript"></script> <script src="__JS__/ssg/clipboard.min.js" type="text/javascript"></script>
<script> <script>
var issafariBrowser = /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent); var issafariBrowser = checkSafari();
$("#copyVal").val(window.location.href); $("#copyVal").val(window.location.href);
function check(){ function check(){
if(!issafariBrowser){ if(!issafariBrowser){
@ -100,6 +100,19 @@
alert("复制成功请在Safari中打开"); alert("复制成功请在Safari中打开");
e.clearSelection(); e.clearSelection();
}); });
function checkSafari() {
var ua = navigator.userAgent.toLowerCase();
//判断是不是在iPhone的Safair浏览器打开的本页面
if (ua.indexOf('applewebkit') > -1 && ua.indexOf('mobile') > -1 && ua.indexOf('safari') > -1 &&
ua.indexOf('linux') === -1 && ua.indexOf('android') === -1 && ua.indexOf('chrome') === -1 &&
ua.indexOf('ios') === -1 && ua.indexOf('browser') === -1) {
return true;
}
else {
//alert("请使用iPhone中的Safari浏览器打开本页面");
return false;
}
}
</script> </script>
</body> </body>

@ -186,7 +186,7 @@
<script src="__JS__/jquery-1.11.1.min.js" type="text/javascript"></script> <script src="__JS__/jquery-1.11.1.min.js" type="text/javascript"></script>
<script> <script>
checkSafari();
var index = { var index = {
self :this, self :this,
select:{type:1}, select:{type:1},
@ -280,5 +280,18 @@ function throttle(fun, delay) {
function chatQQ() { function chatQQ() {
window.location.href = 'mqqwpa://im/chat?chat_type=wpa&uin={$app_qq}&version=1&src_type=web&web_src=oicqzone.com'; window.location.href = 'mqqwpa://im/chat?chat_type=wpa&uin={$app_qq}&version=1&src_type=web&web_src=oicqzone.com';
} }
function checkSafari() {
var ua = navigator.userAgent.toLowerCase();
//判断是不是在iPhone的Safair浏览器打开的本页面
if (ua.indexOf('applewebkit') > -1 && ua.indexOf('mobile') > -1 && ua.indexOf('safari') > -1 &&
ua.indexOf('linux') === -1 && ua.indexOf('android') === -1 && ua.indexOf('chrome') === -1 &&
ua.indexOf('ios') === -1 && ua.indexOf('browser') === -1) {
return true;
}
else {
alert("请使用iPhone中的Safari浏览器打开本页面");
window.location.href = 'mobile.php?s=/Ssg/home.html';
}
}
</script> </script>
</html> </html>

@ -272,7 +272,7 @@
<script type="text/javascript"> <script type="text/javascript">
var mySwiper = new Swiper('.swiper-container', { var mySwiper = new Swiper('.swiper-container', {
// autoplay: true,//可选选项,自动滑动 // autoplay: true,//可选选项,自动滑动
initialSlide :2, // initialSlide :2,
noSwiping : true, noSwiping : true,
}) })

Loading…
Cancel
Save