精易论坛快捷回复
// ==UserScript==
// @name 精易论坛快捷回复
// @namespace https://bbs.tampermonkey.net.cn/
// @version 0.1.1
// @description try to take over the world!
// @author 交流请加群:756186992
// @match https://bbs.125.la/forum.php?*
// @match https://bbs.125.la/*
// ==/UserScript==
(function () {
'use strict';
setTimeout(() => {
var paragraphs = document.querySelectorAll("#um > p");
var firstP = paragraphs[0];
let myTieZi = document.createElement("a");
myTieZi.textContent = " |我的贴子";
myTieZi.href = "https://bbs.125.la/forum.php?mod=guide&view=my"
myTieZi.target = "_blank";
firstP.appendChild(myTieZi);
// 获取第二个<p>元素
var secondParagraph = paragraphs[1]; // 索引为1表示第二个元素
let newP = document.createElement("p")
newP.textContent = "快捷回复";
newP.classList.add("quickReply");
newP.style.color = "red";
newP.style.cursor = "pointer";
// 添加点击事件监听器到新<p>元素
newP.addEventListener("click", function () {
// 在这里编写点击事件触发时你想执行的代码
document.querySelector("#fastpostmessage").value = "大佬牛逼,感谢大佬,大佬带我飞!!!!"
document.querySelector(".pn.pnc.vm").click()
setTimeout(() => {
document.querySelector(".jz52topa").click()
}, 1 * 1000);
});
secondParagraph.parentNode.insertBefore(newP, secondParagraph.nextSibling);
}, 5 * 1000)
})();