<commit_before>var isWeixinBrowser = function() {
    var ua = navigator.userAgent.toLowerCase();
    return (/micromessenger/.test(ua)) ? true : false;
}
if (!isWeixinBrowser()) {
    // $('body').html('Give Me Five!');
}
//========================================================================//
//============================= :: INIT :: ===============================//
//========================================================================//
var canvasContainer, GameStatus = 0; //游戏状态(-1未开始，0进行中，1暂停，2碰撞，3已结束)
var player, shadow, monsters = [],
    asideMiles = [],
    asideCheers = [],
    asideCheers2 = [];
var winWidth, winHeight, guideStatus = 0,
    isGuide = false;
var startTouchPoint, touchCacheX = 0.12,
    touchCacheY = 0.2;
var startTime, pauseTime, gmfCounts = 0,
    stepLength = 1800;
// 初始化页面
$(function() {
    loadPlayerCnt();
    initAudio();
    $('#submitPwd').on('touchstart', function() {
        var pwd = $('#password').val();
        if (pwd && pwd.length > 0) {
            checkPassport(pwd);
        }
    });
    $('#gameBefore').on('touchstart', '#btnStart', function(event) {
        $('#gameBefore').hide();
        $('#gameing').show();
        initStage();
        musicBg.play();
        stopPropagation(event);
    });
    $('#gameBefore').on('touchstart', '.present', function(event) {
        $('#activity').show();
        stopPropagation(event);
    });
    $('body').on('touchstart touchmove', function(event) {
        event.preventDefault();
    });
    $('input').on('touchstart', function(event) {
        $(this).focus();
    });
    $('.dialog').on('touchstart', '.close', function(event) {
        $(this).closest('.dialog').hide();
        event.preventDefault();
    });
    $('#gameAfter').on('touchstart', '#btnReStart', function(event) {
        $('#gameAfter').hide();
        resetStage(); //重置舞台
        if (isPlayMusic) {
            musicBg.play();
        }
        startGame();
        stopPropagation(event);
    }).on('touchstart', '#submitInfo', function(event) {
        submitInfo();
        event.preventDefault();
    }).on('touchstart', '#btnTopTen', function(event) {
        $('#activity').show();
        $('.dialog_navbar').find('.dialog_navbar_item').eq(1).trigger('touchstart');
    });
    $('.dialog_navbar').on('touchstart', '.dialog_navbar_item', function(event) {
        $(this).siblings('.dialog_navbar_item').removeClass('selected')
        $(this).addClass('selected');
        $(this).parent().siblings('div').hide();
        $(this).parent().siblings('div').eq($(this).index()).show();
    });
});
//引导页
var showGuide = function(index) {
    var myTouch = util.toucher(document.getElementById('guide'));
    var len = winHeight > winWidth ? winWidth : winHeight;
    var isFinished = false;
    myTouch.on('swipe', function(e) {
        if (e.moveX >= len * touchCacheX) { //right
            if (!player.moving && !player.jumping) {
                player.moving = true;
                player.moveDirect = 1;
                shadow.moving = true;
                shadow.moveDirect = 1;
                isFinished = true;
            }
        } else if (e.moveX <= -len * touchCacheX) { //left
            if (!player.moving && !player.jumping) {
                player.moving = true;
                player.moveDirect = -1;<commit_msg>first hide top 10<commit_after>var isWeixinBrowser = function() {
    var ua = navigator.userAgent.toLowerCase();
    return (/micromessenger/.test(ua)) ? true : false;
}
if (!isWeixinBrowser()) {
    // $('body').html('Give Me Five!');
}
//========================================================================//
//============================= :: INIT :: ===============================//
//========================================================================//
var canvasContainer, GameStatus = 0; //游戏状态(-1未开始，0进行中，1暂停，2碰撞，3已结束)
var player, shadow, monsters = [],
    asideMiles = [],
    asideCheers = [],
    asideCheers2 = [];
var winWidth, winHeight, guideStatus = 0,
    isGuide = false;
var startTouchPoint, touchCacheX = 0.12,
    touchCacheY = 0.2;
var startTime, pauseTime, gmfCounts = 0,
    stepLength = 1800;
// 初始化页面
$(function() {
    loadPlayerCnt();
    initAudio();
    $('#submitPwd').on('touchstart', function() {
        var pwd = $('#password').val();
        if (pwd && pwd.length > 0) {
            checkPassport(pwd);
        }
    });
    $('#gameBefore').on('touchstart', '#btnStart', function(event) {
        $('#gameBefore').hide();
        $('#gameing').show();
        initStage();
        musicBg.play();
        stopPropagation(event);
    });
    $('#gameBefore').on('touchstart', '.present', function(event) {
        $('#activity').show();
        stopPropagation(event);
    });
    $('body').on('touchstart touchmove', function(event) {
        event.preventDefault();
    });
    $('input').on('touchstart', function(event) {
        $(this).focus();
    });
    $('.dialog').on('touchstart', '.close', function(event) {
        $(this).closest('.dialog').hide();
        event.preventDefault();
    });
    $('#gameAfter').on('touchstart', '#btnReStart', function(event) {
        $('#gameAfter').hide();
        resetStage(); //重置舞台
        if (isPlayMusic) {
            musicBg.play();
        }
        startGame();
        stopPropagation(event);
    }).on('touchstart', '#submitInfo', function(event) {
        submitInfo();
        event.preventDefault();
    }).on('touchstart', '#btnTopTen', function(event) {
        $('#activity').show();
        $('.dialog_navbar').find('.dialog_navbar_item').eq(1).show().trigger('touchstart');
    });
    $('.dialog_navbar').on('touchstart', '.dialog_navbar_item', function(event) {
        $(this).siblings('.dialog_navbar_item').removeClass('selected')
        $(this).addClass('selected');
        $(this).parent().siblings('div').hide();
        $(this).parent().siblings('div').eq($(this).index()).show();
    });
    $('.dialog_navbar').find('.dialog_navbar_item').eq(1).hide();
});
//引导页
var showGuide = function(index) {
    var myTouch = util.toucher(document.getElementById('guide'));
    var len = winHeight > winWidth ? winWidth : winHeight;
    var isFinished = false;
    myTouch.on('swipe', function(e) {
        if (e.moveX >= len * touchCacheX) { //right
            if (!player.moving && !player.jumping) {
                player.moving = true;
                player.moveDirect = 1;
                shadow.moving = true;
                shadow.moveDirect = 1;
                isFinished = true;
            }
        } else if (e.moveX <= -len * touchCacheX) { //left
            if (!player.moving && !player.jumping) {
                player.moving = true;
                player.moveDirect = -1;
{'fraction_non_alphanumeric': 0.247520355292376, 'fraction_numerical': 0.007253886010362694, 'mean_word_length': 2.751249305941144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '163479', 'n_tokens_mistral': 2052, 'n_tokens_neox': 2006, 'n_words': 331}