One Hat Cyber Team
Your IP :
3.145.164.105
Server IP :
192.185.194.254
Server :
Linux raider.websitewelcome.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
Server Software :
Apache
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home2
/
glenar
/
ads.glenar.com
/
js
/
View File Name :
script.js
"use strict"; var ua = window.navigator.userAgent; var msie = ua.indexOf("MSIE "); var isMobile = { Android: function Android() { return navigator.userAgent.match(/Android/i); }, BlackBerry: function BlackBerry() { return navigator.userAgent.match(/BlackBerry/i); }, iOS: function iOS() { return navigator.userAgent.match(/iPhone|iPad|iPod/i); }, Opera: function Opera() { return navigator.userAgent.match(/Opera Mini/i); }, Windows: function Windows() { return navigator.userAgent.match(/IEMobile/i); }, any: function any() { return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows(); } }; function isIE() { ua = navigator.userAgent; var is_ie = ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1; return is_ie; } if (isIE()) { document.querySelector('html').classList.add('_ie'); } if (isMobile.any()) { document.querySelector('html').classList.add('_touch'); } function testWebP(callback) { var webP = new Image(); webP.onload = webP.onerror = function () { callback(webP.height == 2); }; webP.src = "data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"; } testWebP(function (support) { if (support === true) { document.querySelector('html').classList.add('_webp'); } else { document.querySelector('html').classList.add('_no-webp'); } }); function ibg() { if (isIE()) { var _ibg = document.querySelectorAll("._ibg"); for (var i = 0; i < _ibg.length; i++) { if (_ibg[i].querySelector('img') && _ibg[i].querySelector('img').getAttribute('src') != null) { _ibg[i].style.backgroundImage = 'url(' + _ibg[i].querySelector('img').getAttribute('src') + ')'; } } } } ibg(); window.addEventListener("load", function () { if (document.querySelector('.wrapper')) { setTimeout(function () { document.querySelector('.wrapper').classList.add('_loaded'); }, 0); } }); var unlock = true; //ActionsOnHash if (location.hash) { var hsh = location.hash.replace('#', ''); if (document.querySelector('.popup_' + hsh)) { popup_open(hsh); } else if (document.querySelector('div.' + hsh)) { _goto(document.querySelector('.' + hsh), 500, ''); } } //BodyLock function body_lock(delay) { var body = document.querySelector("body"); if (body.classList.contains('_lock')) { body_lock_remove(delay); } else { body_lock_add(delay); } } function body_lock_remove(delay) { var body = document.querySelector("body"); if (unlock) { var lock_padding = document.querySelectorAll("._lp"); setTimeout(function () { for (var index = 0; index < lock_padding.length; index++) { var el = lock_padding[index]; el.style.paddingRight = '0px'; } body.style.paddingRight = '0px'; body.classList.remove("_lock"); }, delay); unlock = false; setTimeout(function () { unlock = true; }, delay); } } function body_lock_add(delay) { var body = document.querySelector("body"); if (unlock) { var lock_padding = document.querySelectorAll("._lp"); for (var index = 0; index < lock_padding.length; index++) { var el = lock_padding[index]; el.style.paddingRight = window.innerWidth - document.querySelector('.wrapper').offsetWidth + 'px'; } body.style.paddingRight = window.innerWidth - document.querySelector('.wrapper').offsetWidth + 'px'; body.classList.add("_lock"); unlock = false; setTimeout(function () { unlock = true; }, delay); } } //Добавление класса lock для body при открытии меню===================================================================== var bodyLockStatus = true; var bodyLockToggle = function bodyLockToggle() { var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 500; if (document.documentElement.classList.contains('_lock')) { bodyUnlock(delay); } else { bodyLock(delay); } }; var bodyUnlock = function bodyUnlock() { var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 500; var body = document.querySelector("body"); if (bodyLockStatus) { var lock_padding = document.querySelectorAll("._lp"); setTimeout(function () { for (var index = 0; index < lock_padding.length; index++) { var el = lock_padding[index]; el.style.paddingRight = '0px'; } body.style.paddingRight = '0px'; document.documentElement.classList.remove("_lock"); }, delay); bodyLockStatus = false; setTimeout(function () { bodyLockStatus = true; }, delay); } }; var bodyLock = function bodyLock() { var delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 500; var body = document.querySelector("body"); if (bodyLockStatus) { var lock_padding = document.querySelectorAll("._lp"); for (var index = 0; index < lock_padding.length; index++) { var el = lock_padding[index]; el.style.paddingRight = window.innerWidth - document.querySelector('.wrapper').offsetWidth + 'px'; } body.style.paddingRight = window.innerWidth - document.querySelector('.wrapper').offsetWidth + 'px'; document.documentElement.classList.add("_lock"); bodyLockStatus = false; setTimeout(function () { bodyLockStatus = true; }, delay); } }; //Добавление класса бургеру=================================================================================== var iconMenu = document.querySelector(".icon-menu"); var menuBody = document.querySelector('.menu__body'); var headerContent = document.querySelector('.header__content'); if (iconMenu) { iconMenu.addEventListener("click", function (e) { if (unlock) { body_lock(); iconMenu.classList.toggle('_active'); menuBody.classList.toggle('_active'); headerContent.classList.toggle('_active'); } }); } //Прокрутка по клику и закрытие меню============================================================================ var menuLinks = document.querySelectorAll('._link[data-link]'); if (menuLinks.length > 0) { var onMenuLinkClick = function onMenuLinkClick(e) { var menuLink = e.target; if (menuLink.dataset.link && document.querySelector(menuLink.dataset.link)) { var linkBlock = document.querySelector(menuLink.dataset.link); var linkBlockValue = linkBlock.getBoundingClientRect().top + pageYOffset - document.querySelector('header').offsetHeight; if (iconMenu.classList.contains('_active')) { if (unlock) { body_lock(); iconMenu.classList.toggle('_active'); menuBody.classList.toggle('_active'); } } window.scrollTo({ top: linkBlockValue, behavior: "smooth" }); e.preventDefault(); } }; menuLinks.forEach(function (menuLink) { menuLink.addEventListener("click", onMenuLinkClick); }); } var popup_link = document.querySelectorAll('._popup-link'); var popups = document.querySelectorAll('.popup'); var _loop = function _loop(index) { var el = popup_link[index]; el.addEventListener('click', function (e) { if (unlock) { var item = el.getAttribute('href').replace('#', ''); var video = el.getAttribute('data-video'); popup_open(item, video); } e.preventDefault(); }); }; for (var index = 0; index < popup_link.length; index++) { _loop(index); } for (var _index = 0; _index < popups.length; _index++) { var popup = popups[_index]; popup.addEventListener("click", function (e) { if (!e.target.closest('.popup__body')) { popup_close(e.target.closest('.popup')); } }); } function popup_open(item) { var video = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; var activePopup = document.querySelectorAll('.popup._active'); if (activePopup.length > 0) { popup_close('', false); } var curent_popup = document.querySelector('.popup_' + item); if (curent_popup && unlock) { if (video != '' && video != null) { var popup_video = document.querySelector('.popup_video'); popup_video.querySelector('.popup__video').innerHTML = '<iframe src="https://www.youtube.com/embed/' + video + '?autoplay=1" allow="autoplay; encrypted-media" allowfullscreen></iframe>'; } if (!document.querySelector('.menu__body._active')) { body_lock_add(500); } curent_popup.classList.add('_active'); history.pushState('', '', '#' + item); } } function popup_close(item) { var bodyUnlock = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; if (unlock) { if (!item) { for (var _index2 = 0; _index2 < popups.length; _index2++) { var _popup = popups[_index2]; var video = _popup.querySelector('.popup__video'); if (video) { video.innerHTML = ''; } _popup.classList.remove('_active'); } } else { var _video = item.querySelector('.popup__video'); if (_video) { _video.innerHTML = ''; } item.classList.remove('_active'); } if (!document.querySelector('.menu__body._active') && bodyUnlock) { body_lock_remove(500); } history.pushState('', '', window.location.href.split('#')[0]); } } var popup_close_icon = document.querySelectorAll('.popup__close,._popup-close'); if (popup_close_icon) { var _loop2 = function _loop2(_index3) { var el = popup_close_icon[_index3]; el.addEventListener('click', function () { popup_close(el.closest('.popup')); }); }; for (var _index3 = 0; _index3 < popup_close_icon.length; _index3++) { _loop2(_index3); } } document.addEventListener('keydown', function (e) { if (e.code === 'Escape') { popup_close(); } }); //Уведомление что нужно обновиться для старых браузеров ================================================================ var browserUpdater = new ya.browserUpdater.init({ theme: "yellow", lang: "ru", exclusive: false, browsers: { chromium: 35, iron: 35, flock: "Infinity", palemoon: 25, camino: "Infinity", safari: 5.2, yandexinternet: "Infinity", fx: 31, ie: 11, opera: 16, chrome: 35, maxthon: 4.4, seamonkey: 2.4 }, remember: false, rememberFor: 1, cookiePrefix: "yaBrowserUpdater", classNamePrefix: "ya-update", jsonpCallback: "yaBrowserUpdaterJSONPCallback", onStripeShow: null, onStripeHide: null }); /* //Основной функционал ================================================================================================== */ var header = document.querySelector('.header'); var collection = document.querySelectorAll('.block'); var menu = document.querySelector('._nav'); var $item = document.querySelectorAll('._nav li'); var links = document.querySelectorAll('._nav a'); //Добавление класса активному пункту меню при скролле ================================================================== //Добавление класса шапке при скролле вариант-2 ======================================================================== var lastScroll = 0; var defaultOffset = 122; var scrollPosition = function scrollPosition() { return window.pageYOffset || document.documentElement.scrollTop; }; var containHide = function containHide() { return header.classList.contains('_hide'); }; window.addEventListener('scroll', function () { if (scrollPosition() > lastScroll && !containHide() && scrollPosition() > defaultOffset) { //scroll down header.classList.add('_hide'); } else if (scrollPosition() < lastScroll && containHide()) { //scroll up header.classList.remove('_hide'); } lastScroll = scrollPosition(); }); var mainNav = document.querySelector('.header'); window.onscroll = function () { windowScroll(); }; function windowScroll() { mainNav.classList.toggle("_bg", mainNav.scrollTop > 650 || document.documentElement.scrollTop > 650); } //Полифил для sticky в IE11 ============================================================================================ //Указываем элемент который должен прилипнуть // stickybits('#sticky', {useStickyClasses: true}); var fields = document.querySelectorAll('.website__block-file'); Array.prototype.forEach.call(fields, function (input) { var label = input.nextElementSibling, labelVal = label.querySelector('.website__block-view').innerText; input.addEventListener('change', function (e) { var countFiles = ''; if (this.files && this.files.length >= 1) countFiles = this.files.length; if (countFiles) label.querySelector('.website__block-view').innerText = 'Выбрано файлов: ' + countFiles;else label.querySelector('.website__block-view').innerText = labelVal; }); }); document.getElementById("clear").onclick = function (e) { document.getElementsByClassName("list__block-label").value = ""; }; document.querySelector('.keyword__block-select').onclick = function (e) { document.getElementById('group').classList.add('_active'); };