您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Изменение иконки лайка на иконку симпатии НОВЫЙ
// ==UserScript== // @name Change Likes to Heart UPD // @namespace http://tampermonkey.net/ // @version 0.001001 // @description Изменение иконки лайка на иконку симпатии НОВЫЙ // @author molihan // @license MIT // @icon https://www.google.com/s2/favicons?sz=64&domain=lolz.live // @match https://lolz.live/threads/* // @grant none // ==/UserScript== (function() { const users = document.querySelectorAll(".userText"); let html = document.createElement("div"); users.forEach(user => { let link = user.querySelector("span a.username"); fetch(`https://lolz.live/${link.getAttribute("href")}`).then(resul => resul.text().then(htmlText => { let noReaction = 0; html.innerHTML = htmlText; let reaction = Number(html.querySelector(".count").textContent.replace(" ", "")); fetch(`https://lolz.live/${link.getAttribute("href")}likes?type=gotten&content_type=post&stats=1`).then(resul => { resul.text().then(htmlText => { html.innerHTML = htmlText; let allReaction = html.querySelectorAll(".node"); allReaction.forEach(el => { if (el.querySelector(".muted").textContent.toLowerCase().indexOf("розыгрыш") !== -1) { noReaction += Number(el.querySelector(".counter").textContent.replace(" ", "")); } }); const adjustedCount = reaction - noReaction; const element = `<i class="userCounterIcon fas fa-heart"></i>${reaction}`; if (user.querySelector(".userCounters span")) { user.querySelector(".userCounters span").innerHTML = element; } else { user.insertAdjacentHTML("beforeend", `<span class="userCounter item muted">${element}</span>`); } }); }); })); }); })();