Загрузка...

Automation Автовыдача личного

Thread in Extentions created by APT29388 Mar 21, 2025. (bumped Jun 1, 2025) 429 views

  1. APT29388
    APT29388 Topic starter Mar 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] и всё, готово
     
    1. KusuriYakuzen
    2. APT29388 Topic starter
  2. Архистратиг
    Архистратиг Mar 21, 2025 аниме малышка продается - https://lolz.live/threads/7421153/ 16,599 Jul 26, 2020
    ДобаBь, чтобы еще можно было BстаBить кастомный текст после Bыдачи личного, типо так[IMG]
     
    1. View previous comments (1)
    2. God_likeGL Layer 1
      🔥 APT29388, о вы космонавт
    3. APT29388 Topic starter
    4. Архистратиг
  3. БИЛЛИНОГАМИ
    БИЛЛИНОГАМИ Mar 21, 2025 Банки|Турция|Верификации|Биржи - lzt.lol/TUR :zerotwo:
    Хоть личку мне разгрузишь немного спасибо
     
  4. Deps
    Deps Mar 21, 2025 :thomas: 770 Jun 25, 2021
    На API-шке лучше бы заебашил, но ничё так, ебаться зато не нужно сильно. :+rep:
     
    1. View previous comments (6)
    2. APT29388 Topic starter
      Deps, бро, мне похуй, я так чувствую
    3. God_likeGL Layer 1

      а я хочу ебаться сильно((
  5. fl1pper
    fl1pper Mar 23, 2025 1629 Aug 10, 2020
    а в чем прикол тогда хайда
     
    1. View previous comments (1)
    2. fl1pper
      APT29388, так какое поднятие актива если ты содержимое всем раздаешь
    3. APT29388 Topic starter
    4. APT29388 Topic starter
      fl1pper, хз, просто так
  6. Архистратиг
    Архистратиг Mar 26, 2025 аниме малышка продается - https://lolz.live/threads/7421153/ 16,599 Jul 26, 2020
Loading...
Top