您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
增强黎明版的一些交互
当前为
// ==UserScript== // @name 增强黎明版 // @namespace no1xsyzy // @version 0.1 // @description 增强黎明版的一些交互 // @author no1xsyzy // @match http://adnmb1.com/* // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue // @license Apache License, Version 2.0 (Apache-2.0); https://opensource.org/licenses/Apache-2.0 // ==/UserScript== (function() { 'use strict'; var parsedSearch = (s => { var m = {} s.trimLeft("?").split("&").forEach(kvp=>{ var [k,v]=kvp.split("=",2) m[k]=v }) return m })(window.location.search) // Different pages if(window.location.href.includes("doReplyThread")){ // 回复成功 if(!document.getElementByClass('success').innerText.includes("回复成功")){return false} var postid=document.getElementById('href').href; GM_deleteValue("postid") }else if(window.location.href.includes("/t/")){ var theinputbox = document.querySelector("textarea.h-post-form-textarea") theinputbox.value = GM_getValue(window.location.pathname, parsedSearch.r?`>>No.${parsedSearch.r}\n`:"") var updateInputboxValue = function(){ GM_setValue(window.location.pathname, theinputbox.value) } theinputbox.addEventListener("change", updateInputboxValue) document.querySelectorAll("a.h-threads-info-id").forEach(m=>m.addEventListener("click", (e)=>{ if(!theinputbox.value.endsWith("\n")){ theinputbox.value += "\n" } theinputbox.value += `>>${m.innerText}\n` updateInputboxValue() console.log(e) e.preventDefault() })) } })();