Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document) .ready(function () {
- $('.history-block-item .user .username') .each(function () {
- $(this) .text(replaceLogin($(this) .text()))
- });
- $('.deposit-item:not(.card)') .tooltip({
- container: 'body'
- });
- $('[data-toggle="popover"]') .popover({
- container: 'body'
- });
- EZYSKINS.init();
- $('.close-eto-delo') .click(function (_0x5db3x1) {
- $(this) .parent('.msg-wrap') .slideUp()
- });
- $(document) .on('click', '.no-link', function () {
- $('#linkBlock') .slideDown();
- return false
- });
- $(document) .on('click', '#cardDepModal', function () {
- $('#cardDepositModal') .arcticmodal()
- });
- $(document) .on('click', '#settings', function () {
- $('#setting') .arcticmodal()
- });
- $(document) .on('click', '.deposit-no-link', function () {
- $('#linkBlock') .slideDown();
- return false
- });
- $(document) .on('click', '.tooltip-btn.level', function () {
- $('.profile-level') .tooltip('hide');
- $('#level-popup') .arcticmodal()
- });
- $(document) .on('click', '.tooltip-btn.card', function () {
- $('.deposit-item.card') .tooltip('hide');
- $('#card-popup') .arcticmodal()
- });
- $(document) .on('click', '.tooltip-btn.ticket', function () {
- $('.ticket-number') .tooltip('hide');
- $('#ticket-popup') .arcticmodal()
- });
- $(document) .on('click', '#user-level-btn', function () {
- $('.level-badge') .tooltip('hide');
- $('#level-popup') .arcticmodal()
- });
- $('.tooltip') .remove();
- $('.ticket-number') .tooltip({
- html: true,
- trigger: 'hover',
- delay: {
- show: 50,
- hide: 200
- },
- title: function () {
- var _0x5db3x2 = '1 ????? = 1 ???';
- var _0x5db3x3 = '??? ???? ????? ??????';
- return '<span class="tooltip-title ticket">' + _0x5db3x2 + '</span><br/><span class="tooltip-btn ticket">' + _0x5db3x3 + '</span>'
- }
- });
- $('.deposit-item:not(.card)') .tooltip({
- container: 'body'
- });
- $('.deposit-item.card') .each(function () {
- var _0x5db3x4 = $(this);
- _0x5db3x4.data('old-title', _0x5db3x4.attr('title'));
- _0x5db3x4.attr('title', null);
- _0x5db3x4.tooltip({
- html: true,
- trigger: 'hover',
- delay: {
- show: 50,
- hide: 200
- },
- title: function () {
- var _0x5db3x2 = $(this) .data('old-title');
- var _0x5db3x3 = '??? ???? ????? ?????????';
- return '<span class="tooltip-title card">' + _0x5db3x2 + '</span><br/><span class="tooltip-btn card">' + _0x5db3x3 + '</span>'
- }
- })
- });
- $('.save-trade-link-input') .keypress(function (_0x5db3x1) {
- if (_0x5db3x1.which == 13) {
- $(this) .next() .click()
- }
- }) .on('paste', function () {
- var _0x5db3x4 = $(this);
- setTimeout(function () {
- _0x5db3x4.next() .click()
- }, 0)
- });
- $('.save-link2') .click(function () {
- var _0x5db3x4 = $(this) .prev();
- $.ajax({
- url: '/settings/save',
- type: 'POST',
- dataType: 'json',
- data: {
- trade_link: $(this) .prev() .val()
- },
- success: function (_0x5db3x5) {
- if (_0x5db3x5.status == 'success') {
- $('.givetradelink') .slideUp();
- $('#cardDepModal') .show();
- $('#addbet') .show();
- if (_0x5db3x5.msg) {
- return $.notify(_0x5db3x5.msg, 'success')
- }
- };
- if (_0x5db3x5.msg) {
- $.notify(_0x5db3x5.msg, 'error')
- }
- },
- error: function () {
- ajaxError()
- }
- });
- return false
- });
- $('.tooltip') .remove();
- $('.current-user') .tooltip({
- container: 'body'
- })
- });
- function updateBackground() {
- var _0x5db3x7 = $('.dad-container') .height();
- var _0x5db3x8 = $(window) .height();
- if (_0x5db3x7 > _0x5db3x8) {
- $('.main-container') .height('auto')
- } else {
- $('.main-container') .height('100%')
- }
- }
- function replaceLogin(_0x5db3xa) {
- function _0x5db3xb(_0x5db3xc, _0x5db3xd, _0x5db3xe, _0x5db3xf, _0x5db3x10, _0x5db3x11) {
- var _0x5db3x12 = [
- 'CSGO-LIFE.ru',
- 'CSGO-LIFE.com'
- ];
- return _0x5db3x12.indexOf(_0x5db3xc.toLowerCase()) == - 1 ? '' : _0x5db3xc
- }
- _0x5db3xa = _0x5db3xa.replace('?om', 'com') .replace('c?m', 'com') .replace('??m', 'com');
- var _0x5db3x13 = _0x5db3xa.replace(/([?-?a-z0-9-]+) *\. *(ru|com|net|gl|su|red|ws|us)+/i, _0x5db3xb);
- if (!_0x5db3x13.trim()) {
- var _0x5db3x14 = _0x5db3xa.toLowerCase() .split('CSGO-LIFE.ru') .length > 1 || _0x5db3xa.toLowerCase() .split('CSGO-LIFE.com') .length > 1;
- if (_0x5db3x14) {
- _0x5db3x13 = _0x5db3xa
- } else {
- _0x5db3x13 = _0x5db3xa.replace(/csgo/i, '') .replace(/ *\. *ru/i, '') .replace(/ *\. *com/i, '');
- if (!_0x5db3x13.trim()) {
- _0x5db3x13 = 'UNKNOWN'
- }
- }
- };
- _0x5db3x13 = _0x5db3x13.split('script') .join('srcipt');
- return _0x5db3x13
- }
- updateBackground();
- function getRarity(_0x5db3x16) {
- var _0x5db3x17 = '';
- var _0x5db3x18 = _0x5db3x16.split(',');
- if (_0x5db3x18.length == 2) {
- _0x5db3x16 = _0x5db3x18[1].trim()
- };
- if (_0x5db3x18.length == 3) {
- _0x5db3x16 = _0x5db3x18[2].trim()
- };
- if (_0x5db3x18.length && _0x5db3x18[0] == '???') {
- _0x5db3x16 = '?'
- };
- switch (_0x5db3x16) {
- case '????????? ????????':
- _0x5db3x17 = 'milspec';
- break;
- case '???????????':
- _0x5db3x17 = 'restricted';
- break;
- case '?????????????':
- _0x5db3x17 = 'classified';
- break;
- case '??????':
- _0x5db3x17 = 'covert';
- break;
- case '?????????':
- _0x5db3x17 = 'common';
- break;
- case '???????????? ????????':
- _0x5db3x17 = 'common';
- break;
- case '?':
- _0x5db3x17 = 'rare';
- break;
- case 'card':
- _0x5db3x17 = 'card';
- break
- };
- return _0x5db3x17
- }
- function n2w(_0x5db3x1a, _0x5db3x1b) {
- _0x5db3x1a %= 100;
- if (_0x5db3x1a > 19) {
- _0x5db3x1a %= 10
- };
- switch (_0x5db3x1a) {
- case 1:
- return _0x5db3x1b[0];
- case 2:
- ;
- case 3:
- ;
- case 4:
- return _0x5db3x1b[1];
- default:
- return _0x5db3x1b[2]
- }
- }
- function lpad(_0x5db3x1d, _0x5db3x1e) {
- while (_0x5db3x1d.toString() .length < _0x5db3x1e) {
- _0x5db3x1d = '0' + _0x5db3x1d
- };
- return _0x5db3x1d
- }
- $(document) .on('click', '#showUsers, #showItems', function () {
- if ($(this) .is('.active')) {
- return
- };
- $('#showUsers, #showItems') .removeClass('active');
- $(this) .addClass('active');
- $('#usersChances .users') .toggle();
- $('#usersChances .items') .toggle();
- updateScrollbar()
- });
- $(document) .on('click', '.firsttime.tutorialopen', function () {
- $('.tutorial.start') .removeClass('hidden');
- $('.tutorial.start') .addClass('animated fadeIn') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated fadeIn')
- });
- $('.round-givemeitems') .css('z-index', '0')
- });
- $(document) .on('click', '.green.fadeInMove', function () {
- $('.tutorial.start') .addClass('animated fadeOut') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated fadeOut');
- $('.tutorial.start') .addClass('hidden')
- });
- $('.round-givemeitems') .css('z-index', '100')
- });
- $('#usersChances') .hover(function () {
- var _0x5db3x1f = $('#showUsers') .is('.active') ? $('.current-chance-block.users') : $('.current-chance-block.items');
- var _0x5db3x20 = $('#showUsers') .is('.active') ? 10 : 9;
- if (_0x5db3x1f.find('.current-chance-wrap') .children() .length > _0x5db3x20) {
- $('.arrowscroll') .show()
- }
- }, function () {
- $('.arrowscroll') .hide()
- });
- $('.arrowscroll') .click(function () {
- var _0x5db3x1f = $('#showUsers') .is('.active') ? $('.current-chance-block.users') : $('.current-chance-block.items');
- var _0x5db3x21 = $(this) .is('.left') ? '-' : '+';
- _0x5db3x1f.stop(true, false) .animate({
- scrollLeft: _0x5db3x21 + '=250'
- })
- });
- $('.round-preinfo') .addClass('animated bounce') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated bounce')
- });
- $('.history-block.black-block') .addClass('animated shake') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated shake')
- });
- $('.kbf-fillnow') .addClass('animated fadeInDown') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated fadeInDown')
- });
- $('.round-givemeitems.msg1') .show();
- $('.round-givemeitems.msg1') .addClass('animated fadeIn') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated fadeIn')
- });
- $(document) .on('click', '.smiles-button.open', function (_0x5db3x1) {
- $('.smiles-block') .slideDown();
- $('.smiles-button.open') .hide();
- $('.smiles-button.closed') .show()
- });
- $(document) .on('click', '.smiles-button.closed', function (_0x5db3x1) {
- $('.smiles-block') .slideUp();
- $('.smiles-button.closed') .hide();
- $('.smiles-button.open') .show()
- });
- var sounds = $.cookie('sounds');
- if (sounds == 'on') {
- $('#on') .addClass('hidden');
- $('#off') .removeClass('hidden')
- } else {
- $('#on') .removeClass('hidden');
- $('#off') .addClass('hidden')
- };
- $(document) .on('click', '#on', function (_0x5db3x1) {
- _0x5db3x1.preventDefault();
- $('#on') .addClass('hidden');
- $('#off') .removeClass('hidden');
- sounds = 'on';
- $.cookie('sounds', 'on', {
- expires: 365
- })
- });
- $(document) .on('click', '#off', function (_0x5db3x1) {
- _0x5db3x1.preventDefault();
- $('#on') .removeClass('hidden');
- $('#off') .addClass('hidden');
- sounds = 'off';
- $.cookie('sounds', 'off', {
- expires: 365
- })
- });
- $(document) .on('click', '.poplight.open', function (_0x5db3x1) {
- $('.chat-block.black-block.balance') .slideDown();
- $('.poplight.open') .hide();
- $('.poplight.closed') .show()
- });
- $(document) .on('click', '.poplight.closed', function (_0x5db3x1) {
- $('.chat-block.black-block.balance') .slideUp();
- $('.poplight.closed') .hide();
- $('.poplight.open') .show()
- });
- $('.ip-icon') .addClass('active');
- function newAvatarSound() {
- var _0x5db3x24 = new Audio();
- _0x5db3x24.src = '/assets/sounds/closed.mp3';
- _0x5db3x24.volume = 0.9;
- _0x5db3x24.play()
- }
- if (sounds == 'on') {
- newAvatarSound()
- };
- function newTimerSound() {
- var _0x5db3x24 = new Audio();
- _0x5db3x24.src = '/assets/sounds/timer-tick-quiet.mp3';
- _0x5db3x24.volume = 0.9;
- _0x5db3x24.play()
- }
- function newTimerSound5sec() {
- var _0x5db3x24 = new Audio();
- _0x5db3x24.src = '/assets/sounds/timer-tick-last-5-seconds.mp3';
- _0x5db3x24.volume = 0.9;
- _0x5db3x24.play()
- }
- function newRouletteSound() {
- var _0x5db3x24 = new Audio();
- _0x5db3x24.src = '/assets/sounds/roulette-start-2.mp3';
- _0x5db3x24.volume = 0.9;
- _0x5db3x24.play()
- }
- function newGameKnife() {
- var _0x5db3x24 = new Audio();
- _0x5db3x24.src = '/assets/sounds/bet-in-other-room-5.mp3';
- _0x5db3x24.volume = 0.9;
- _0x5db3x24.play()
- }
- function betsNotySound() {
- var _0x5db3x24 = new Audio();
- _0x5db3x24.src = '/assets/sounds/notif3.mp3';
- _0x5db3x24.volume = 0.9;
- _0x5db3x24.play()
- }
- if (CARDS) {
- $('.kartochki') .show();
- $('.kartochki') .addClass('animated fadeIn') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated fadeIn')
- })
- };
- if (STARTSYSTEM) {
- updateBackground();
- var socket = io.connect('151.80.220.120:7923');
- if (checkUrl()) {
- socket.on('connect', function () {
- $('.preloader') .hide()
- }) .on('disconnect', function () {
- $('.preloader') .show()
- }) .on('online', function (_0x5db3x5) {
- $('.stats-onlineNow') .text(Math.abs(_0x5db3x5))
- }) .on('newDeposit', function (_0x5db3x5) {
- updateBackground();
- _0x5db3x5 = JSON.parse(_0x5db3x5);
- $('#deposits') .prepend(_0x5db3x5.html);
- $('#adminlogs') .prepend(_0x5db3x5.html_adminlogs);
- $('.betinfo') .prepend(_0x5db3x5.html);
- var _0x5db3x30 = $('#bet_' + _0x5db3x5.id + ' .history-block-item .user .username') .text();
- $('#bet_' + _0x5db3x5.id + ' .history-block-item .user .username') .text(replaceLogin(_0x5db3x30));
- $('#round-money') .html(Math.round(_0x5db3x5.gamePrice) + '?');
- $('title') .text(Math.round(_0x5db3x5.gamePrice) + ' ??? - CSGO-LIFE.COM');
- $('#round-items') .html(_0x5db3x5.itemsCount);
- $('.item-bar') .css('width', _0x5db3x5.itemsCount + '%');
- $('.deposit-item') .tooltip({
- container: 'body',
- placement: 'top'
- });
- $('.round-givemeitems.msg1') .hide();
- $('.round-givemeitems.msg1') .addClass('hidden');
- $('.main_banner') .addClass('hidden');
- $('.round-items-text') .addClass('hidden');
- $('.round-preinfo') .addClass('animated bounce') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated bounce')
- });
- $('.history-block.black-block') .addClass('animated shake') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated shake')
- });
- $('.kbf-fillnow') .addClass('animated fadeInDown') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated fadeInDown')
- });
- $('.kb-active-knife') .removeClass('hidden');
- $('#betinfo') .html('');
- console.log(_0x5db3x5.chances);
- html_chances = '';
- html_knifechances = '';
- html_betsDown = '';
- _0x5db3x5.chances = sortByChance(_0x5db3x5.chances);
- _0x5db3x5.chances.forEach(function (_0x5db3x31) {
- html_chances += '<div class="current-user" title="' + replaceLogin(_0x5db3x31.username) + '"><a class="img-wrap" href="/user/' + _0x5db3x31.steamid64 + '" target="_blank"><img src="' + _0x5db3x31.avatar + '" /></a><div class="chance">' + _0x5db3x31.chance + '%</div></div>';
- if (_0x5db3x31.chance <= 3) {
- html_knifechances += '<div class="kbf player-' + _0x5db3x31.place + ' kbf-mini2" style="height: ' + _0x5db3x31.chance + '%;">'
- } else {
- html_knifechances += '<div class="kbf player-' + _0x5db3x31.place + '" style="height: ' + _0x5db3x31.chance + '%;">'
- };
- html_knifechances += '<div class="kbf-user">';
- html_knifechances += '<div class="kfbu-avatar" style="background-image: url(' + _0x5db3x31.avatar + ');"></div>';
- html_knifechances += '<div class="kfbu-betinfo"><a href="/user/' + _0x5db3x31.steamid64 + '">' + _0x5db3x31.username + '</a><span>' + _0x5db3x31.items + ' ????????? ?? <em>' + _0x5db3x31.priceall + '<small>o</small></em></span></div></div>';
- html_knifechances += '<span class="kbf-perc">' + _0x5db3x31.chance + '%</span></div>';
- html_betsDown += '<div class="deposit player-' + _0x5db3x31.place + '"><a href="/user/' + _0x5db3x31.steamid64 + '" title="8Vandal8" class="d-user" style="width: 56%;">';
- html_betsDown += '<img src="' + _0x5db3x31.avatar + '" class="du-avatar"><div class="du-name">' + _0x5db3x31.username + '</div></a>';
- html_betsDown += '<div class="d-chance">' + _0x5db3x31.chance + '%</div>';
- html_betsDown += '<div class="d-items">' + _0x5db3x31.items + '</div>';
- html_betsDown += '<div class="d-money">' + _0x5db3x31.priceall + '<small>o</small></div>';
- html_betsDown += '</div>'
- });
- $('#usersChances .users .current-chance-wrap') .html(html_chances);
- $('#usersChances') .show();
- $('#knifechances') .html(html_knifechances);
- $('#knifechances') .show();
- $('#betsDown') .html(html_betsDown);
- $('#betsDown') .show();
- $('.tooltip') .remove();
- $('.current-user') .tooltip({
- container: 'body'
- });
- function _0x5db3x32(_0x5db3x20, _0x5db3x33) {
- return Math.random() * (_0x5db3x33 - _0x5db3x20) + _0x5db3x20
- }
- function _0x5db3x34() {
- var _0x5db3x24 = new Audio();
- _0x5db3x24.src = '/assets/sounds/knife' + Math.round(_0x5db3x32(1, 3)) + '.mp3';
- _0x5db3x24.volume = 0.9;
- _0x5db3x24.play()
- }
- if (sounds == 'on') {
- _0x5db3x34()
- };
- EZYSKINS.initTheme()
- }) .on('forceClose', function () {
- $('.forceClose') .removeClass('msgs-not-visible')
- }) .on('timer', function (_0x5db3x2f) {
- $('#gameTimer .countMinutes') .text(lpad(Math.floor(_0x5db3x2f / 60), 2));
- $('#gameTimer .countSeconds') .text(lpad(_0x5db3x2f - Math.floor(_0x5db3x2f / 60) * 60, 2));
- if (_0x5db3x2f <= 20) {
- if (sounds == 'on') {
- newTimerSound()
- }
- };
- if (_0x5db3x2f == 30) {
- if (sounds == 'on') {
- betsNotySound()
- };
- $('.betsnoty') .show() .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated bounceInRight')
- })
- };
- if (_0x5db3x2f <= 1) {
- $('#newGameTimer') .show();
- $('#gameTimer') .hide();
- $('#newGameTimerText') .show();
- $('#gameTimerText') .hide()
- };
- if (_0x5db3x2f == 13) {
- $('.betsnoty') .addClass('animated bounceOutRight') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .hide();
- $(this) .removeClass('animated bounceOutRight');
- $(this) .addClass('animated bounceInRight')
- })
- }
- }) .on('slider', function (_0x5db3x5) {
- $('#newGameTimer .countSeconds') .text(lpad(_0x5db3x5.time - Math.floor(_0x5db3x5.time / 60) * 60, 2));
- if (_0x5db3x5.time == 19) {
- $('.rr') .slideUp(300);
- $('.round-winner') .slideDown(300);
- $('.rw-avatar') .addClass('animated rotateIn');
- if (sounds == 'on') {
- newAvatarSound()
- }
- };
- if (ngtimerStatus) {
- ngtimerStatus = false;
- var _0x5db3x2b = _0x5db3x5.users;
- _0x5db3x2b = mulAndShuffle(_0x5db3x2b, Math.ceil(130 / _0x5db3x2b.length));
- _0x5db3x2b[112] = _0x5db3x5.winner;
- html = '';
- _0x5db3x2b.forEach(function (_0x5db3x2c) {
- html += '<img src="' + _0x5db3x2c.avatar + '">'
- });
- $('#usersCarousel') .html(html);
- $('#barContainer') .hide();
- $('#usersCarouselConatiner') .slideDown(300);
- if (_0x5db3x5.showCarousel) {
- $('#depositButtonsBlock') .slideUp()
- } else {
- $('#depositButtonsBlock') .hide()
- };
- _0x5db3x2d(_0x5db3x5);
- $('#roundFinishBlock .number') .text(_0x5db3x5.round_number);
- $('#usersCarousel') .css('margin-left', - 2000);
- if (_0x5db3x5.showSlider) {
- $('#usersCarousel') .animate({
- marginLeft: - 8728
- }, 1000 * 10, function () {
- $('#winnerInfo .winner-info-holder') .slideDown()
- });
- if (sounds == 'on') {
- newRouletteSound()
- }
- };
- function _0x5db3x2d(_0x5db3x5) {
- _0x5db3x5 = _0x5db3x5 || {
- winner: {
- }
- };
- var _0x5db3x2e = {
- totalPrice: _0x5db3x5.game.price || 0,
- number: _0x5db3x5.game.price ? ('#' + Math.floor(_0x5db3x5.round_number * _0x5db3x5.game.price)) : '???',
- tickets: _0x5db3x5.tickets || 0,
- winner: {
- image: _0x5db3x5.winner.avatar || '???',
- login: _0x5db3x5.winner.username || '???',
- id: _0x5db3x5.winner.steamid64 || '#',
- chance: _0x5db3x5.chance || 0,
- winTicket: _0x5db3x5.ticket || '???'
- }
- };
- $('#winnerInfo #winTicket') .text('#' + _0x5db3x2e.winner.winTicket);
- $('#winnerInfo #totalTickets') .text(_0x5db3x2e.tickets);
- $('#winnerInfo .rw-avatar') .attr('src', _0x5db3x2e.winner.image);
- $('#winnerInfo #winnerLink') .text(replaceLogin(_0x5db3x2e.winner.login));
- $('#winnerInfo .winlink') .attr('href', '/user/' + _0x5db3x2e.winner.id);
- $('#winnerInfo #winnerLink') .attr('href', '/user/' + _0x5db3x2e.winner.id);
- $('#winnerInfo .rw-steamlink') .attr('href', 'http://steamcommunity.com/profiles/' + _0x5db3x2e.winner.id);
- $('#winnerInfo #winnerChance') .text(_0x5db3x2e.winner.chance.toFixed(2) + '%');
- $('#winnerInfo #winnerSum') .text(_0x5db3x2e.totalPrice)
- }
- }
- }) .on('newGame', function (_0x5db3x5) {
- updateBackground();
- if (sounds == 'on') {
- newGameKnife()
- };
- $('#usersChances .users .current-chance-wrap') .html('');
- $('#usersChances .items .current-chance-wrap') .html('');
- $('#usersChances') .hide();
- $('#deposits') .html('');
- $('#adminlogs') .html('');
- $('#knifechances') .html('');
- $('#betsDown') .html('');
- $('#betinfo') .html('');
- $('#myItemsCount') .html('0 <span style="font-size: 12px;"> ?????????</span>');
- $('#myChance') .text('0%');
- $('#roundId') .text(_0x5db3x5.id);
- $('#roundHash') .text(_0x5db3x5.hash);
- $('#round-money') .html('0?');
- $('#hash') .text(_0x5db3x5.hash);
- $('#round-items') .html('0');
- $('.item-bar') .css('width', '0%');
- $('#roundFinishBlock') .hide();
- $('#barContainer') .show();
- $('#usersCarouselConatiner') .hide();
- $('#depositButtonsBlock') .slideDown();
- $('#winnerInfo') .hide();
- $('.round-givemeitems.msg1') .show();
- $('.round-givemeitems.msg1') .removeClass('hidden');
- $('.round-givemeitems.msg1') .addClass('animated fadeIn') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated fadeIn')
- });
- $('.rr') .slideDown(300);
- $('.rw-avatar') .removeClass('animated rotateIn');
- $('#newGameTimer') .hide();
- $('#gameTimer') .show();
- $('#newGameTimerText') .hide();
- $('#gameTimerText') .show();
- $('.kb-active-knife') .addClass('hidden');
- $('.main_banner') .removeClass('hidden');
- $('.round-items-text') .removeClass('hidden');
- $('.round-preinfo') .addClass('animated bounce') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated bounce')
- });
- $('.history-block.black-block') .addClass('animated bounce') .one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
- $(this) .removeClass('animated bounce')
- });
- $('#gameTimer .countMinutes') .text('02');
- $('#gameTimer .countSeconds') .text('00');
- $('title') .text('0 ??? - CSGO-LIFE.COM');
- setTimeout(updateBackground, 1000);
- ngtimerStatus = true
- }) .on('queue', function (_0x5db3x5) {
- console.log(_0x5db3x5);
- if (_0x5db3x5) {
- var _0x5db3x1a = _0x5db3x5.indexOf(USER_ID);
- if (_0x5db3x1a !== - 1) {
- $.notify('??? ??????? ??????????????. ????????!', {
- clickToHide: 'false',
- autoHide: 'false',
- className: 'success'
- })
- }
- }
- }) .on('depositDecline', function (_0x5db3x5) {
- _0x5db3x5 = JSON.parse(_0x5db3x5);
- if (_0x5db3x5.user == USER_ID) {
- clearTimeout(declineTimeout);
- declineTimeout = setTimeout(function () {
- $('#errorBlock') .slideUp()
- }, 1000 * 10);
- $('#errorBlock p') .text(_0x5db3x5.msg);
- $('#errorBlock') .slideDown()
- }
- })
- } else {
- socket.on('online', function (_0x5db3x5) {
- $('.stats-onlineNow') .text(Math.abs(_0x5db3x5))
- })
- };
- var declineTimeout,
- timerStatus = true,
- ngtimerStatus = true
- };
- function loadMyInventory() {
- $('thead') .hide();
- $.ajax({
- url: '/myinventory',
- type: 'POST',
- dataType: 'json',
- success: function (_0x5db3x5) {
- var _0x5db3x2 = '<tr><td colspan="4" style="text-align: center">?????????·???€?»?° ???€???±???°. ???????????±?????‚?µ ?µ?‰?µ ???°?·</td></tr>';
- var _0x5db3x39 = 0;
- if (!_0x5db3x5.success && _0x5db3x5.Error) {
- _0x5db3x2 = '<tr><td colspan="4" style="text-align: center">' + _0x5db3x5.Error + '</td></tr>'
- };
- if (_0x5db3x5.success && _0x5db3x5.rgInventory && _0x5db3x5.rgDescriptions) {
- _0x5db3x2 = '';
- var _0x5db3x3a = mergeWithDescriptions(_0x5db3x5.rgInventory, _0x5db3x5.rgDescriptions);
- console.table(_0x5db3x3a);
- _0x5db3x3a.sort(function (_0x5db3x3b, _0x5db3x3c) {
- return parseFloat(_0x5db3x3c.price) - parseFloat(_0x5db3x3b.price)
- });
- _.each(_0x5db3x3a, function (_0x5db3x3d) {
- _0x5db3x3d.price = _0x5db3x3d.price || 0;
- _0x5db3x39 += parseFloat(_0x5db3x3d.price);
- _0x5db3x3d.price = _0x5db3x3d.price;
- _0x5db3x3d.image = 'https://steamcommunity-a.akamaihd.net/economy/image/class/730/' + _0x5db3x3d.classid + '/200fx200f';
- _0x5db3x3d.market_name = _0x5db3x3d.market_name || '';
- _0x5db3x2 += '' + '<tr>' + '<td class="item-image"><div class="item-image-wrap">' + '<img src="' + _0x5db3x3d.image + '">' + '</div></td>' + '<td class="item-name">' + _0x5db3x3d.name + '</td>' + '<td class="item-type">' + _0x5db3x3d.market_name.replace(_0x5db3x3d.name, '') .replace('(', '') .replace(')', '') + '</td>' + '<td class="item-cost">' + (_0x5db3x3d.price || '---') + '</td>' + '</tr>'
- });
- $('#totalPrice') .text(_0x5db3x39.toFixed(2));
- $('thead') .show()
- };
- $('tbody') .html(_0x5db3x2);
- updateBackground()
- },
- error: function () {
- var _0x5db3x2 = isEn() ? 'An error has occurred. Try again' : '?????????·???€?»?° ???€???±???°. ???????????±?????‚?µ ?µ?‰?µ ???°?·';
- $('tbody') .html('<tr><td colspan="4" style="text-align: center">' + _0x5db3x2 + '<td></tr>')
- }
- })
- }
- function mergeWithDescriptions(_0x5db3x3a, _0x5db3x3f) {
- return Object.keys(_0x5db3x3a) .map(function (_0x5db3x40) {
- var _0x5db3x3d = _0x5db3x3a[_0x5db3x40];
- var _0x5db3x41 = _0x5db3x3f[_0x5db3x3d.classid + '_' + (_0x5db3x3d.instanceid || '0')];
- for (var _0x5db3x42 in _0x5db3x41) {
- _0x5db3x3d[_0x5db3x42] = _0x5db3x41[_0x5db3x42];
- delete _0x5db3x3d.icon_url;
- delete _0x5db3x3d.icon_drag_url;
- delete _0x5db3x3d.icon_url_large
- };
- return _0x5db3x3d
- })
- }
- function mulAndShuffle(_0x5db3x18, _0x5db3x44) {
- var _0x5db3x13 = [
- ],
- _0x5db3x45 = _0x5db3x18.length,
- _0x5db3x46 = _0x5db3x44 * _0x5db3x45,
- _0x5db3x47,
- _0x5db3x48;
- while (_0x5db3x46) {
- _0x5db3x47 = _0x5db3x18[Math.floor(Math.random() * _0x5db3x45)];
- if (_0x5db3x45 == 1) {
- _0x5db3x13.push(_0x5db3x48 = _0x5db3x47);
- _0x5db3x46--
- } else {
- if (_0x5db3x47 !== _0x5db3x48) {
- _0x5db3x13.push(_0x5db3x48 = _0x5db3x47);
- _0x5db3x46--
- }
- }
- };
- return _0x5db3x13
- }
- $(document) .on('click', '.vote', function () {
- var _0x5db3x4 = $(this);
- $.ajax({
- url: '/ajax',
- type: 'POST',
- dataType: 'json',
- data: {
- action: 'voteUser',
- id: $(this) .data('profile')
- },
- success: function (_0x5db3x5) {
- if (_0x5db3x5.status == 'success') {
- $('#myProfile') .find('.votes') .text(_0x5db3x5.votes || 0)
- } else {
- if (_0x5db3x5.msg) {
- _0x5db3x4.notify(_0x5db3x5.msg, {
- position: 'bottom middle',
- className: 'error'
- })
- }
- }
- },
- error: function () {
- _0x5db3x4.notify('????????? ??????. ?????????? ??? ???', {
- position: 'bottom middle',
- className: 'error'
- })
- }
- })
- });
- function sortByChance(_0x5db3x4a) {
- var _0x5db3x4b = [
- ],
- _0x5db3x3d = 0;
- for (var _0x5db3x4c = 0; _0x5db3x4c < _0x5db3x4a.length; _0x5db3x4c++) {
- _0x5db3x4b = _0x5db3x4a[_0x5db3x4c];
- _0x5db3x3d = _0x5db3x4c - 1;
- while (_0x5db3x3d >= 0 && _0x5db3x4a[_0x5db3x3d].chance < _0x5db3x4b.chance) {
- _0x5db3x4a[_0x5db3x3d + 1] = _0x5db3x4a[_0x5db3x3d];
- _0x5db3x4a[_0x5db3x3d] = _0x5db3x4b;
- _0x5db3x3d--
- }
- };
- return _0x5db3x4a
- }
- function checkUrl() {
- var _0x5db3x4e = window.location.pathname;
- if (_0x5db3x4e.indexOf('game') + 1) {
- return false
- } else {
- return true
- }
- }
- $('.hrp-player') .hover(function () {
- var _0x5db3x4f = $(this) .data('userid') ? $(this) .data('userid') : '';
- $(this) .parent() .parent() .addClass('hoveraction') .find('.hri[data-userid=\'' + _0x5db3x4f + '\']') .addClass('hoverplayeritems')
- }, function () {
- $('.hri') .removeClass('hoverplayeritems'),
- $('.history-round-stat') .removeClass('hoveraction')
- }),
- $('.hri') .hover(function () {
- var _0x5db3x4f = $(this) .data('price') ? $(this) .data('price') : '',
- _0x5db3x1 = $(this) .data('userid') ? $(this) .data('userid') : '',
- _0x5db3x3b = $(this) .data('weapon') ? $(this) .data('weapon') : '';
- $(this) .addClass('active'),
- $('.weapon-history-hover span') .html(('?? ' + _0x5db3x4f), $('.weapon-history-hover b') .html(_0x5db3x3b), $(this) .parent() .parent() .find('.hrp-player[data-userid=\'' + _0x5db3x1 + '\']') .addClass('hover'));
- var _0x5db3x2c = ($('.weapon-history-hover') .innerHeight(), $(this) .offset() .left - 17),
- _0x5db3x50 = $(this) .offset() .top + $(this) .innerHeight() + 3;
- _0x5db3x2c + 150 > $(window) .innerWidth() && (_0x5db3x2c = $(window) .innerWidth() - 155),
- $('.weapon-history-hover') .css({
- left: _0x5db3x2c,
- top: _0x5db3x50
- }),
- $('.weapon-history-hover') .removeClass('hidden')
- }, function () {
- $(this) .removeClass('active'),
- $('.hrp-player') .removeClass('hover'),
- setTimeout(function () {
- 0 == $('.hri.active') .length && $('.weapon-history-hover') .addClass('hidden')
- }, 100)
- });
- $('.rh-content .deposit') .hover(function () {
- var _0x5db3x4f = $(this) .data('user') ? $(this) .data('user') : '';
- $(this) .closest('.rh-content') .addClass('hoveraction') .find('.hri-round[data-userid=\'' + _0x5db3x4f + '\']') .addClass('hoverplayeritems')
- }, function () {
- $('.hri-round') .removeClass('hoverplayeritems'),
- $('.rh-content') .removeClass('hoveraction')
- }),
- $('.hri-round') .hover(function () {
- var _0x5db3x4f = $(this) .data('price') ? $(this) .data('price') : '',
- _0x5db3x1 = $(this) .data('userid') ? $(this) .data('userid') : '',
- _0x5db3x3b = $(this) .data('weapon') ? $(this) .data('weapon') : '';
- $(this) .addClass('active'),
- $('.weapon-history-hover span') .html('?? ' + _0x5db3x4f),
- $('.weapon-history-hover b') .html(_0x5db3x3b),
- $('.rh-content .deposit[data-user=\'' + _0x5db3x1 + '\']') .addClass('hover');
- var _0x5db3x2c = ($('.weapon-history-hover') .innerHeight(), $(this) .offset() .left - 17),
- _0x5db3x50 = $(this) .offset() .top + $(this) .innerHeight() + 3;
- _0x5db3x2c + 150 > $(window) .innerWidth() && (_0x5db3x2c = $(window) .innerWidth() - 155),
- $('.weapon-history-hover') .css({
- left: _0x5db3x2c,
- top: _0x5db3x50
- }),
- $('.weapon-history-hover') .removeClass('hidden')
- }, function () {
- $(this) .removeClass('active'),
- $('.rh-content .deposit') .removeClass('hover'),
- setTimeout(function () {
- 0 == $('.hri.active') .length && $('.weapon-history-hover') .addClass('hidden')
- }, 100)
- });
- $('.ri') .hover(function () {
- var _0x5db3x4f = $(this) .data('player') ? $(this) .data('player') : '',
- _0x5db3x1 = $(this) .data('weapon') ? $(this) .data('weapon') : '';
- $(this) .addClass('active'),
- $('.weapon-hover span') .html(('?? ' + _0x5db3x4f), $('.weapon-hover b') .html(_0x5db3x1));
- var _0x5db3x3b = ($('.weapon-hover') .innerHeight(), $(this) .offset() .left + 20),
- _0x5db3x2c = $(this) .offset() .top + $(this) .innerHeight() + 10;
- _0x5db3x3b + 150 > $(window) .innerWidth() && (_0x5db3x3b = $(window) .innerWidth() - 155),
- $('.weapon-hover') .css({
- left: _0x5db3x3b,
- top: _0x5db3x2c
- }),
- $('.weapon-hover') .removeClass('hidden')
- }, function () {
- $(this) .removeClass('active'),
- setTimeout(function () {
- 0 == $('.ri.active') .length && $('.weapon-hover') .addClass('hidden')
- }, 100)
- });
- $('.rh-content .deposit') .hover(function () {
- var _0x5db3x4f = $(this) .data('user') ? $(this) .data('user') : '';
- $(this) .closest('.rh-content') .addClass('hoveraction') .find('.hri-round[data-userid=\'' + _0x5db3x4f + '\']') .addClass('hoverplayeritems')
- }, function () {
- $('.hri-round') .removeClass('hoverplayeritems'),
- $('.rh-content') .removeClass('hoveraction')
- }),
- $('.hri-round') .hover(function () {
- var _0x5db3x4f = $(this) .data('price') ? $(this) .data('price') : '',
- _0x5db3x1 = $(this) .data('userid') ? $(this) .data('userid') : '',
- _0x5db3x3b = $(this) .data('weapon') ? $(this) .data('weapon') : '';
- $(this) .addClass('active'),
- $('.weapon-history-hover span') .html(app.poly.t('?·?° ') + _0x5db3x4f),
- $('.weapon-history-hover b') .html(_0x5db3x3b),
- $('.rh-content .deposit[data-user=\'' + _0x5db3x1 + '\']') .addClass('hover');
- var _0x5db3x2c = ($('.weapon-history-hover') .innerHeight(), $(this) .offset() .left - 17),
- _0x5db3x50 = $(this) .offset() .top + $(this) .innerHeight() + 3;
- _0x5db3x2c + 150 > $(window) .innerWidth() && (_0x5db3x2c = $(window) .innerWidth() - 155),
- $('.weapon-history-hover') .css({
- left: _0x5db3x2c,
- top: _0x5db3x50
- }),
- $('.weapon-history-hover') .removeClass('hidden')
- }, function () {
- $(this) .removeClass('active'),
- $('.rh-content .deposit') .removeClass('hover'),
- setTimeout(function () {
- 0 == $('.hri.active') .length && $('.weapon-history-hover') .addClass('hidden')
- }, 100)
- });
- $.notify.addStyle('custom', {
- html: '<div>\n<span data-notify-text></span>\n</div>'
- });
- $.notify.defaults({
- style: 'custom'
- });
- $(document) .on('mouseenter', '.iusers, .iskins', function () {
- $(this) .tooltip('show')
- })
Add Comment
Please, Sign In to add comment