// ==UserScript== // @name MT论坛 // @namespace http://tampermonkey.net/ // @description MT论坛优化 // @version 2.0.2 // @author MT-戒酒的李白染 // @icon https://bbs.binmt.cc/favicon.ico // @match *://bbs.binmt.cc/* // @compatible edge Beta/Dev/Candy 测试通过 // @compatible 火狐 测试通过 // @compatible Yandex 测试通过 // @grant GM_addStyle // @grant GM_setValue // @grant GM_getValue // @grant GM_setClipboard // @run-at document-start // @supportURL https://github.com/893177236/Monkey_script // @require http://cdn.staticfile.org/jquery/2.1.4/jquery.min.js // @downloadURL none // ==/UserScript== (function () { 'use strict'; let mt_config = { dom_obj: { beauty_select: function () { //下拉列表对象 return document.getElementsByClassName("beauty-select")[0]; }, combobox_switch: function () { //复选框对象 return document.getElementsByClassName("switch_1")[0]; }, comiis_verify: function () { //帖子内各个人的信息节点【list】 return document.getElementsByClassName("comiis_verify"); }, comiis_formlist: function () { //导航中最新、热门、精华、恢复、抢沙发的各个帖子【list】 return document.getElementsByClassName("top_lev bg_a f_f"); }, comiis_postli: function () { //帖子内评论,包括帖子内容主体,第一个就是主体【list】 return document.getElementsByClassName("comiis_postli comiis_list_readimgs nfqsqi") } } } function Latest_publication() { var ele = document.createElement('li'); var url = window.location.href; ele.id = "latest_publication"; ele.innerHTML = '最新发表<\/a>'; document.getElementsByClassName("wp comiis_nvbox cl")[0].children[1].appendChild(ele); if (url == 'https:\/\/bbs.binmt.cc\/forum.php?mod=guide&view=newthread') { document.getElementById("mn_forum_10").children[0].style = "background: url("; ele.style.cssText = 'background: url("https:\/\/cdn2.bbs.binmt.cc\/template\/comiis_mi\/img\/nv_a.png") repeat-x 50% -50px;'; } } function insert_empty_title() { if (location.href.match(/mod=post&action=newthread&fid=50/g) != null) { var a = document.createElement("div"); var b = document.querySelector("#postform > div > div:nth-child(5)"); a.className = "comiis_btnbox cl"; a.innerHTML = '