// ==UserScript== // @name MT论坛 // @namespace http://tampermonkey.net/ // @description MT论坛优化 // @version 2.0.5 // @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") } }, rexp: { search_url: /bbs.binmt.cc\/search.php/g, home_url: /home.php\?mod=spacecp&ac=profile&op=info/g, home_kmisign_url: /bbs.binmt.cc\/(forum.php\?mod=guide&view=hot(|&mobile=2)|k_misign-sign.html)/g, //主页和签到页链接 home_space_url: /bbs\.binmt\.cc\/home\.php\?mod=space/g, //【我的】 个人信息页链接 home_space_pc_uid_url: /space-uid-(.*?).html/, //PC 个人空间链接uid reply_url: "", sign_url: "", navigation_url: "", forum_post: /bbs.binmt.cc\/thread-/g, //帖子链接 forum_post_pc: /.*:\/\/bbs.binmt.cc\/thread.*/, //帖子链接-PC forum_guide_url: /bbs.binmt.cc\/forum.php\?mod=guide/g, // 导航链接 forum_post_reply: /forum.php\?mod=post&action=reply/g, //帖子中回复的链接 forum_post_page: '&page=(.*)', //帖子链接的当前所在页 page forum_post_pc_page: 'thread-(.*?)-', //PC帖子链接的当前所在页 page forum_plate_text: /休闲灌水|求助问答|逆向教程|资源共享|综合交流|编程开发|玩机教程|建议反馈/g, //各版块名称 formhash: /formhash=(.*)&/, //论坛账号的凭证 font_special: /
| ||<\/font>|||||align=".*?"/g, //帖子内特殊字体格式 forum_post_guide_url: /bbs.binmt.cc\/page-[1-5].html|bbs.binmt.cc\/forum.php\?mod=guide/g, //帖子链接和导航链接 mt_uid: /uid=(\d+)/, nologin: /member.php\?mod=logging&action=login(|&mobile=2)/g, //未登录 pc_useragent: 'Windows', //pc识别 } } 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 = '