您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Transforma últimos posts em hyperlinks
// ==UserScript== // @name Dublanet Lastpost (Tema DublaNOVO) // @namespace http://tampermonkey.net/ // @version 1.0 // @description Transforma últimos posts em hyperlinks // @author Brenda // @match https://www.dublanet.com.br/comunidade/forumdisplay.php* // @grant none // ==/UserScript== (function () { 'use strict'; // Selecionar todos os tópicos document.querySelectorAll('.card').forEach(card => { // Achar o tid const threadLink = card.querySelector('a[href*="showthread.php?tid="]'); if (!threadLink) return; const tidMatch = threadLink.href.match(/tid=(\d+)/); if (!tidMatch) return; const tid = tidMatch[1]; const lastpostUrl = `showthread.php?tid=${tid}&action=lastpost`; // Achar os elementos pra linkar const dateSpans = card.querySelectorAll('span.small.text-muted, span[title*="horas"], span[title*="Ontem"]'); dateSpans.forEach(span => { // Não duplicar links if (span.closest('a')) return; const link = document.createElement('a'); link.href = lastpostUrl; link.style.textDecoration = 'underline dotted'; link.title = 'Ir para a última mensagem'; link.appendChild(span.cloneNode(true)); span.replaceWith(link); }); }); })();