Загрузка...

Автоматизация Автовыдача личного

Тема в разделе Дополнения создана пользователем APT29388 21 мар 2025. (поднята 1 июн 2025) 421 просмотр

  1. APT29388
    APT29388 Автор темы 21 мар 2025 ГУРУ ИНВАЙТА - lolz.live/threads/8567181 :admin:
    [IMG]
    JS
    // ==UserScript==
    // @name Автовыдача личных
    // @namespace https://lolz.live/
    // @version 2.0
    // @description Автовыдача личного
    // @author APT29388
    // @match https://lolz.live/conversations/
    // @match https://lolz.live/conversations/*
    // @grant GM_setValue
    // @grant GM_getValue
    // ==/UserScript==

    (function() {
    'use strict';

    let isScriptActive = false;

    function checkScriptStatus() {
    const wasActive = localStorage.getItem('autoPersonalActive') === 'true';
    if (wasActive) {
    isScriptActive = true;

    if (window.location.href === 'https://lolz.live/conversations/') {
    setTimeout(openUnreadConversation, 1000);

    const button = document.querySelector('.auto-personal-button');
    if (button) {
    button.style.backgroundColor = '#00ba78';
    }
    }
    }
    }

    function givePersonal(conversationElement) {
    const allElements = conversationElement.querySelectorAll('a, span.button, .button');

    for (const element of allElements) {
    if (element.textContent.includes('Выдать личный')) {
    element.click();
    return true;
    }
    }

    return false;
    }

    function goBackToConversationsList() {
    localStorage.setItem('autoPersonalActive', 'true');
    window.location.href = 'https://lolz.live/conversations/';
    }

    function hasUnreadMessages() {
    const counter = document.querySelector('#ConversationsMenu_Counter .Total');
    return counter && parseInt(counter.textContent) > 0;
    }

    function scrollConversationList(callback) {
    const conversationListWrapper = document.querySelector('#ConversationListScrollbar');
    if (!conversationListWrapper) {
    if (callback) callback();
    return;
    }

    let lastHeight = conversationListWrapper.scrollHeight;
    let scrollAttempts = 0;
    const maxScrollAttempts = 20;

    function scrollDown() {
    conversationListWrapper.scrollTop = conversationListWrapper.scrollHeight;

    const unreadConversations = document.querySelectorAll('.conversationItem._loadConversation.unread');

    if (unreadConversations.length > 0 ||
    conversationListWrapper.scrollHeight === lastHeight ||
    scrollAttempts >= maxScrollAttempts) {

    if (callback) callback();
    return;
    }

    lastHeight = conversationListWrapper.scrollHeight;
    scrollAttempts++;

    setTimeout(scrollDown, 500);
    }

    scrollDown();
    }

    function processCurrentConversation() {
    setTimeout(() => {
    const conversationContainer = document.querySelector('.message-body, .messageBody, .block-body, .messageList, .conversationViewContainer, body');

    if (conversationContainer) {
    if (givePersonal(conversationContainer)) {
    setTimeout(goBackToConversationsList, 1000);
    } else {
    setTimeout(goBackToConversationsList, 500);
    }
    } else {
    setTimeout(goBackToConversationsList, 500);
    }
    }, 1000);
    }

    function openUnreadConversation() {
    isScriptActive = true;
    localStorage.setItem('autoPersonalActive', 'true');

    if (window.location.href === 'https://lolz.live/conversations/') {
    if (!hasUnreadMessages()) {
    stopScript();
    return;
    }

    scrollConversationList(() => {
    const unreadConversations = document.querySelectorAll('.conversationItem._loadConversation.unread');

    if (unreadConversations.length > 0) {
    const conversationHref = unreadConversations[0].getAttribute('data-href');

    if (conversationHref) {
    window.location.href = `https://lolz.live/${conversationHref}`;
    } else {
    setTimeout(openUnreadConversation, 1000);
    }
    } else if (hasUnreadMessages()) {
    setTimeout(openUnreadConversation, 2000);
    } else {
    stopScript();
    }
    });
    }
    }

    function stopScript() {
    isScriptActive = false;
    localStorage.removeItem('autoPersonalActive');

    const button = document.querySelector('.auto-personal-button');
    if (button) {
    button.style.backgroundColor = '';
    }
    }

    function addStartButton() {
    if (window.location.href === 'https://lolz.live/conversations/') {
    const controlsContainer = document.querySelector('.conversation-controls');

    if (controlsContainer && !document.querySelector('.auto-personal-button')) {
    const startButton = document.createElement('a');
    startButton.className = 'Tooltip conversationControl auto-personal-button';
    startButton.title = 'Запустить/остановить автовыдачу личных';
    startButton.innerHTML = '<i class="fa fa-robot conversationControl--icon" aria-hidden="true"></i>';
    startButton.style.cursor = 'pointer';

    if (isScriptActive) {
    startButton.style.backgroundColor = '#00ba78';
    }

    startButton.addEventListener('click', function() {
    if (!isScriptActive) {
    isScriptActive = true;
    localStorage.setItem('autoPersonalActive', 'true');
    this.style.backgroundColor = '#00ba78';
    openUnreadConversation();
    } else {
    stopScript();
    this.style.backgroundColor = '';
    }
    });

    controlsContainer.appendChild(startButton);
    }
    }
    }

    function initialize() {
    checkScriptStatus();

    if (window.location.href.match(/https:\/\/lolz\.live\/conversations\/\d+\//)) {
    processCurrentConversation();
    } else {
    addStartButton();
    }
    }

    window.addEventListener('load', function() {
    setTimeout(initialize, 500);
    });
    })();
    Ставите его, жмаете кнопочку [IMG] и всё, готово
     
    21 мар 2025 Изменено
    1. KusuriYakuzen
      APT29388,
      фатальная ошибка
    2. APT29388 Автор темы
  2. Архистратиг
    Архистратиг 21 мар 2025 аниме малышка продается - https://lolz.live/threads/7421153/ 16 599 26 июл 2020
    ДобаBь, чтобы еще можно было BстаBить кастомный текст после Bыдачи личного, типо так[IMG]
     
    1. Посмотреть предыдущие комментарии (1)
    2. God_likeGL Layer 1
      🔥 APT29388, о вы космонавт
    3. APT29388 Автор темы
  3. БИЛЛИНОГАМИ
    БИЛЛИНОГАМИ 21 мар 2025 Банки|Турция|Верификации|Биржи - lzt.lol/TUR :zerotwo:
    Хоть личку мне разгрузишь немного спасибо
     
  4. Deps
    Deps 21 мар 2025 :thomas: 770 25 июн 2021
    На API-шке лучше бы заебашил, но ничё так, ебаться зато не нужно сильно. :+rep:
     
    1. Посмотреть предыдущие комментарии (6)
    2. APT29388 Автор темы
      Deps, бро, мне похуй, я так чувствую
    3. God_likeGL Layer 1

      а я хочу ебаться сильно((
  5. fl1pper
    fl1pper 23 мар 2025 1629 10 авг 2020
    а в чем прикол тогда хайда
     
    1. Посмотреть предыдущие комментарии (2)
    2. APT29388 Автор темы
    3. APT29388 Автор темы
      fl1pper, хз, просто так
  6. Архистратиг
    Архистратиг 26 мар 2025 аниме малышка продается - https://lolz.live/threads/7421153/ 16 599 26 июл 2020
Загрузка...
Top