您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Eres un flojo? esto es perfecto para ti
当前为
// ==UserScript== // @name ttu logs for Iniesta // @namespace http://tampermonkey.net/ // @version 0.1 // @description Eres un flojo? esto es perfecto para ti // @author You // @match https://reader.ttsu.app/b?id=* // @icon https://www.google.com/s2/favicons?sz=64&domain=ttsu.app // @grant none // @license GPL-3.0-or-later // ==/UserScript== function copyLog(textLog) { navigator.clipboard.writeText(textLog); }; function runScript() { const flexChild = this.querySelector(".flex-1"); const regex = /\|.*/gm; const subst = ``; if (flexChild) { let divChildren = flexChild.childNodes; for (var i=0; i<divChildren.length; i++) { //console.log(divChildren[i]); let logText = `.log lectura ${divChildren[i+1].childNodes[2].innerText - divChildren[i].childNodes[2].innerText} ${document.title.replace(regex, subst)} ${divChildren[i].childNodes[0].innerText}`; divChildren[i].addEventListener("click", function(){ copyLog(logText); }, false); } } else { console.log("No child with class 'flex-1'"); // Your additional code here } }; // Get a reference to the container element const container = document.querySelector('.writing-horizontal-tb'); // Add an event listener to run the script when the container is visible // You might want to use a specific event, like 'scroll', 'click', or 'visibilitychange' container.addEventListener('click', runScript);