WeiWeiXinNet/Games/Resource/common.js

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

var browser = {
    versions: function() {
        var u = navigator.userAgent, app = navigator.appVersion;
        return {//移动终端浏览器版本信息
            trident: u.indexOf('Trident') > -1, //IE内核
            presto: u.indexOf('Presto') > -1, //opera内核
            webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
            gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
            //mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
            mobile: u.indexOf('Mobile') > -1,
            ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
            android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
            iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
            iPad: u.indexOf('iPad') > -1, //是否iPad
            webApp: u.indexOf('Safari') == -1, //是否web应该程序,没有头部与底部
            weixinApp: u.indexOf('Version') > -1 //微信安卓客户端
        };
    }(),
    language: (navigator.browserLanguage || navigator.language).toLowerCase()
};

function getQueryStringByName(name) {
    var result = location.search.match(new RegExp("[\?\&]" + name + "=([^\&]+)", "i"));
    if (result == null || result.length < 1) {
        return "";
    }
    return result[1];
}

$(function() {
    /*判断手机浏览器,是否开通一键拨号*/
    $("a[href^='tel']").click(function() {
        if (browser.versions.mobile) {
            if (browser.versions.weixinApp) {
                var tel = $(this).attr('href').substring(4);
                //alert('请手动拨打电话:' + tel);
                //return false;
            }
        } else { // if (browser.versions.webApp)
            alert('请使用手机访问!');
            return false;
        }
    });

    /*右侧弹出列表*/
    $(".header a.links").toggle(function() {
        $(".sidebar").stop(true).css({"display": "block", "z-index": "99999"});
        $(".sidebar").stop(true).animate({"right": "0%"});
        function show() {
            $(".bj").stop(true).css({"z-index": "2", "display": "block"});
            $(".bj").stop(true).animate({"opacity": "0.6"});
        }
        setTimeout(show, 300);
    }, function() {
后面还有 59 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。