Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.14.146.45
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp /
public /
assets /
js /
Delete
Unzip
Name
Size
Permission
Date
Action
bootstrap
[ DIR ]
drwxr-xr-x
2021-02-10 15:05
libs
[ DIR ]
drwxr-xr-x
2021-02-10 15:05
plugins
[ DIR ]
drwxr-xr-x
2021-02-10 15:06
template.js
50.63
KB
-rw-r--r--
2023-05-03 16:56
template.min.js
3.91
KB
-rw-r--r--
2021-02-10 15:05
Save
Rename
(function($) { "use strict"; Dropzone.autoDiscover = false; $(document).ready(function() { var nVer = navigator.appVersion; var nAgt = navigator.userAgent; var browserName = navigator.appName; var fullVersion = ''+parseFloat(navigator.appVersion); var majorVersion = parseInt(navigator.appVersion,10); var nameOffset,verOffset,ix; // In Opera, the true version is after "Opera" or after "Version" if ((verOffset=nAgt.indexOf("Opera"))!=-1) { browserName = "Opera"; fullVersion = nAgt.substring(verOffset+6); if ((verOffset=nAgt.indexOf("Version"))!=-1) fullVersion = nAgt.substring(verOffset+8); } // In MSIE, the true version is after "MSIE" in userAgent else if ((verOffset=nAgt.indexOf("MSIE"))!=-1) { browserName = "Microsoft Internet Explorer"; fullVersion = nAgt.substring(verOffset+5); } // In Chrome, the true version is after "Chrome" else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) { browserName = "Chrome"; fullVersion = nAgt.substring(verOffset+7); } // In Safari, the true version is after "Safari" or after "Version" else if ((verOffset=nAgt.indexOf("Safari"))!=-1) { browserName = "Safari"; fullVersion = nAgt.substring(verOffset+7); if ((verOffset=nAgt.indexOf("Version"))!=-1) fullVersion = nAgt.substring(verOffset+8); } // In Firefox, the true version is after "Firefox" else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) { browserName = "Firefox"; fullVersion = nAgt.substring(verOffset+8); } // In most other browsers, "name/version" is at the end of userAgent else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) < (verOffset=nAgt.lastIndexOf('/')) ) { browserName = nAgt.substring(nameOffset,verOffset); fullVersion = nAgt.substring(verOffset+1); if (browserName.toLowerCase()==browserName.toUpperCase()) { browserName = navigator.appName; } } $("body").click(function(event) { if (event.target.id != "search-results") { $("#search-results").fadeOut(); $('#search-field').val(''); } }); $(document).on('click', '#reset_password_link', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/reset_password', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '#register_link', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/register', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '#login_link', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/login', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '#login-do', function(e) { e.preventDefault(); e.stopPropagation(); let form_data = ''; form_data = 'email='+$('#email').val()+'&password='+$('#password').val()+'&_token='+$('input[name=_token]').val(); $.ajax({ cache: false, url: '/login/do', type: 'post', data: form_data, success: function (result) { if (!result || result=='') { window.location.href = '/'; } else { $('#login-wrapper').empty().html(result); showModal(); } } }); return false; }); $(document).on('click', '#reset-do', function(e) { e.preventDefault(); e.stopPropagation(); let form_data = ''; form_data = 'email='+$('#email').val()+'&_token='+$('input[name=_token]').val(); $.ajax({ cache: false, url: '/reset_password/do', type: 'post', data: form_data, success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '#register-do', function(e) { e.preventDefault(); e.stopPropagation(); let form_data = ''; form_data = 'email='+$('#email').val()+'&name='+$('#name').val()+'&password='+$('#password').val()+'&password_confirm='+$('#password_confirm').val()+'&_token='+$('input[name=_token]').val(); $.ajax({ cache: false, url: '/register/do', type: 'post', data: form_data, success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '.acc_btn, .login-profile-back', function(e) { e.preventDefault(); e.stopPropagation(); if (!$(this).hasClass('user_authed')) { $.ajax({ cache: false, url: '/login', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); } else { $.ajax({ cache: false, url: '/profile/index', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); } return false; }); $(document).on('click', '.impactor-flash', function(e) { if (!$('.impactor-flash a').hasClass('inactive')) { $('#impactor-current-HW').html($('#impactor-current-HW').data('hw')); $('.impactor-balance').html($('.impactor-balance').data('balance')); $('#increase').prop('disabled', ''); $('#increase').removeClass('inactive'); $('#reduce').prop('disabled', ''); $('#reduce').removeClass('inactive'); doScrolling($('#impactor').offset().top, 350); $('.impactor-block-back').show(); $('.impactor-block-back').css('opacity', '1'); $('.impactor-block-back').fadeOut(2400, 'swing'); } }); $(document).on('click', '.profile-settings-btn', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/profile/edit', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '.profile-help-btn', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/profile/help', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '.profile-privacy-btn, #privacy_policy', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/profile/privacy', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '.profile-terms-btn, #terms_of_service', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/profile/terms', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '#eula', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/profile/eula', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '#data_agreement', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/profile/data_agreement', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '#cookie_notice', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/profile/cookie_notice', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '#save-profile', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/profile/edit', type: 'post', data: new FormData($('#profile_save')[0]), enctype: 'multipart/form-data', contentType : false, processData: false, success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '#save-password', function(e) { e.preventDefault(); e.stopPropagation(); let form_data = ''; form_data = 'password_old='+$('#current-password').val()+'&password_confirm='+$('#verify-password').val()+'&password='+$('#password').val()+'&save_password=Y&_token='+$('input[name=_token]').val(); $.ajax({ cache: false, url: '/profile/edit', type: 'post', data: form_data, success: function (result) { $('#login-wrapper').empty().html(result); showModal(); } }); return false; }); $(document).on('click', '.login-popup-close', function(e) { e.preventDefault(); e.stopPropagation(); $('#login-wrapper').hide(); $('#chat-wrapper').hide(); $('#share-wrapper').hide(); $('body').css('position', 'static'); $('.overlay').hide(); $(document).unbind('touchmove'); $('body').css('overflow', ''); return false; }); $(document).on('click', '.login-popup-close-search', function(e) { e.preventDefault(); e.stopPropagation(); $('#search-results').hide(); $('#search-results').empty(); return false; }); $(document).on('click', '.messenger_btn, .chat-home', function(e) { //e.preventDefault(); //e.stopPropagation(); if ($(this).hasClass('user_authed')) { /* if ($('#chat-wrapper').css('display') == 'block') { $('#chat-wrapper').hide(); $('.overlay').hide(); } else {*/ $.ajax({ cache: false, url: '/chat/home', type: 'get', success: function (result) { $('#chat-wrapper').empty().html(result); $('#chat-wrapper').show(); $('.overlay').show(); $(document).bind('touchmove', function (e) { //e.preventDefault(); }); $('body').css('overflow', 'hidden'); } }); //} } return false; }); $(document).on('click', '.share_btn', function(e) { e.preventDefault(); e.stopPropagation(); if ($(this).hasClass('user_authed')) { $('#share-wrapper').show(); $('.overlay').show(); $(document).bind('touchmove', function (e) { e.preventDefault(); }); $('body').css('overflow', 'hidden'); } return false; }); $(document).on('click', '#stop-recommender', function(e) { $.ajax({ cache: false, url: '/follow/unrecommend', type: 'get', success: function (result) { alert('You are no longer a recommender'); $('#chat-wrapper').empty(); $('#chat-wrapper').hide(); $('.overlay').hide(); $('body').css('overflow', ''); } }); return false; }); $(document).on('click', '#top-10', function(e) { if ($(this).prop('checked')==true) { $.ajax({ cache: false, url: '/chat/top-10', type: 'get', success: function (result) { $('.peoples-list').empty().html(result); } }); } else { $.ajax({ cache: false, url: '/chat/peoples-list', type: 'get', success: function (result) { $('.peoples-list').empty().html(result); } }); } }); $(document).on('click', '.toggle-password', function() { $(this).toggleClass("fa-eye fa-eye-slash"); var input = $($(this).attr('toggle')); if (input.attr("type") === "password") { input.attr("type", "text"); } else { input.attr("type", "password"); } }); $(document).on('click', '#age_confirm', function(e) { if ($(this).prop('checked')==true) { $('#register-do').prop('disabled', '') } else { $('#register-do').prop('disabled', 'disabled') } }); $(document).on('click', '#switch-recommender', function(e) { let url = 'id='+$(this).data('id'); if ($('#switch-recommender').hasClass('has_recommender') && $('#switch-recommender').prop('checked')) { $('.popup_recommender-change').show(); $('.overlay').show(); return false; } else if ($('#switch-recommender').hasClass('has_recommender') && !$('#switch-recommender').prop('checked')) { $('.popup_recommender-change').show(); $('.overlay').show(); return false; } else { $('#switch-recommender').addClass('has_recommender'); switchRecommender(url); } }); $(document).on('click', '#recommender-confirm-button', function(e) { let url = 'id='+$(this).data('id'); if ($('#switch-recommender').hasClass('has_recommender') && $('#switch-recommender').prop('checked')) { $('#switch-recommender').prop('checked', ''); $('#switch-recommender').removeClass('has_recommender'); } else if ($('#switch-recommender').hasClass('has_recommender') && !$('#switch-recommender').prop('checked')) { $('#switch-recommender').prop('checked', 'checked'); $('#switch-recommender').addClass('has_recommender'); } switchRecommender(url); $('.popup_recommender-change').hide(); $('.overlay').hide(); }); $(document).on('click', '.popup_recommender-close', function(e) { $('.popup_recommender-change').hide(); $('.overlay').hide(); }); function switchRecommender(url) { $.ajax({ cache: false, url: '/chat/unpip/be_recommender', type: 'get', data: url, success: function (result) { if ($('#switch-block_text').hasClass('switch-block_text')) { $('#switch-block_text').removeClass('switch-block_text'); $('#switch-block_text').addClass('switch-block_text-blue'); } else { $('#switch-block_text').addClass('switch-block_text'); $('#switch-block_text').removeClass('switch-block_text-blue'); } } }); } $(document).on('click', '#show-bonuses-my', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/chat/bonuses/my', type: 'get', success: function (result) { $('#chat-wrapper').empty().html(result); $('#chat-wrapper').show(); $('.overlay').show(); $(document).bind('touchmove', function(e){ e.preventDefault(); }); $('body').css('overflow', 'hidden'); } }); return false; }); $(document).on('click', '#show-bonuses-chat', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/chat/bonuses', type: 'get', success: function (result) { $('#chat-wrapper').empty().html(result); $('#chat-wrapper').show(); $('.overlay').show(); $(document).bind('touchmove', function(e){ e.preventDefault(); }); $('body').css('overflow', 'hidden'); } }); return false; }); $(document).on('click', '#show-unpip-chat', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/chat/unpip', type: 'get', success: function (result) { $('#chat-wrapper').empty().html(result); $('#chat-wrapper').show(); $('.overlay').show(); $(document).bind('touchmove', function(e){ e.preventDefault(); }); $('body').css('overflow', 'hidden'); } }); return false; }); $(document).on('click', '#my-unpip', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/chat/unpip/my', type: 'get', success: function (result) { $('#chat-wrapper').empty().html(result); $('#chat-wrapper').show(); $('.overlay').show(); $(document).bind('touchmove', function(e){ e.preventDefault(); }); $('body').css('overflow', 'hidden'); } }); return false; }); $(document).on('click', '.unpip-info', function(e) { e.preventDefault(); e.stopPropagation(); let url = 'id='+$(this).data('id'); $.ajax({ cache: false, url: '/chat/unpip/info', type: 'get', data: url, success: function (result) { $('#chat-wrapper').empty().html(result); $('#chat-wrapper').show(); $('.overlay').show(); $(document).bind('touchmove', function(e){ e.preventDefault(); }); $('body').css('overflow', 'hidden'); } }); return false; }); $(document).on('click', '.unpip-delete-chat', function(e) { e.preventDefault(); e.stopPropagation(); if (window.confirm("Do you really want to delete follower?")) { let url = 'id=' + $(this).data('id'); $.ajax({ cache: false, url: '/chat/bonuses/delete', type: 'get', data: url, success: function (result) { $('#chat-wrapper').empty().html(result); } }); } return false; }); $(document).on('click', '#increase', function(e) { e.preventDefault(); e.stopPropagation(); let url = 'type=2' $.ajax({ cache: false, url: '/impact/change', type: 'get', data: url, success: function (result) { $('#login-wrapper').empty().html(result); window.scrollTo(0, 0); showModal(); } }); return false; }); $(document).on('click', '#reduce', function(e) { e.preventDefault(); e.stopPropagation(); let url = 'type=1' $.ajax({ cache: false, url: '/impact/change', type: 'get', data: url, success: function (result) { $('#login-wrapper').empty().html(result); window.scrollTo(0, 0); showModal(); } }); return false; }); $(document).on('click', '#impact-change', function(e) { e.preventDefault(); e.stopPropagation(); let url = 'type='+$('#impact-type').val()+'&_token='+$('input[name=_token]').val(); $.ajax({ cache: false, url: '/impact/do', type: 'post', data: url, success: function (result) { $('#login-wrapper').empty().html(result); $.ajax({ cache: false, url: '/impact/update', type: 'get', success: function (result) { $('.HW-main-block').empty().html(result); } }); $.ajax({ cache: false, url: '/impact/balance', type: 'get', success: function (result) { $('.balance-main-block').empty().html(result); } }); $.ajax({ cache: false, url: '/impact/update-range', type: 'get', success: function (result) { $('.impact-main-block').empty().html(result); $('#impactor-current-HW').empty().html('0'); $('.impactor-balance').empty().html('0'); $('#increase').prop('disabled','disabled'); $('#reduce').prop('disabled','disabled'); } }); } }); return false; }); $(document).on('click', '#withdraw', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/withdraw', type: 'get', success: function (result) { $('#login-wrapper').empty().html(result); window.scrollTo(0, 0); showModal(); $.ajax({ cache: false, url: '/withdraw/update', type: 'get', success: function (result) { $('.balance-main-block').empty().html(result); } }); } }); return false; }); $(document).on('click', '#HW-public', function(e) { $.ajax({ cache: false, url: '/public-options?opt=HW', type: 'get', success: function (result) { } }); }); $(document).on('click', '#balance-public', function(e) { $.ajax({ cache: false, url: '/public-options?opt=balance', type: 'get', success: function (result) { } }); }); $(document).on('click', '#impacts-public', function(e) { $.ajax({ cache: false, url: '/public-options?opt=impacts', type: 'get', success: function (result) { } }); }); $(document).on('click', '.show-chat', function(e) { e.preventDefault(); e.stopPropagation(); let url = 'id='+$(this).data('id'); $.ajax({ cache: false, url: '/chat/unpip', type: 'get', data: url, success: function (result) { $('#chat-wrapper').empty().html(result); $('#chat-wrapper').show(); $('.overlay').show(); $(document).bind('touchmove', function(e){ e.preventDefault(); }); $('body').css('overflow', 'hidden'); } }); return false; }); $(document).on('click', '#user-follow', function(e) { e.preventDefault(); e.stopPropagation(); let url = 'id='+$(this).data('id'); $.ajax({ cache: false, url: '/follow/user', type: 'get', dataType: "json", data: url, success: function (result) { if (result.status=='ask') { $('#follow-block').hide(); $('#follow-block-ask').show(); } } }); return false; }); $(document).on('click', '#user-follow-yes', function(e) { e.preventDefault(); e.stopPropagation(); let url = 'id='+$(this).data('id')+'&ask=y'; $.ajax({ cache: false, url: '/follow/user', type: 'get', dataType: "json", data: url, success: function (result) { $('#login-wrapper').hide(); $('#chat-wrapper').hide(); $('.overlay').hide(); $('body').css('position', 'static'); } }); return false; }); $(document).on('click', '#user-follow-no', function(e) { e.preventDefault(); e.stopPropagation(); $('#login-wrapper').hide(); $('#chat-wrapper').hide(); $('.overlay').hide(); $('body').css('position', 'static'); return false; }); blink('.out-of-range', -1, 1000); function blink(elem, times, speed) { if (times > 0 || times < 0) { if ($(elem).hasClass("blink")) $(elem).removeClass("blink"); else $(elem).addClass("blink"); } clearTimeout(function () { blink(elem, times, speed); }); if (times > 0 || times < 0) { setTimeout(function () { blink(elem, times, speed); }, speed); times -= .5; } } fc(); function fc() { let borderWidth = 12; if (mobileCheck()) { if (window.innerHeight > window.innerWidth){ borderWidth = 4; } else { borderWidth = 6; } } $('.countdown').final_countdown({ 'start': 1619447006, 'end': 1619447065, 'now': 1619447006, 'seconds': { borderColor: '#0099ff', borderWidth: borderWidth }, }, function() { $.ajax({ cache: false, url: '/countries', type: 'get', success: function (result) { $(".graph-block-wrap").empty().html(result); } }); fc(); }); } $(window).on( "orientationchange", function( event ) { location.reload(); }); $(document).on('keypress', '#profile-name', function (event) { var regex = new RegExp("^[a-zA-Z0-9 ]+$"); var key = String.fromCharCode(!event.charCode ? event.which : event.charCode); if (!regex.test(key)) { event.preventDefault(); return false; } }); $(document).on('click', '#search-button', function(e) { e.preventDefault(); e.stopPropagation(); return false; }); $(document).on('keyup', '#chat-id-1-input', function(e) { if (parseInt($(this).val())>parseInt($(this).attr('max'))) $(this).val(parseInt($(this).attr('max'))); if (parseInt($(this).val())<parseInt($(this).attr('min'))) $(this).val(parseInt($(this).attr('min'))); }); $(document).on('click', '#send-HW-user', function(e) { e.preventDefault(); e.stopPropagation(); let url = 'id='+$(this).data('user')+'&HW='+$('#chat-id-1-input').val(); $.ajax({ cache: false, url: '/chat/unpip/send', type: 'get', dataType: "json", data: url, success: function (result) { if (result.status=='success') { $('#chat-id-1-input').val(''); $('#chat-id-1-input').attr("placeholder", ""); $('#chat-id-1-success').show(); } else { $('#chat-id-1-input').val(''); $('#chat-id-1-input').attr("placeholder", ""); $('#chat-id-1-error').show(); } } }); return false; }); $(document).on('click', '#chat-id-1-success', function(e) { $(this).hide(); $('#chat-id-1-input').val(''); $('#chat-id-1-input').attr("placeholder", "Send HW to user..."); $('#chat-id-1-input').focus(); }); $(document).on('click', '#chat-id-1-error', function(e) { $(this).hide(); $('#chat-id-1-input').val(''); $('#chat-id-1-input').attr("placeholder", "Send HW to user..."); $('#chat-id-1-input').focus(); }); $(document).on('click', '#chat-id-1-input', function(e) { $('#chat-id-1-success').hide(); $('#chat-id-1-error').hide(); $('#chat-id-1-input').val(''); $('#chat-id-1-input').attr("placeholder", "Send HW to user..."); $('#chat-id-1-input').focus(); }); $(document).on('click', '.mute-user', function(e) { let url = 'id='+$(this).data('id'); $.ajax({ cache: false, url: '/chat/unpip/mute', type: 'get', data: url, success: function (result) { } }); return false; }); $(document).on('click', '.delete-user', function(e) { let url = 'id='+$(this).data('id'); $.ajax({ cache: false, url: '/chat/unpip/delete', type: 'get', data: url, success: function (result) { } }); return false; }); $(document).on('click', '.chat-with-user', function(e) { e.preventDefault(); e.stopPropagation(); let url = 'id='+$(this).data('id'); $.ajax({ cache: false, url: '/chat/unpip', type: 'get', data: url, success: function (result) { $('#chat-wrapper').empty().html(result); $('#chat-wrapper').show(); $('.overlay').show(); $(document).bind('touchmove', function(e){ e.preventDefault(); }); $('body').css('overflow', 'hidden'); } }); return false; }); /*$(document).on('click', '#share_grafic', function(e) { e.preventDefault(); e.stopPropagation(); return false; });*/ $(document).on('click', '#share_link', function(e) { e.preventDefault(); e.stopPropagation(); unpip_to_copy($(this).data('text')); return false; }); $(document).on('change', '#phone-no-auth', function(e) { if ($("#phone-no-auth").val().length==16) { $('#phone-no-auth-do').prop('disabled', false) $('#phone-no-auth-do').css('background', 'url(/img/Butblue.svg) no-repeat left top') $('#phone-no-auth-do').css('background-size', '100%') } else { $('#phone-no-auth-do').prop('disabled', true) $('#phone-no-auth-do').css('background', 'url(/img/Butgray.svg) no-repeat left top') $('#phone-no-auth-do').css('background-size', '100%') } }); $(document).on('keyup', '#phone-no-auth', function(e) { if ($("#phone-no-auth").val().length==16) { $('#phone-no-auth-do').prop('disabled', false) $('#phone-no-auth-do').css('background', 'url(/img/Butblue.svg) no-repeat left top') $('#phone-no-auth-do').css('background-size', '100%') } else { $('#phone-no-auth-do').prop('disabled', true) $('#phone-no-auth-do').css('background', 'url(/img/Butgray.svg) no-repeat left top') $('#phone-no-auth-do').css('background-size', '100%') } }); $(document).on('submit', '.happy-send', function(e) { return false; }); $(document).on('click', '#phone-no-auth-do', function(e) { e.preventDefault(); e.stopPropagation(); $.ajax({ cache: false, url: '/candy/save?t='+$('#t').val()+'&phone='+$('#phone-no-auth').val(), type: 'get', success: function (result) { $('#phone-no-auth-do').prop('disabled', true) $('#phone-no-auth-do').css('background', 'url(/img/Butgray.svg) no-repeat left top') $('#phone-no-auth-do').css('background-size', '100%') $('#phone-no-auth').val('') alert(result.message) } }); return false; }); /* $(document).on('click', '#phone-auth-do', function(e) { e.preventDefault(); e.stopPropagation(); return false; });*/ $(document).on('keyup', '#search-field', function(e) { var url = 'q='+$(this).val(); if ($(this).val().length>2) { $.ajax({ cache: false, url: '/search', type: 'get', data: url, success: function (result) { $('#search-results').empty().html(result); $('#search-results').show(); } }); } }); $(".menu-2").hover( function() { $(this).find("img").attr('src', '/img/Unp+.svg'); }, function() { $(this).find("img").attr('src', '/img/Unp-.svg'); } ); $(".menu-3").hover( function() { $(this).find("img").attr('src', '/img/Game+.svg'); }, function() { $(this).find("img").attr('src', '/img/Game-.svg'); } ); $(".menu-4").hover( function() { $(this).find("img").attr('src', '/img/Passport+.svg'); }, function() { $(this).find("img").attr('src', '/img/Passport-.svg'); } ); $(".menu-5").hover( function() { $(this).find("img").attr('src', '/img/Progress+.svg'); }, function() { $(this).find("img").attr('src', '/img/Progress-.svg'); } ); $(".menu-6").hover( function() { $(this).find("img").attr('src', '/img/Model+.svg'); }, function() { $(this).find("img").attr('src', '/img/Model-.svg'); } ); $(".menu-7").hover( function() { $(this).find("img").attr('src', '/img/Contact+.svg'); }, function() { $(this).find("img").attr('src', '/img/Contact-.svg'); } ); function mobileCheck() { let check = false; (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera); return check; }; // // Horizontal scroll // [].forEach.call(document.querySelectorAll('[data-horizontal-scroll]'), function (el) { function scrollHorizontally(e) { e = window.event || e; var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))); el.scrollLeft -= (delta*28); e.preventDefault(); } if (el.addEventListener) { el.addEventListener("mousewheel", scrollHorizontally, false); el.addEventListener("DOMMouseScroll", scrollHorizontally, false); } else { el.attachEvent("onmousewheel", scrollHorizontally); } }); // // Detect mobile devices // var isMobile = { Android: function() { return navigator.userAgent.match(/Android/i); }, BlackBerry: function() { return navigator.userAgent.match(/BlackBerry/i); }, iOS: function() { return navigator.userAgent.match(/iPhone|iPod|iPad/i); }, Opera: function() { return navigator.userAgent.match(/Opera Mini/i); }, Windows: function() { return navigator.userAgent.match(/IEMobile/i) || navigator.userAgent.match(/WPDesktop/i); }, any: function() { return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); } }; // // Modified accordion(settings.html) // if ( !isMobile.any() ) { [].forEach.call(document.querySelectorAll('.modified-accordion [data-toggle="collapse"]'), function (e) { e.addEventListener('click', function(event) { event.preventDefault(); event.stopPropagation(); }); }); [].forEach.call(document.querySelectorAll('.modified-accordion .collapse'), function (e) { e.classList.add('show'); }); } // // Emoji // if ( !isMobile.any() ) { [].forEach.call(document.querySelectorAll('[data-emoji-form]'), function (form) { var button = form.querySelector('[data-emoji-btn]'); var picker = new EmojiButton({ position: "top", zIndex: 1020 }); picker.on('emoji', function(emoji) { form.querySelector('[data-emoji-input]').value += emoji; }); button.addEventListener('click', function () { picker.pickerVisible ? picker.hidePicker() : picker.showPicker(button); }); }); } else { [].forEach.call(document.querySelectorAll('[data-emoji-form]'), function (form) { form.querySelector('[data-emoji-btn]').style.display = 'none'; }); } // // Toggle chat // [].forEach.call(document.querySelectorAll('[data-chat="open"]'), function (a) { a.addEventListener('click', function () { document.querySelector('.main').classList.toggle('main-visible'); }, false ); }); // // Toggle chat`s sidebar // [].forEach.call(document.querySelectorAll('[data-chat-sidebar-toggle]'), function (e) { e.addEventListener('click', function (event) { event.preventDefault(); var chat_sidebar_id = e.getAttribute('data-chat-sidebar-toggle'); var chat_sidebar = document.querySelector(chat_sidebar_id); if (typeof(chat_sidebar) != 'undefined' && chat_sidebar != null) { if ( chat_sidebar.classList.contains('chat-sidebar-visible') ) { chat_sidebar.classList.remove('chat-sidebar-visible') document.body.classList.remove('sidebar-is-open'); } else { [].forEach.call(document.querySelectorAll('.chat-sidebar'), function (e) { e.classList.remove('chat-sidebar-visible'); document.body.classList.remove('sidebar-is-open'); }); chat_sidebar.classList.add('chat-sidebar-visible'); document.body.classList.add('sidebar-is-open'); } } }); }); // // Close all chat`s sidebars // [].forEach.call(document.querySelectorAll('[data-chat-sidebar-close]'), function (a) { a.addEventListener('click', function (event) { event.preventDefault(); document.body.classList.remove('sidebar-is-open'); [].forEach.call(document.querySelectorAll('.chat-sidebar'), function (a) { a.classList.remove('chat-sidebar-visible'); }); }, false ); }); // // Dropzone // if ( document.querySelector('#dropzone-template-js') ) { var template = document.querySelector('#dropzone-template-js'); var template_element = document.querySelector('#dropzone-template-js'); template_element.parentNode.removeChild(template_element); } [].forEach.call(document.querySelectorAll('.dropzone-form-js'), function (el) { var clickable = el.querySelector('.dropzone-button-js').id; var url = el.getAttribute('data-dz-url'); var previewsContainer = el.querySelector('.dropzone-previews-js'); var myDropzone = new Dropzone(el, { url: url, previewTemplate: template.innerHTML, previewsContainer: previewsContainer, clickable: '#' + clickable }); }); // // Mobile screen height minus toolbar height // function mobileScreenHeight() { if ( document.querySelectorAll('.navigation').length && document.querySelectorAll('.sidebar').length ) { document.querySelector('.sidebar').style.height = windowHeight - document.querySelector('.navigation').offsetHeight + 'px'; } } if ( isMobile.any() && (document.documentElement.clientWidth < 1024) ) { var windowHeight = document.documentElement.clientHeight; mobileScreenHeight(); window.addEventListener('resize', function(event){ if (document.documentElement.clientHeight != windowHeight) { windowHeight = document.documentElement.clientHeight; mobileScreenHeight(); } }); } // // Scroll to end of chat // if (document.querySelector('.end-of-chat')) { document.querySelector('.end-of-chat').scrollIntoView(); } // // Autosize // autosize(document.querySelectorAll('[data-autosize="true"]')); // // SVG inject // SVGInjector(document.querySelectorAll('img[data-inject-svg]')); }); function unpip_to_copy(text) { var $temp = $("<input>"); $("body").append($temp); $temp.val(text).select(); document.execCommand("copy"); $temp.remove(); } function doScrolling(elementY, duration) { var startingY = window.pageYOffset; var diff = elementY - startingY; var start; // Bootstrap our animation - it will get called right before next frame shall be rendered. window.requestAnimationFrame(function step(timestamp) { if (!start) start = timestamp; // Elapsed milliseconds since start of scrolling. var time = timestamp - start; // Get percent of completion in range [0, 1]. var percent = Math.min(time / duration, 1); window.scrollTo(0, startingY + diff * percent); // Proceed with animation as long as we wanted it to. if (time < duration) { window.requestAnimationFrame(step); } }) } function showModal() { $('#login-wrapper').show(); $('.overlay').show(); const scrollY = $('body').offset().top; $('body').css('position', 'fixed'); //$('body').css('top', ''); //window.scrollTo(0, parseInt(scrollY || '0') * -1); $(document).bind('touchmove', function(e){ e.preventDefault(); }); $('body').css('overflow', 'hidden'); } })(jQuery);