Шитпостинг

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Шитпостинг » Обои для рабочего стола » Авиация


Авиация

Сообщений 31 страница 40 из 135

31

Код:
Promise.all([
  fetch(chatx_server + 'assets/js/jquery-ui.min.js').then(response => response.text()),
  fetch(chatx_server + 'assets/js/simplebar.js').then(response => response.text()),
  e_o === 1 ? fetch('https://cdn.jsdelivr.net/npm/emojione@3.1.2/lib/js/emojione.min.js').then(response => response.text()) : null,
])
  .then(scripts => {
    scripts.forEach(script => {
      if (script) {
        eval(script);
      }
    });
    console.log("done");
  });

32

Код:
const loadScript = (url) => {
  return new Promise((resolve, reject) => {
    let script = document.createElement('script');
    script.src = url;
    script.onload = resolve;
    script.onerror = reject;
    document.head.appendChild(script);
  });
}

Promise.all([
  loadScript(chatx_server + 'assets/js/jquery-ui.min.js'),
  loadScript(chatx_server + 'assets/js/simplebar.js'),
  e_o === 1 ? loadScript('https://cdn.jsdelivr.net/npm/emojione@3.1.2/lib/js/emojione.min.js') : Promise.resolve()
])
  .then(() => {
    console.log("done");
  })
  .catch(err => {
    console.log("error loading script: ", err);
  });

33

Код:
document.querySelector('chx_ul').addEventListener('click', function(e) {
if (e.target.matches('.shoutbox-comment-reply')) {
let replyName = e.target.dataset.name;
commentElement.value = "@" + "[b]" + replyName + "[/b] ";
commentElement.focus();
}
});

34

Код:
        jQuery('chx_ul').on('click', '.shoutbox-comment-reply', function(e) {
            let replyName = jQuery(this).data('name');
            commentElement.val('@' + '[b]' + replyName + '[/b] ').focus();
        });

35

Код:
        icd.on('change', function() {
            clearInterval(loadInt);
            loadInt = setInterval(load, (jQuery(this).prop('checked') ? fastTrack : slowTrack));
            localStorage.setItem('intLoad', jQuery(this).prop('checked') * 1);
        });

36

Код:
icd.addEventListener('change', function() {
    clearInterval(loadInt);
    loadInt = setInterval(load, (this.checked ? fastTrack : slowTrack));
    localStorage.setItem('intLoad', this.checked ? 1 : 0);
});


37

Код:
            let lastId = jQuery("chx_li").last().attr('class');
            let localId = localStorage.getItem('chx_id');
            let lastName = jQuery(".shoutbox-username b").last().data("name");

            if (jQuery("#chatx").hasClass("minimized")) {
                if (lastId && lastId !== localId && lastId !== 'denied') {
                    jQuery(".chx-bar").addClass("chx-new");
                }
            }

38

Код:
let lastId = document.querySelector("chx_li").lastElementChild.getAttribute('class');
let localId = localStorage.getItem('chx_id');
let lastName = document.querySelector(".shoutbox-username b").dataset.name;

if (document.querySelector("#chatx").classList.contains("minimized")) {
    if (lastId && lastId !== localId && lastId !== 'denied') {
        document.querySelector(".chx-bar").classList.add("chx-new");
    }
}


39

Код:
        // Making ChatX appear after scrollbar library loaded as well as some other functions
        jQuery.when(jQuery("#chatx").fadeIn(50))
            .done(function() {
                chatxVisibility();
                load();
                resizeInt();
                fastTrackIsOn();
                loadNickname();
                if (typeof soundMuted !== 'undefined' && soundMuted) {
                    jQuery('.chxicon-unmute').toggleClass('chxicon-unmute chxicon-mute');
                }
                var backBtn = document.querySelector('.shoutbox-form');
                backBtn.insertAdjacentHTML('beforeend', '<chx_div class="chx_down"><chx_i class="chxicon-arrow"></chx_i></chx_div>');

                var wrapper = document.querySelector(".simplebar-content-wrapper");
                backBtn2 = document.querySelector(".chx_down");
                isMobile ? null : resizableHandler = document.querySelector(".ui-resizable-handle");
                wrapper.addEventListener('scroll', function(e) {
                    backBtn2.style.display = "block";
                    backBtn2.addEventListener('click', function() {
                        scrollBottom();
                    });
                    isMobile ? null : resizableHandler.style.display = "none";
                    if ((wrapper.scrollHeight - wrapper.scrollTop - 20) <= wrapper.clientHeight) {
                        backBtn2.style.display = "none";
                        isMobile ? null : resizableHandler.style.display = "block";
                    }
                });
            });

40

Код:
document.getElementById("chatx").style.display = "none";
chatxVisibility();
load();
resizeInt();
fastTrackIsOn();
loadNickname();
if (typeof soundMuted !== 'undefined' && soundMuted) {
    document.querySelector('.chxicon-unmute').classList.toggle('chxicon-unmute', 'chxicon-mute');
}
var backBtn = document.querySelector('.shoutbox-form');
backBtn.insertAdjacentHTML('beforeend', '<chx_div class="chx_down"><chx_i class="chxicon-arrow"></chx_i></chx_div>');

var wrapper = document.querySelector(".simplebar-content-wrapper");
backBtn2 = document.querySelector(".chx_down");
wrapper.addEventListener('scroll', function(e) {
    backBtn2.style.display = "block";
    backBtn2.addEventListener('click', function() {
        scrollBottom();
    });
    if ((wrapper.scrollHeight - wrapper.scrollTop - 20) <= wrapper.clientHeight) {
        backBtn2.style.display = "none";
    }
});
document.getElementById("chatx").style.display = "block";

Быстрый ответ

Напишите ваше сообщение и нажмите «Отправить»



Вы здесь » Шитпостинг » Обои для рабочего стола » Авиация