// ==UserScript== // @name MT论坛 // @namespace http://tampermonkey.net/ // @description MT论坛效果增强,如自动签到、自动展开帖子、滚动加载评论、显示uid、屏蔽用户、手机版小黑屋、今日签到之星、今日签到排名、帖外预览图片、搜索框清空按钮修复、个人空间正确进入、康哥图床-帖子内|聊天内(20MB)、Hello图床-帖子内|聊天内(20MB)、Z4A图床-帖子内|聊天内(50MB)、付费主题白嫖提醒、页面小窗浏览帖子、蓝奏云登录、上传和查看历史上传记录、代码块上方新增复制按钮、发帖、编辑、回复预览等 // @version 2.5.1.3 // @author WhiteSevs // @icon https://bbs.binmt.cc/favicon.ico // @match *://bbs.binmt.cc/* // @compatible edge Beta/Dev/Candy 测试通过 // @compatible 火狐 测试通过 // @compatible Yandex 测试通过 // @compatible Kiwi 测试通过 // @license GPL-3.0-only // @grant GM_addStyle // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue // @grant GM_setClipboard // @grant GM_xmlhttpRequest // @run-at document-start // @supportURL https://github.com/893177236/Monkey_script // @require https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.4.1/jquery.min.js // @require https://unpkg.com/any-touch/dist/any-touch.umd.min.js // @require https://greasyfork.org/scripts/449471-viewer/code/Viewer.js?version=1081056 // @require https://greasyfork.org/scripts/449512-xtiper/code/Xtiper.js?version=1081249 // @require https://greasyfork.org/scripts/449562-nzmsgbox/code/NZMsgBox.js?version=1082044 // @downloadURL none // ==/UserScript== (function () { 'use strict'; const log = { success: (str) => { console.log("%c" + str, "color: #00a5ff"); }, error: (str) => { console.trace("%c" + str, "color: #f20000"); } } function tryCatch(func, params, errorFunc) { // 捕获错误 try { func(params); } catch (error) { console.log("%c" + (func.name + "出现错误"), "color: #f20000"); console.log("%c" + ("错误原因:" + error), "color: #f20000"); window.eval(errorFunc); } } let mt_config = { dom_obj: { beauty_select: function () { //下拉列表对象 return document.getElementsByClassName("beauty-select")[0]; }, combobox_switch: function () { //复选框对象 return document.getElementsByClassName("whitesevcheckbox")[0]; }, comiis_verify: function () { //帖子内各个人的信息节点【list】 return document.getElementsByClassName("comiis_verify"); }, comiis_formlist: function () { //导航中最新、热门、精华、恢复、抢沙发的各个帖子【list】 return document.getElementsByClassName("forumlist_li"); }, comiis_mmlist: function () { return document.getElementsByClassName("comiis_mmlist"); }, comiis_postli: function () { //帖子内评论,包括帖子内容主体,第一个就是主体【list】 return document.getElementsByClassName("comiis_postli comiis_list_readimgs nfqsqi") }, post_bottom_controls: function () { // 帖子底部一栏控件 return document.getElementsByClassName("comiis_znalist_bottom b_t cl") }, post_list_of_comments: function () { //帖子内评论列表 return $jq(".comiis_postlist.kqide"); }, post_next_commect: function () { //帖子内评论下一页的按钮 return document.querySelector("div.comiis_page.bg_f>a:nth-child(3)"); } }, rexp: { bbs: /bbs.binmt.cc/, // 论坛 search_url: /bbs.binmt.cc\/search.php/g, //搜索页 chat_url: /home.php\?mod=space&do=pm&subop=view/g, // 聊天页 home_url: /home.php\?mod=spacecp&ac=profile&op=info/g, //个人空间页 home_url_brief: /home.php\?mod=space/g, //个人空间页简略url 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_forum: /bbs.binmt.cc\/forum.php\?mod=post&action=reply/g, // 回复的界面url sign_url: "", navigation_url: "", community_url: /forum.php\?forumlist/, //社区 forum_post: /(bbs.binmt.cc\/thread-|bbs.binmt.cc\/forum.php\?mod=viewthread)/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, //各版块名称 plate_url: /bbs.binmt.cc\/forum-[0-9]{1,2}-[0-9]{1,2}.html/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识别 k_misign_sign: "bbs.binmt.cc\/k_misign-sign.html", post_forum: /forum.php\?mod=post&action=newthread/, // 发布帖子 edit_forum: /forum.php\?mod=post&action=edit/, // 编辑帖子 } } // mt全屏遮罩调用 // popup.open(''); // 关闭方式 // popup.close() let utils = { dateStringFormatToStamp(datastring) { let date = datastring; date = date.substring(0, 19); date = date.replace(/-/g, '/'); let timestamp = new Date(date).getTime(); // let newDate = new Date(timestamp); return timestamp; }, timeStringFormatToStamp(timestring) { let today = new Date(); let date = today.getFullYear() + "-" + (today.getMonth() + 1) + "-" + today.getDate() + " " + timestring; date = date.substring(0, 19); date = date.replace(/-/g, '/'); let timestamp = new Date(date).getTime(); // let newDate = new Date(timestamp); return timestamp }, listCompareDescByValue(propertyName) { // json根据 字段(int)降序 return function (object1, object2) { var value1 = object1[propertyName]; var value2 = object2[propertyName]; if (value2 < value1) { return -1; } else if (value2 > value1) { return 1; } else { return 0; } } }, listCompareAscByValue(propertyName) { // json根据 字段(int)升 return function (object1, object2) { var value1 = object1[propertyName]; var value2 = object2[propertyName]; if (value2 > value1) { //-1表示前对象小,1表示后对象小,0表示相等 return -1; } else if (value2 < value1) { return 1; } else { return 0; } } }, listToStringByValue(_list_, propertyName) { // json根据 字段(int)合并 let content = ""; Array.from(_list_).forEach((item) => { content = content + item[propertyName]; }) return content }, //随机数组 randomArr(items) { var item = items[Math.floor(Math.random() * items.length)]; return item; }, //随机小数点 randbix(n, m) { bix = Math.random().toFixed(2); num = Number(utils.randomNum(n, m)) + Number(bix); r2 = utils.randomNum(2, 10); return num.toFixed(r2); }, //随机数字 randomNum(n, m) { var rander = Math.round(Math.random() * (m - n)) + n; return rander; }, getFormatTime(formatStr) { // 获取自定义格式化时间, yyyy-MM-dd HH:mm:ss 2022-08-21 23:59:00 /** * yyyy 年 * MM 月 * dd 天 * HH 时 (24小时制) * hh 时 (12小时制) * mm 分 * ss 秒 */ function checkTime(i) { if (i < 10) return "0" + i; return i; } function timeSystemChange(_hour_) { // 时间制修改 24小时制转12小时制 return _hour_ > 12 ? _hour_ - 12 : _hour_; } var time = new Date(); var yyyy = time.getFullYear(); //获取 年 var MM = time.getMonth() + 1; //获取 月 var dd = time.getDate(); //获取 日 var HH = checkTime(time.getHours()); //获取 时 (24小时制) var hh = checkTime(timeSystemChange(time.getHours())); //获取 时 (12小时制) var mm = checkTime(time.getMinutes()); //获取 分 var ss = checkTime(time.getSeconds()); //获取 秒 /****当时、分、秒、小于10时,则添加0****/ formatStr = formatStr.replace(/yyyy/g, yyyy); formatStr = formatStr.replace(/MM/g, MM); formatStr = formatStr.replace(/dd/g, dd); formatStr = formatStr.replace(/HH/g, HH); formatStr = formatStr.replace(/hh/g, hh); formatStr = formatStr.replace(/mm/g, mm); formatStr = formatStr.replace(/ss/g, ss); return formatStr; } } function envCheck() { // 脚本运行环境修复,兼容部分函数 GM_xmlhttpRequest x浏览器进行了兼容,调用方式为GM.xmlHttpRequest,但会检测是否同源请求,所以不可修改headers let checkStatus = true; let isFailedFunction = []; console.log("正在检测脚本环境..."); if (typeof GM_xmlhttpRequest == "undefined") { if (typeof GM != "undefined" && typeof GM.xmlHttpRequest != "undefined") { window.GM_xmlhttpRequest = (param) => { GM.xmlHttpRequest(param); }; console.log("check: %c GM_xmlhttpRequest %c √ 替换成当前环境的GM中", "background:#24272A; color:#ffffff"); } else { isFailedFunction = isFailedFunction.concat("GM_xmlhttpRequest"); console.log(`%c GM_xmlhttpRequest %c 该函数不存在,替换成$.ajax只能同源请求`, "background:#24272A; color:#ffffff", "background:#fff;"); window.GM_xmlhttpRequest = (f) => { console.log(`$jq.ajax请求 url: ${f.url}`); $jq.ajax({ url: f.url, type: f.method, data: f.data, timeout: f.timeout, dataType: f.responseType, success: (r) => { f.onload(r) }, error: (r) => { if (r.status == 200) { f.onload(r) } else { f.onerror(r); } } }) } } } else { console.log("check: %c GM_xmlhttpRequest %c √", "background:#24272A; color:#ffffff", "color:#00a5ff"); } if (typeof $ != 'undefined') { window.$jq = $.noConflict(true); // 为什么这么写,X浏览器加载jq会替换网页上的jq console.log(`check: %c $ %c √ jQuery版本:${$jq.fn.jquery}`, "background:#24272A; color:#ffffff", "color:#00a5ff"); if ($jq.fn.jquery != "3.4.1") { console.log("jQuery加载错误,如果时非油猴加载本脚本方式,请放到网页加载完毕后执行"); return false; } if (typeof $ != 'undefined') { console.log(`检测到网页使用的jQuery版本: %c ${$.fn.jquery}`, "color:#00a5ff"); } } else { checkStatus = false; isFailedFunction = isFailedFunction.concat("GM_xmlhttpRequest"); console.log("check: %c $ %c ×", "background:#24272A; color:#ffffff", "color:#f90000"); } var loadNetworkResource = []; window.GM_asyncLoadScriptContent = (url, replaceStatus) => { // 异步执行跨域js资源 js if (loadNetworkResource.indexOf(url) != -1) { console.log("已加载该js:", url); return } replaceStatus = replaceStatus == null ? true : replaceStatus; return new Promise(res => { GM_xmlhttpRequest({ url: url, method: "GET", async: false, timeout: 10000, onload: (r) => { let execStatus = false; let retText = r.responseText; if (replaceStatus) { retText = retText.replace(/\$/g, "$jq"); retText = retText.replace(/jQuery/g, "$jq"); } try { eval(retText); execStatus = true; loadNetworkResource = loadNetworkResource.concat(url); } catch (error) { console.log("执行JS失败1" + error); execStatus = false; } // try { // window.eval(retText); // execStatus = true; // loadNetworkResource = loadNetworkResource.concat(url); // } catch (error) { // console.log("执行JS失败2 " + error); // execStatus = false; // } res(execStatus); }, onerror: () => { console.log("网络异常,加载JS失败", url); res(false); } }) }) } window.GM_asyncLoadScriptNode = (url) => { return new Promise(res => { let tempNode = document.createElement("script"); tempNode.setAttribute("src", url); document.head.append(tempNode); tempNode.onload = () => { res(); } }) } window.GM_asyncLoadStyleSheet = (url) => { // 异步添加跨域css资源 if (loadNetworkResource.indexOf(url) != -1) { console.log("已加载该css:", url); return } loadNetworkResource = loadNetworkResource.concat(url); let cssNode = document.createElement("link"); cssNode.setAttribute("rel", "stylesheet"); cssNode.setAttribute("href", url); cssNode.setAttribute("type", "text/css"); document.head.append(cssNode); } if (typeof GM_getValue == "undefined") { window.GM_getValue = (key) => { let value = window.localStorage.getItem(key); if (typeof value == "string" && value.trim() != String()) { value = JSON.parse(value); } return value }; console.log("check: %c GM_xmlhttpRequest %c √ 修复", "background:#24272A; color:#ffffff", "color:#00a5ff"); } else { console.log("check: %c GM_getValue %c √", "background:#24272A; color:#ffffff", "color:#00a5ff"); } if (typeof GM_setValue == "undefined") { window.GM_setValue = (key, value) => { window.localStorage.setItem(key, JSON.stringify(value)); }; console.log("check: %c GM_setValue %c √ 修复", "background:#24272A; color:#ffffff", "color:#00a5ff"); } else { console.log("check: %c GM_setValue %c √", "background:#24272A; color:#ffffff", "color:#00a5ff"); } if (typeof GM_deleteValue == "undefined") { window.GM_deleteValue = (key) => { window.localStorage.removeItem(key); }; console.log("check: %c GM_deleteValue %c √ 修复", "background:#24272A; color:#ffffff", "color:#00a5ff"); } else { console.log("check: %c GM_deleteValue %c √", "background:#24272A; color:#ffffff", "color:#00a5ff"); } if (typeof GM_addStyle == "undefined") { window.GM_addStyle = (styleText) => { let cssDOM = document.createElement("style"); cssDOM.setAttribute("type", "text/css"); cssDOM.innerHTML = styleText; document.head.appendChild(cssDOM); }; console.log("check: %c GM_addStyle %c √ 修复", "background:#24272A; color:#ffffff", "color:#00a5ff"); } else { console.log("check: %c GM_addStyle %c √", "background:#24272A; color:#ffffff", "color:#00a5ff"); } if (typeof GM_setClipboard == "undefined") { window.GM_setClipboard = (text) => { let clipBoardDOM = document.createElement("input"); clipBoardDOM.type = "text"; clipBoardDOM.setAttribute("style", "opacity:0;position:absolute;"); clipBoardDOM.id = "whitesevClipBoardInput"; document.body.append(clipBoardDOM); let clipBoardInputNode = document.getElementById("whitesevClipBoardInput"); clipBoardInputNode.value = text; clipBoardInputNode.removeAttribute("disabled"); clipBoardInputNode.select(); document.execCommand('copy'); clipBoardInputNode.remove(); }; console.log("check: %c GM_setClipboard %c √ 修复", "background:#24272A; color:#ffffff", "color:#00a5ff"); } else { console.log("check: %c GM_setClipboard %c √", "background:#24272A; color:#ffffff", "color:#00a5ff"); } if (checkStatus) { console.log(`脚本环境检测结果: 通过`); } else { let isFailedStr = ""; Array.from(isFailedFunction).forEach(item => { isFailedStr += (item + "、"); }) isFailedStr = isFailedStr.replace(/、$/, '') console.log(`脚本环境检测结果: ${isFailedStr}失败`); } return checkStatus; } async function loadCheckboxTipResource() { // 加载checkbox值变化的显示的提示的资源 await GM_asyncLoadScriptContent("https://whitesev.gitee.io/static_resource/ios_loading/js/iosOverlay.js"); await GM_asyncLoadStyleSheet("https://whitesev.gitee.io/static_resource/ios_loading/css/iosOverlay.css"); } async function repairPCNoLoadResource() { // 修复电脑版未加载的js资源 await GM_asyncLoadScriptNode("https://cdn-bbs.mt2.cn/static/js/smilies.js?x6L", false); await GM_asyncLoadScriptNode("https://cdn-bbs.mt2.cn/static/js/common.js?hsy", false); } function latestReleaseForumPost() { // 最新发表 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://cdn-bbs.mt2.cn/template/comiis_mi/img/nv_a.png") repeat-x 50% -50px;'; } } function removeForumPostFontStyle() { // 移除帖子内的字体style if (GM_getValue("v1") && location.href.match(mt_config.rexp.forum_post)) { var rule = mt_config.rexp.font_special; var h_content = document.getElementsByClassName("comiis_a comiis_message_table cl"); h_content[0].innerHTML = h_content[0].innerHTML.replace(rule, ''); } } function autoSignIn() { //mt签到 function getFormHash() { // 获取账号的formhash return document.querySelector("input[name=formhash]") ? document.querySelector("input[name=formhash]").value : document.querySelector("div[class=sidenv_exit]>a").href.match(mt_config.rexp.formhash)[1]; } function signIn(_formhash_) { // 签到 console.log("签到请求"); $jq.get("/k_misign-sign.html?operation=qiandao&format=button&formhash=" + _formhash_ + "&inajax=1&ajaxtarget=midaben_sign", function (data, status) { console.log(data); GM_setValue("mt_sign", parseInt(utils.getFormatTime("yyyyMMdd"))); function randDanmu() { let icon = utils.randomArr(['', 's', 'e', 'w', 'a', 'h', 'https://cdn-bbs.mt2.cn/template/comiis_app/comiis/img/favicon.ico']); let type = utils.randomArr(['w', 'b']); let randTip = utils.randomArr(["已签到", "请刷新", "不要呆着了", "快点滴", "手机要爆炸了", "麻溜的", "说的就是你", "看什么看", "懂不懂自动签到的含金量啊", "别迷恋哥,哥只是个传说", "你不懂自动签到的含金量", "花会枯萎,自动签到永不凋零"]); xtip.danmu(randTip, { icon: icon, type: type, }); } function danmulist() { // 弹幕启动 return setInterval(function () { randDanmu(); }, 3 * 150); } function danmuclose() { // 弹幕关闭 if (intervalId) { clearInterval(intervalId); intervalId = null; } }; var intervalId = danmulist(); setTimeout(function () { // 10秒后关闭 danmuclose(intervalId); }, 50000); }); } if (!GM_getValue("v17")) { return; } if ((document.querySelector("div[class=comiis_dlq]>a") != null) || (document.getElementsByClassName("sidenv_user")[0].href.match(mt_config.rexp.nologin) != null)) { console.log("当前账号尚未登录"); popup.open("当前账号尚未登录", "alert"); return; } let formhash = getFormHash(); if (formhash == null) { console.log("获取账号formhash失败"); popup.open("获取账号formhash失败", "alert"); return; } if (utils.getFormatTime("HH:mm") == "23:57") { // 倒计时开启 console.log("开启倒计时自动签到"); let intervalId = setInterval(() => { let current_time = utils.getFormatTime("HH:mm:ss"); if (utils.getFormatTime("hh:mm") == "00:00") { signIn(formhash); clearInterval(intervalId); } else { popup.open(`倒计时: ${current_time}`, "alert"); } }, 1000); return; } if (GM_getValue("mt_sign") == parseInt(utils.getFormatTime("yyyyMMdd"))) { return; } else { signIn(formhash); } } function searchHistory() { // 搜索历史 if (GM_getValue("v19") && location.href.match(mt_config.rexp.search_url)) { function search_event() { // 搜索历史事件 //搜索界面增加关闭按钮事件,清空input内容 //点击搜索保存搜索记录 $jq("#scform_submit").click(function () { let getsearchtext = $jq("#scform_srchtxt").val(); if ((getsearchtext != null) && (getsearchtext != "")) { let search_history_array = new Array(getsearchtext); let has_history = GM_getValue("search_history"); if (has_history != null) { if ($jq.inArray(getsearchtext, has_history) != -1) { console.log("已有该搜索历史记录") search_history_array = has_history } else { console.log("无该记录,追加"); search_history_array = search_history_array.concat(has_history); } } else { console.log("空记录,添加") } GM_setValue("search_history", search_history_array); } }) } function add_search_history() { //搜索界面添加搜索历史记录 $jq("#scform_srchtxt").attr("list", "search_history"); var search_history_list = GM_getValue("search_history"); var dom_datalist = document.createElement("datalist"); dom_datalist.id = "search_history"; var option_text = ""; if (search_history_list) { for (var i = 0; i < search_history_list.length; i++) { option_text = option_text + '
  • 今日最先
  • `)[0]); let getMaxPage = (urlextra) => { return new Promise(res => { GM_xmlhttpRequest({ url: "https://bbs.binmt.cc/k_misign-sign.html?operation=" + urlextra, async: false, responseType: 'html', headers: { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53" }, onload: function (resp) { let last_page = $jq(resp.responseText).find("#J_list_detail .pg span"); if (last_page.length && typeof last_page[0].title != "undefined") { let last_page_match = last_page[0].title.match(/([0-9]+)/); if (last_page_match.length == 2) { res(last_page_match[last_page_match.length - 1]); } else { popup.open("获取页失败", "alert"); res(0); } } else { popup.open("请求最先签到的页失败", "alert"); res(0); } }, onerror: function (resp) { console.log(resp); popup.open("网络异常,请重新获取", "alert"); res(0); } }) }) } let getPagePeople = (page) => { return new Promise(res => { GM_xmlhttpRequest({ url: "https://bbs.binmt.cc/k_misign-sign.html?operation=list&op=&page=" + page, async: false, responseType: 'html', headers: { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53" }, onload: function (resp) { let peoples = $jq(resp.responseText).find("#J_list_detail tbody tr"); let ret_array = []; if (peoples.length == 2 && peoples[0].textContent.indexOf("暂无内容") != -1) { res(ret_array); return; } for (let i = 1; i <= peoples.length - 2; i++) { let people = peoples[i]; let ret_json = {}; let user_name = people.children[0].getElementsByTagName("a")[0].textContent; let space_url = people.children[0].getElementsByTagName("a")[0].href; let uid = space_url.match(/space-uid-([0-9]*)/)[1]; let sign_all_days = people.children[1].textContent; let sign_month_days = people.children[2].textContent; let sign_time = people.children[3].textContent; let sign_reward = people.children[5].textContent; ret_json["user"] = user_name; ret_json["uid"] = uid; ret_json["avatar"] = "https://avatar-bbs.mt2.cn/uc_server/avatar.php?uid=" + uid + "&size=small"; ret_json["days"] = sign_all_days; ret_json["monthDays"] = sign_month_days; ret_json["time"] = sign_time; ret_json["reward"] = sign_reward; ret_array = ret_array.concat(ret_json); } res(ret_array) }, onerror: function (resp) { console.log(resp); res({}); } }) }) } function changeRankList(data, listtype) { $jq("#ranklist").html(data); $jq('#ranklist').attr('listtype', listtype); } ajaxlist = async (listtype) => { listtype = listtype; if (listtype == 'today') { loadingdelay = false; urlextra = 'list&op=today'; } else if (listtype == 'month') { loadingdelay = false; urlextra = 'list&op=month'; } else if (listtype == 'zong') { loadingdelay = false; urlextra = 'list&op=zong'; } else if (listtype == 'calendar') { loadingdelay = true; urlextra = 'calendar'; } else { loadingdelay = false; urlextra = 'list'; } //alert(loadingdelay); if (listtype == 'todayLatest') { loadingdelay = false; urlextra = 'list&op=&page=0'; let maxPage = await getMaxPage(urlextra); if (maxPage == 0) { return }; let latestPeople = await getPagePeople(maxPage); latestPeople.reverse(); if (latestPeople.length < 10) { let latestPeople_2 = await getPagePeople(maxPage - 1); latestPeople_2.reverse(); latestPeople = latestPeople.concat(latestPeople_2); latestPeople.reverse(); } let peopleHTML = ''; latestPeople.reverse(); console.log(latestPeople); latestPeople.forEach(people => { peopleHTML = peopleHTML + `

    ` + people["user"] + `` + people["time"] + `总天数 ` + people["days"] + `天

    月天数 ` + people["monthDays"] + ` 天 , 上次奖励 ` + people["reward"] + `

    ` }) let latestHTML = `
  • ` + peopleHTML + `
    ` changeRankList(latestHTML, listtype) } else { $jq.ajax({ type: 'GET', url: "plugin.php?id=k_misign:sign&operation=" + urlextra, async: false, dataType: 'html', success: function (data) { // console.log(data); data = data.replace(`今日排行`, `今日排行
  • 今日最先
  • `); changeRankList(data, listtype); }, complete: function (XHR, TS) { XHR = null } }); } } } } const blackHome = { showBlackHomeView: async () => { // 显示小黑屋界面 if (typeof $jq.NZ_MsgBox == "undefined") { popup.open("加载NZMsgBox.js中", "alert"); await GM_asyncLoadScriptNode("https://greasyfork.org/scripts/449562-nzmsgbox/code/NZMsgBox.js"); if (typeof $jq.NZ_MsgBox == "undefined") { popup.open("网络异常,加载NZMsgBox.js失败", "alert"); return; } else { console.log("成功加载NZMsgBox.js"); } } $jq.NZ_MsgBox.alert({ title: "小黑屋名单", content: "获取中", type: "", location: "center", buttons: { confirm: { text: "确定" } } }); let blacklistret = await blackHome.getBlackList(''); if (blacklistret == null) { $jq(".msgcon").html("获取小黑屋名单失败,请重新获取"); return }; let blacklist = window.eval('(' + blacklistret + ')'); let blackContent = ''; function sortByProperTyName(data, propertyname) { let _list_ = []; console.log(data); $jq.each(data, function (index, value) { let date = value["dateline"].match(/([0-9]{4}-[0-9]{1,2}-[0-9]{1,2}[\s]*[0-9]{1,2}:[0-9]{1,2})/g); if (date == null) { _list_ = _list_.concat(value); return } else { date = date[0] }; date = date.substring(0, 19); date = date.replace(/-/g, '/'); let timestamp = new Date(date).getTime(); value["time"] = timestamp; _list_ = _list_.concat(value); }); function compareDesc(propertyName) { return function (object1, object2) { var value1 = object1[propertyName]; var value2 = object2[propertyName]; if (value2 < value1) { return -1; } else if (value2 > value1) { return 1; } else { return 0; } } } _list_.sort(compareDesc("time")); return _list_; } let newBlacklist = sortByProperTyName(blacklist["data"], "time"); $jq.each(newBlacklist, function (index, value) { let blackreson = (value["reason"] == "") ? "无" : value["reason"]; blackContent = blackContent + `

    操作时间: ` + value["dateline"] + `

    操作行为: ` + value["action"] + `

    过期时间: ` + value["groupexpiry"] + `

    操作人员: ` + value["operator"] + `

    操作理由: ` + blackreson + `
    `; // console.log(value); }) let mainBlackContent = '' + blackContent + "
    "; $jq(".msgcon").html(mainBlackContent); $jq(".NZ-MsgBox-alert.NZ-MsgBox--motion").css("top", "100px"); $jq(".msgcon").css("height", "400px"); }, insertMobileBlackHomeButton: async function () { // 插入手机版查看小黑屋的按钮 if ((window.location.href.match(mt_config.rexp.bbs) != null) && (GM_getValue("v30"))) { let comiis_left_Touch = document.createElement("li"); comiis_left_Touch.className = "comiis_left_Touch"; let black_home_ele = document.createElement("a"); black_home_ele.setAttribute("href", "javascript:;"); black_home_ele.className = "blacklist"; black_home_ele.innerHTML = `
    小黑屋
    `; GM_addStyle(` .NZ-MsgBox-alert .msgcontainer .msgtitle { text-align: center !important; } #autolist .k_misign_lu img { width: 40px; height: 40px; -moz-border-radius: 20px; -webkit-border-radius: 20px; border-radius: 20px; } .k_misign_lc .f_c{ margin: 5px 0px; }`) black_home_ele.onclick = () => { blackHome.showBlackHomeView(); } // Array.from(document.querySelectorAll(".comiis_myinfo_list.bg_f.cl")).forEach((ele) => { // if (ele.innerText.match(/消息提醒|资料设置|我的积分|我的勋章|我的道具/)) { // ele.append(black_home_ele); // return; // } // }) comiis_left_Touch.append(black_home_ele); $jq(".comiis_sidenv_box .sidenv_li .comiis_left_Touch.bdew").append(comiis_left_Touch); } }, getBlackList: async (cid) => { // 获取黑名单列表 return new Promise(res => { GM_xmlhttpRequest({ url: "https://bbs.binmt.cc/forum.php?mod=misc&action=showdarkroom&cid=" + cid + "&t=&ajaxdata=json", timeout: 5000, method: "GET", async: false, headers: { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53", }, onload: (r) => { res(r.responseText); }, onerror: (r) => { console.log(r); popup.open("网络异常,请重新获取", "alert"); res(); } }) }) } } const quickUBB = { code: { "rainbow1": { "key": "转普通彩虹", "value": "", "isFunc": true, "num": 1 }, "rainbow2": { "key": "转黑白彩虹", "value": "", "isFunc": true, "num": 2 }, "rainbow3": { "key": "转黑红彩虹", "value": "", "isFunc": true, "num": 3 }, "rainbow4": { "key": "转蓝绿彩虹", "value": "", "isFunc": true, "num": 4 }, "size": { "key": "size", "value": "[size=][/size]", "tagL": "=", "tagR": "]", "L": "[size=]", "R": "[/size]", "cursorL": "[size=", "cursorLength": 6, "quickUBBReplace": "[size=14]replace[/size]" }, "color": { "key": "color", "value": "[color=][/color]", "tagL": "=", "tagR": "]", "L": "[color=]", "R": "[/color]", "cursorL": "[color=", "cursorLength": 7, "quickUBBReplace": "[color=#000]replace[/color]" }, "b": { "key": "加粗", "value": "[b][/b]", "tagL": "]", "tagR": "[", "L": "[b]", "R": "[/b]", "cursorR": "[/b]", "cursorLength": 4, "quickUBBReplace": "[b]replace[/b]" }, "u": { "key": "下划线", "value": "[u][/u]", "tagL": "]", "tagR": "[", "L": "[u]", "R": "[/u]", "cursorR": "[/u]", "cursorLength": 4, "quickUBBReplace": "[u]replace[/u]" }, "i": { "key": "倾斜", "value": "[i][/i]", "tagL": "]", "tagR": "[", "L": "[i]", "R": "[/i]", "cursorR": "[/i]", "cursorLength": 4, "quickUBBReplace": "[i]replace[/i]" }, "s": { "key": "中划线", "value": "[s][/s]", "tagL": "]", "tagR": "[", "L": "[s]", "R": "[/s]", "cursorR": "[/s]", "cursorLength": 4, "quickUBBReplace": "[s]replace[/s]" }, "lineFeed": { "key": "换行", "value": "[*]", "L": "", "R": "[*]", "cursorL": "[*]", "cursorLength": 3, "quickUBBReplace": "replace[*]" }, "longHorizontalLine": { "key": "长横线", "value": "[hr]", "L": "", "R": "[hr]", "cursorL": "[hr]", "cursorLength": 4, "quickUBBReplace": "replace[hr]" }, "link": { "key": "链接", "value": "[url=][/url]", "tagL": "=", "tagR": "]", "L": "[url=]", "R": "[/url]", "cursorL": "[url=", "cursorLength": 5, "quickUBBReplace": "[url=replace]replace[/url]" }, "hide": { "key": "隐藏", "value": "[hide][/hide]", "tagL": "]", "tagR": "[", "L": "[hide]", "R": "[/hide]", "cursorR": "[/hide]", "cursorLength": 7, "quickUBBReplace": "[hide]replace[/hide]" }, "quote": { "key": "引用", "value": "[quote][/quote]", "tagL": "]", "tagR": "[", "L": "[quote]", "R": "[/quote]", "cursorR": "[/quote]", "cursorLength": 8, "quickUBBReplace": "[quote]replace[/quote]" } }, insertQuickReplyUBB: () => { // 快捷回复 if (GM_getValue("v31") && (window.location.href.match(mt_config.rexp.forum_post) != null)) { quickUBB.jqueryExtraFunction(); $jq(".comiis_post_ico .comiis_pictitle").after($jq(`插入`)); $jq(".comiis_post_ico.comiis_minipost_icot.f_c.cl").on("click", "a", (e) => { $jq("#comiis_post_tab div.bg_f").hide() e.currentTarget.style.display = ""; if (e.currentTarget.className != "comiis_pictitle") { e.currentTarget.style.display = "block"; } }) let message_ele = $jq("#needmessage"); let fastpostsubmitline_ele = $jq("#fastpostsubmitline"); if (message_ele && fastpostsubmitline_ele) { $jq("#comiis_post_tab").append($jq(` `)); $jq.each(quickUBB.code, function (index, value) { let ubbs = $jq(`
  • ${value["key"]}
  • `); ubbs.on("click", (e) => { $jq.each($jq("#comiis_post_tab div.comiis_post_urlico ul li.quickUBBs a.comiis_xifont"), (i, v) => { v.className = "comiis_xifont f_d"; if (v == e.target) { v.className = "comiis_xifont f_0"; } }); let userInput = prompt(`请输入需要${value["key"]}的文字`); if (userInput == null || userInput.trim() == "") { return; } if (value["isFunc"]) { comiis_addsmilies(quickUBB.set_rainbow(value["num"], userInput)); // 插入贴内 } else if (value["quickUBBReplace"]) { comiis_addsmilies(value["quickUBBReplace"].replaceAll("replace", userInput)); // 插入贴内 } else { comiis_addsmilies(userInput); // 插入贴内 } // // if (value["isFunc"]) { // userInput = quickUBB.set_rainbow(value["num"], userInput); // } }) $jq("#comiis_post_tab div.comiis_post_urlico ul").append(ubbs[0]); }) } else { console.log("未找到快捷回复框"); } } }, insertReplayUBB: () => { // 具体回复 if (!GM_getValue("v35")) { console.log("v35未开启"); return; } if (!window.location.href.match(mt_config.rexp.reply_forum) && !window.location.href.match(mt_config.rexp.edit_forum) ) { return; } let insertDOM = $jq(".comiis_post_urlico"); if (!insertDOM) { console.log("未找到插入元素"); return; } let parentEle = $jq(".comiis_post_urlico > ul")[0]; let contentEle = $jq("#comiis_post_qydiv > ul"); let childNums = $jq("#comiis_post_qydiv ul li").length; quickUBB.jqueryExtraFunction(); $jq.each(quickUBB.code, function (key, value) { let ubbs = $jq(`
  • ${value["key"]}
  • `); ubbs.on("click", (e) => { let bottomEle = $jq(`#comiis_post_qydiv li[data-key='${value.key}']`); if (!bottomEle.length) { console.log("未找到该元素"); return } let contentIndex = childNums + Object.keys(quickUBB.code).indexOf(key); $jq("#comiis_post_qydiv ul li").hide().eq(contentIndex).fadeIn(); $jq.each($jq("#comiis_post_tab div.comiis_post_urlico ul li a.comiis_xifont"), (i, v) => { v.className = "comiis_xifont f_d"; if (v == e.target) { v.className = "comiis_xifont f_0"; } }); }) parentEle.append(ubbs[0]); let ubbs_content = document.createElement("li"); ubbs_content.setAttribute("style", "display: none;"); ubbs_content.setAttribute("data-key", value["key"]); ubbs_content.innerHTML = `
    `; contentEle.append(ubbs_content); $jq(`.comiis_sendbtn[data-keyI="${key}"]`).on("click", () => { let text = $jq(`#comiis_input_${key}`).val(); if (text == '') { popup.open('请输入需要插入的内容', 'alert'); return; } if (quickUBB.code[key]["isFunc"]) { text = quickUBB.set_rainbow(quickUBB.code[key]["num"], text); } if (quickUBB.code[key].hasOwnProperty("L")) { text = quickUBB.code[key]['L'] + text + quickUBB.code[key]['R']; } $jq("#needmessage").insertAtCaret(text); // if (quickUBB.code[key]["tagL"] != undefined || quickUBB.code[key]["tagR"] != undefined) { // $jq("#needmessage").moveCursorInCenterByText(quickUBB.code[key]["tagL"], quickUBB.code[key]["tagR"]); // } if (quickUBB.code[key].hasOwnProperty("cursorL")) { $jq("#needmessage").moveCursorToCenterByTextWithLeft(quickUBB.code[key]["cursorL"], quickUBB.code[key]["cursorLength"]); } if (quickUBB.code[key].hasOwnProperty("cursorR")) { $jq("#needmessage").moveCursorToCenterByTextWithRight(quickUBB.code[key]["cursorR"], quickUBB.code[key]["cursorLength"]); } }) }); }, set_rainbow: (num, text) => { if (text == "") { return ''; } var wr_text = text; var wr_code, wr_rgb, r, g, b, i, j, istep var wr_rgb1, wr_rgb2, r1, g1, b1, r2, g2, b2 r1 = g1 = b1 = r2 = g2 = b2 = 0; r = 0; g = 0; b = 0; istep = 0; wr_code = ''; if (num == 1) { istep = 40; r = 255; i = 1; j = 0; do { if (wr_text.charCodeAt(j) != 32) { if (g + istep < 256) { if (i == 1) g += istep; } else if (i == 1) { i = 2; g = 255; } if (r - istep > -1) { if (i == 2) r -= istep; } else if (i == 2) { i = 3; r = 0; } if (b + istep < 256) { if (i == 3) b += istep; } else if (i == 3) { i = 4; b = 255; } if (g - istep > -1) { if (i == 4) g -= istep; } else if (i == 4) { i = 5; g = 0; } if (r + istep < 256) { if (i == 5) r += istep; } else if (i == 5) { i = 6; r = 255; } if (b - istep > -1) { if (i == 6) b -= istep; } else if (i == 6) { i = 1; b = 0; } wr_rgb = ''; wr_rgb += parseInt(r).toString(16).length == 1 ? 0 + parseInt(r).toString(16) : parseInt(r).toString(16); wr_rgb += parseInt(g).toString(16).length == 1 ? 0 + parseInt(g).toString(16) : parseInt(g).toString(16); wr_rgb += parseInt(b).toString(16).length == 1 ? 0 + parseInt(b).toString(16) : parseInt(b).toString(16); wr_rgb = wr_rgb.toUpperCase(); wr_code += '[color=#' + wr_rgb + ']' + wr_text.charAt(j) + '[/color]'; } else { wr_code += wr_text.charAt(j); } j++; } while (j < wr_text.length); } else if (num == 2) { istep = 255 / wr_text.length; for (i = 1; i < wr_text.length + 1; i++) { if (wr_text.charCodeAt(i - 1) != 32) { r += istep; g += istep; b += istep; if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; wr_rgb = ''; wr_rgb += parseInt(r).toString(16).length == 1 ? 0 + parseInt(r).toString(16) : parseInt(r).toString(16); wr_rgb += parseInt(g).toString(16).length == 1 ? 0 + parseInt(g).toString(16) : parseInt(g).toString(16); wr_rgb += parseInt(b).toString(16).length == 1 ? 0 + parseInt(b).toString(16) : parseInt(b).toString(16); wr_rgb = wr_rgb.toUpperCase(); wr_code += '[color=#' + wr_rgb + ']' + wr_text.charAt(i - 1) + '[/color]'; } else { wr_code += wr_text.charAt(i - 1); } } } else if (num == 3) { istep = 255 / wr_text.length; for (i = 1; i < wr_text.length + 1; i++) { if (wr_text.charCodeAt(i - 1) != 32) { r += istep; g = 29; b = 36; if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; wr_rgb = ''; wr_rgb += parseInt(r).toString(16).length == 1 ? 0 + parseInt(r).toString(16) : parseInt(r).toString(16); wr_rgb += parseInt(g).toString(16).length == 1 ? 0 + parseInt(g).toString(16) : parseInt(g).toString(16); wr_rgb += parseInt(b).toString(16).length == 1 ? 0 + parseInt(b).toString(16) : parseInt(b).toString(16); wr_rgb = wr_rgb.toUpperCase(); wr_code += '[color=#' + wr_rgb + ']' + wr_text.charAt(i - 1) + '[/color]'; } else { wr_code += wr_text.charAt(i - 1); } } } else if (num == 4) { istep = 255 / wr_text.length; for (i = 1; i < wr_text.length + 1; i++) { if (wr_text.charCodeAt(i - 1) != 32) { r = 0; g = 174; b += istep; if (r > 255) r = 255; if (g > 255) g = 255; if (b > 255) b = 255; wr_rgb = ''; wr_rgb += parseInt(r).toString(16).length == 1 ? 0 + parseInt(r).toString(16) : parseInt(r).toString(16); wr_rgb += parseInt(g).toString(16).length == 1 ? 0 + parseInt(g).toString(16) : parseInt(g).toString(16); wr_rgb += parseInt(255 - b).toString(16).length == 1 ? 0 + parseInt(255 - b).toString(16) : parseInt(255 - b).toString(16); wr_rgb = wr_rgb.toUpperCase(); wr_code += '[color=#' + wr_rgb + ']' + wr_text.charAt(i - 1) + '[/color]'; } else { wr_code += wr_text.charAt(i - 1); } } } return wr_code; }, jqueryExtraFunction: () => { $jq.fn.extend({ insertAtCaret: function (myValue) { var $t = $jq(this)[0]; if (document.selection) { this.focus(); var sel = document.selection.createRange(); sel.text = myValue; this.focus(); } else if ($t.selectionStart || $t.selectionStart == '0') { var startPos = $t.selectionStart; var endPos = $t.selectionEnd; var scrollTop = $t.scrollTop; $t.value = $t.value.substring(0, startPos) + myValue + $t.value.substring(endPos, $t.value.length); this.focus(); $t.selectionStart = startPos + myValue.length; $t.selectionEnd = startPos + myValue.length; $t.scrollTop = scrollTop; } else { this.value += myValue; this.focus(); } }, selectRange: function (start, end) { if (end === undefined) { end = start; } return this.each(function () { if ('selectionStart' in this) { this.selectionStart = start; this.selectionEnd = end; } else if (this.setSelectionRange) { this.setSelectionRange(start, end); } else if (this.createTextRange) { var range = this.createTextRange(); range.collapse(true); range.moveEnd('character', end); range.moveStart('character', start); range.select(); } }); }, getCursorPosition: function () { var el = $jq(this)[0]; var pos = 0; if ('selectionStart' in el) { pos = el.selectionStart; } else if ('selection' in document) { el.focus(); var Sel = document.selection.createRange(); var SelLength = document.selection.createRange().text.length; Sel.moveStart('character', -el.value.length); pos = Sel.text.length - SelLength; } return pos; }, moveCursorInCenterByText: function (leftTextFlag, rightTextFlag) { var el = $jq(this)[0]; var el_text = el.value; for (let i = el.selectionStart - 1; i > 0; i--) { let LText = el_text[i - 1]; let currentText = el_text[i]; if (LText == leftTextFlag && currentText == rightTextFlag) { this.selectRange(i); break; } } }, moveCursorToCenterByTextWithLeft: function (leftMatchText, _length_) { var el = $jq(this)[0]; var el_text = el.value; for (let i = el.selectionStart - 1; i > 0; i--) { let lTexts = el_text.substring(i - _length_, i); if (lTexts == leftMatchText) { this.selectRange(i); break; } } }, moveCursorToCenterByTextWithRight: function (rightMatchText, _length_) { var el = $jq(this)[0]; var el_text = el.value; for (let i = el.selectionStart - 1; i > 0; i--) { let rTexts = el_text.substring(i, i + _length_); if (rTexts == rightMatchText) { this.selectRange(i + _length_); break; } } } }); } } function blacklistShieldUsersOrBlocks() { // 黑名单-屏蔽用户或板块 if (location.href.match(mt_config.rexp.home_space_url) == null) { return } var white_space_ele = document.createElement("div"); var black_list_ele = document.createElement("div"); white_space_ele.className = "styli_h cl"; black_list_ele.setAttribute("id", "blacklistallmain"); black_list_ele.className = "comiis_myinfo_list bg_f cl"; black_list_ele.innerHTML = `
  • 保存
  • `; GM_addStyle(` #blacklistallmain{ height: 232px; } #blacklistallmain li.comiis_styli{ height: 180px; } #blacklistallmain #blacklistuid{ width: 90%; resize: none; opacity: 0.7; height: 70% !important; line-height: inherit; -webkit-appearance: none; border: none !important; font-size: 14px; vertical-align: middle; background-color: transparent; border-bottom: 3px solid #efefef !important; } #blacklistallmain #blacklistplate{ width: 90%; resize: none; opacity: 0.7; height: 30% !important; line-height: inherit; -webkit-appearance: none; border: none !important; font-size: 14px; vertical-align: middle; background-color: transparent; } #blacklistsave{ text-align: center; background: transparent !important; border-color: transparent !important; } `); let mt_commis_menu = document.getElementsByClassName("comiis_myinfo cl")[0]; mt_commis_menu.appendChild(white_space_ele); mt_commis_menu.appendChild(black_list_ele); mt_commis_menu.appendChild(white_space_ele); document.getElementById("blacklistuid").textContent = GM_getValue("blacklistuid") ? GM_getValue("blacklistuid") : ""; document.getElementById("blacklistplate").textContent = GM_getValue("blacklistplate") ? GM_getValue("blacklistplate") : ""; document.getElementById("blacklistsave").onclick = () => { let blackListUIDValue = document.getElementById("blacklistuid").value; let blackListPlateValue = document.getElementById("blacklistplate").value; GM_setValue("blacklistuid", blackListUIDValue); GM_setValue("blacklistplate", blackListPlateValue); popup.open("保存成功", "alert"); // iosOverlay({ // text: "保存成功", // duration: 2000, // icon: "https://www.helloimg.com/images/2022/05/24/ZoDS05.png" // }); } } function identifyLinks() { // 识别链接 if (!GM_getValue("v2")) { return } /*TEXT link to Clickable Hyperlink*/ var clearLink, excludedTags, filter, linkMixInit, linkPack, linkify, observePage, observer, setLink, url_regexp, xpath; url_regexp = /((https?:\/\/|www\.)[\x21-\x7e]+[\w\/]|(\w[\w._-]+\.(com|cn|org|net|info|tv|cc))(\/[\x21-\x7e]*[\w\/])?|ed2k:\/\/[\x21-\x7e]+\|\/|thunder:\/\/[\x21-\x7e]+=)/gi; clearLink = function (a) { var b; a = null != (b = a.originalTarget) ? b : a.target; if (null != a && "a" === a.localName && -1 !== a.className.indexOf("texttolink") && (b = a.getAttribute("href"), 0 !== b.indexOf("http") && 0 !== b.indexOf("ed2k://") && 0 !== b.indexOf("thunder://"))) return a.setAttribute("href", "http://" + b) }; document.addEventListener("mouseover", clearLink); setLink = function (a) { // Uncaught TypeError: a.parentNode.className.indexOf is not a function if (typeof a != "object") { return } // 看不得报错,增加判断 if (null != a && -1 === a.parentNode.className.indexOf("texttolink") && "#cdata-section" !== a.nodeName) { var b = a.textContent.replace(url_regexp, '$1'); if (a.textContent.length !== b.length) { var c = document.createElement("span"); c.innerHTML = b; console.log(`识别: ${c.querySelector("a")}`); return a.parentNode.replaceChild(c, a) } } }; excludedTags = "a svg canvas applet input button area pre embed frame frameset head iframe img option map meta noscript object script style textarea code".split(" "); xpath = "//text()[not(ancestor::" + excludedTags.join(") and not(ancestor::") + ")]"; filter = new RegExp("^(" + excludedTags.join("|") + ")$", "i"); linkPack = function (a, b) { var c, d; if (b + 1E4 < a.snapshotLength) { var e = c = b; for (d = b + 1E4; b <= d ? c <= d : c >= d; e = b <= d ? ++c : --c) setLink(a.snapshotItem(e)); setTimeout(function () { return linkPack(a, b + 1E4) }, 15) } else for (e = c = b, d = a.snapshotLength; b <= d ? c <= d : c >= d; e = b <= d ? ++c : --c) setLink(a.snapshotItem(e)) }; linkify = function (a) { a = document.evaluate(xpath, a, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); return linkPack(a, 0) }; observePage = function (a) { for (a = document.createTreeWalker(a, NodeFilter.SHOW_TEXT, { acceptNode: function (a) { if (!filter.test(a.parentNode.localName)) return NodeFilter.FILTER_ACCEPT } }, !1); a.nextNode();) setLink(a.currentNode) }; observer = new window.MutationObserver(function (a) { var b, c; var d = 0; for (b = a.length; d < b; d++) { var e = a[d]; if ("childList" === e.type) { var g = e.addedNodes; var f = 0; for (c = g.length; f < c; f++) e = g[f], observePage(e) } } }); linkMixInit = function () { // if (window === window.top && "" !== window.document.title) return linkify(document.body), observer.observe(document.body, { // childList: !0, // subtree: !0 // }) // 修改为可在iframe内执行 return linkify(document.body), observer.observe(document.body, { childList: !0, subtree: !0 }) }; var clearlinkF = function (a) { var url = a.getAttribute("href"); if (0 !== url.indexOf("http") && 0 !== url.indexOf("ed2k://") && 0 !== url.indexOf("thunder://")) return a.setAttribute("href", "http://" + url) }, clearlinkE = function () { for (var a = document.getElementsByClassName("texttolink"), b = 0; b < a.length; b++) clearlinkF(a[b]) }; setTimeout(clearlinkE, 1500); setTimeout(linkMixInit, 100); } function detectUserOnlineStatus() { // 探测用户在线状态 if (window.location.href.match(mt_config.rexp.forum_post_pc)) { var quanju = []; var cishu = 0; for (var sss = document.getElementsByClassName("pls favatar"), ll = 0; ll < sss.length; ll++) { var sendmessage = sss[ll].getElementsByClassName("comiis_o cl") if (sendmessage.length == 0) {} else { var sendmessageurl = sendmessage[0].getElementsByTagName('a')[1].href; let xhr = new XMLHttpRequest(); xhr.open("GET", sendmessageurl, false); xhr.onreadystatechange = function () { if (xhr.readyState == 4) { let pattern = /正在.*]/g; let str = xhr.responseText; let newstr = str.match(pattern)[0]; quanju.push(newstr); } } xhr.send(); let offLineStaus = quanju[cishu].match('离线') ? true : false; cishu = cishu + 1; var onlineStatusImage = document.createElement('img'); onlineStatusImage.src = offLineStaus ? 'https://cdn-bbs.mt2.cn/static/image/smiley/doge/54.png' : 'https://cdn-bbs.mt2.cn/static/image/smiley/doge/35.png'; onlineStatusImage.smilied = offLineStaus ? '1353' : '1384'; onlineStatusImage.border = "0"; onlineStatusImage.style = 'float:right'; sss[ll].insertAdjacentElement('afterbegin', onlineStatusImage); } } } } function commentsAddReviews() { // 评论区添加点评功能 if (GM_getValue("v6") && location.href.match(mt_config.rexp.forum_post)) { var hongbao = document.getElementsByClassName("bottom_zhan y"); if (hongbao.length == 0) {} else { var cishu2 = 0; var replyhref = hongbao[cishu2].getElementsByTagName('a')[0].href; var page = replyhref.match(mt_config.rexp.forum_post_page)[1]; //console.log(page); for (cishu2 = 0; cishu2 < hongbao.length; cishu2++) { if (hongbao[cishu2].children.length == 1) { var rewardhref = hongbao[cishu2].getElementsByTagName('a')[0].href.replace('mod=post&', 'mod=misc&'); rewardhref = rewardhref.replace("action=reply&", "action=comment&"); var reviews_href = rewardhref + '&extra=page%3D1&page=' + page; let reviews_pid = hongbao[cishu2].parentElement.parentElement.id.replace("pid", "&pid="); reviews_href = reviews_href + reviews_pid; //console.log(rewardhref) var oa = document.createElement('a'); var ob = document.createElement('i'); var lm = document.getElementsByClassName("bottom_zhan y")[cishu2]; oa.href = reviews_href; oa.className = "f_c dialog"; ob.style = "content: url(https://s1.ax1x.com/2020/04/26/Jcq8VU.png);height: 15px;"; ob.className = "comiis_font mt_review"; ob.innerHTML = ""; oa.appendChild(ob); let review_username = hongbao[cishu2].parentElement.parentElement.getElementsByClassName("top_user f_b")[0].text; oa.onclick = function () { let click_time = Date.now(); var mt_interval = setInterval(function () { let run_time = parseInt((Date.now() - click_time) / 1000); if (run_time >= 5) { console.log("超时"); clearInterval(mt_interval); } else if (document.querySelector("div[id=ntcmsg_popmenu]>div>span.f_c") != null) { console.log("存在,清理定时器"); console.log("点评用户:", review_username); console.log("该对象出现用时:", run_time); try { document.querySelector("div[id=ntcmsg_popmenu]>div>span.f_c").innerText = "点评 " + review_username; } catch (err) { console.log("修改点评失败", err); } clearInterval(mt_interval); } }, 100) } lm.insertAdjacentElement('afterBegin', oa); } else { console.log("已有点评按钮,无需再次添加"); } } } } } function modifyForumPostFontColor() { // 移除评论区字体效果 if (GM_getValue("v3") && location.href.match(mt_config.rexp.forum_post)) { var hide = document.getElementsByTagName('font'); var postForumMain = document.querySelector(".comiis_ordertype") ? document.querySelector(".comiis_postlist.kqide .comiis_postli")[0].innerHTML : ''; var i = 0; for (i = 0; i < hide.length; i++) { if (postForumMain.indexOf(hide[i].innerHTML) == -1) { hide[i].removeAttribute('color'); hide[i].removeAttribute('style'); hide[i].removeAttribute('size'); } } var content = document.getElementsByClassName("comiis_message bg_f view_all cl message"); var rule = /|<\/font>|||||align=".*?"/g; var j = 0, k = 1; for (j = 0; j < content.length; j++ & k++) { if (postForumMain.indexOf(content[j].innerHTML) == -1) { content[j].innerHTML = content[j].innerHTML.replace(rule, ''); } } } } function collectionForumPost() { // 悬浮按钮-添加收藏帖子功能 var own_formhash = document.querySelector("#scform > input[type=hidden]:nth-child(1)").value; var collect_href_id = window.location.href.match(mt_config.rexp.forum_post_pc_page)[1]; var collect_href = 'https:\/\/bbs.binmt.cc\/home.php?mod=spacecp&ac=favorite&type=thread&id=' + collect_href_id + '&formhash=' + own_formhash; var new_collect = document.createElement('span'); var old_Suspended = document.getElementById("scrolltop"); new_collect.innerHTML = '<\/a>'; old_Suspended.insertAdjacentElement('afterBegin', new_collect); } function quickReply() { //快捷回复 document.querySelector("#scrolltop > span:nth-child(2) > a").onclick = function () { showWindow('reply', this.href); var a = document.querySelector("#postsubmit"); setTimeout( 'document.querySelector("#moreconf").innerHTML=document.querySelector("#moreconf").innerHTML+\' `, app: true, success: async (x) => { let localDataUser = lanzou.storage.getUser(); let localDataPwd = lanzou.storage.getPwd(); if (localDataUser != "" && localDataPwd != "") { x.xtipdiv.querySelector(".xinput.xful[type='text']").value = localDataUser; x.xtipdiv.querySelector(".xinput.xful[type='password']").value = localDataPwd; } x.xtipdiv.querySelector(".xbutton.xful.xblue").onclick = async () => { let inputUser = x.xtipdiv.querySelector(".xinput.xful[type='text']").value.trim(); let inputPwd = x.xtipdiv.querySelector(".xinput.xful[type='password']").value.trim(); if (inputUser != "" && inputPwd != "") { let _formhash_ = await lanzou.login_getFormHash(inputUser, inputPwd); xtip.msg("登录中请稍后..."); console.log(_formhash_); if (_formhash_ == 4) { console.log("已登录"); lanzou.storage.setUser(inputUser); lanzou.storage.setPwd(inputPwd); if (lanzou.storage.getFormhash() == null) { console.log("未知原因,已登录但本地未保存formhash,建立临时值"); lanzou.storage.setFormhash(_formhash_); } xtip.close(x.mainid); showView(); return; }; if (_formhash_ == null) { return; }; let loginStatus = await lanzou.login(inputUser, inputPwd, _formhash_); if (loginStatus) { console.log("登录成功"); console.log(inputUser, inputPwd, _formhash_); lanzou.storage.setUser(inputUser); lanzou.storage.setPwd(inputPwd); lanzou.storage.setFormhash(_formhash_); xtip.close(x.mainid); showView(); } } else { xtip.msg('账号或密码不能为空'); } } } }); } async function showLanZouView(user, pwd) { lanZouViewShowLock = false; let sheet = null; let _formhash_ = lanzou.storage.getFormhash(); let loginStatus = await lanzou.login(user, pwd, _formhash_); if (!loginStatus) { xtip.msg("登录过期"); lanzou.storage.delFormhash(); showLoginView(); return; } sheet = xtip.sheet({ btn: [`欢迎! ${user}`, '上传', '查看历史上传'] }); $jq("#lanzouuploadfilebtn").off("change").change(async (e) => { let lanzouChooseFile = e.currentTarget.files[0]; console.log(lanzouChooseFile); let uploadFileInfo = await lanzou.uploadFile(lanzouChooseFile); if (uploadFileInfo) { let tempData = lanzou.storage.getUploadFiles(); tempData = tempData.concat(uploadFileInfo); GM_setClipboard(`${uploadFileInfo["is_newd"]}/${uploadFileInfo["f_id"]}`); xtip.msg("已复制到剪贴板"); console.log(tempData); lanzou.storage.setUploadFiles(tempData); } }) let anyTouchNode = new AnyTouch(document.getElementById(sheet)); anyTouchNode.on("tap", (e) => { if (document.getElementById(sheet).querySelector(".xtiper_bg").outerHTML.indexOf(e.target.outerHTML) != -1) { // 点击背景不关闭小窗 return; } if (document.querySelectorAll(".xtiper_sheet_ul.xtiper_sheet_center .xtiper_sheet_li")[0].outerHTML.indexOf(e.target.outerHTML) != -1) { // 用户 xtip.confirm('确定退出登录吗?', { btn1: async function () { let logoutStatus = await lanzou.outLogin(lanzou.storage.getUser()); if (logoutStatus) { xtip.msg("退出登录成功"); lanzou.storage.delFormhash(); anyTouchNode.off("tap"); xtip.close(sheet); lanZouViewShowLock = false; } else { xtip.msg("退出登录失败"); } } }); return; } if (document.querySelectorAll(".xtiper_sheet_ul.xtiper_sheet_center .xtiper_sheet_li")[1].outerHTML.indexOf(e.target.outerHTML) != -1) { //上传 $jq("#lanzouuploadfilebtn").val(""); $jq("#lanzouuploadfilebtn").click(); return; } if (document.querySelectorAll(".xtiper_sheet_ul.xtiper_sheet_center .xtiper_sheet_li")[2].outerHTML.indexOf(e.target.outerHTML) != -1) { //查看历史上传 anyTouchNode.off("tap"); xtip.close(sheet); showUploadFiles(); return; } if (document.querySelectorAll(".xtiper_sheet_ul.xtiper_sheet_center .xtiper_sheet_li")[3].outerHTML.indexOf(e.target.outerHTML) != -1) { //取消 anyTouchNode.off("tap"); xtip.close(sheet); lanZouViewShowLock = false; return; } }) } async function showView() { let user = lanzou.storage.getUser(); let pwd = lanzou.storage.getPwd(); let formhash = lanzou.storage.getFormhash(); if (user == "" || pwd == "" || formhash == null) { showLoginView(); } else { showLanZouView(user, pwd); } } function insertBtn() { let comiis_left_Touch = document.createElement("li"); comiis_left_Touch.className = "comiis_left_Touch"; let ANode = document.createElement("a"); ANode.setAttribute("href", "javascript:;"); ANode.className = "blacklist"; ANode.innerHTML = `
    蓝奏云
    `; ANode.onclick = () => { if (!lanZouViewShowLock) { showView(); lanZouViewShowLock = true; } else { console.log("重复点击"); } } comiis_left_Touch.append(ANode); $jq(".comiis_sidenv_box .sidenv_li .comiis_left_Touch.bdew").append(comiis_left_Touch); } insertBtn(); } function previewPostForum() { // 发帖、回复、编辑预览功能 if (!GM_getValue("v48") || !window.location.href.match(mt_config.rexp.post_forum) && !window.location.href.match(mt_config.rexp.edit_forum) && !window.location.href.match(mt_config.rexp.reply_forum) ) { return }; GM_addStyle(` #comiis_mh_sub{ height:40px; } .gm_plugin_previewpostforum svg{ }`); $jq("#comiis_mh_sub .swiper-wrapper.comiis_post_ico").append($jq(`预览`)); $jq("#comiis_post_tab").append($jq(` `)); const smiliesDictionaries = { //表情字典 "[呵呵]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq001.gif", "[撇嘴]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq002.gif", "[色]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq003.gif", "[发呆]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq004.gif", "[得意]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq005.gif", "[流泪]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq006.gif", "[害羞]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq007.gif", "[闭嘴]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq008.gif", "[睡]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq009.gif", "[大哭]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq010.gif", "[尴尬]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq011.gif", "[发怒]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq012.gif", "[调皮]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq013.gif", "[呲牙]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq014.gif", "[惊讶]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq015.gif", "[难过]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq016.gif", "[酷]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq017.gif", "[冷汗]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq018.gif", "[抓狂]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq019.gif", "[吐]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq020.gif", "[偷笑]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq021.gif", "[可爱]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq022.gif", "[白眼]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq023.gif", "[傲慢]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq024.gif", "[饥饿]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq025.gif", "[困]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq026.gif", "[惊恐]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq027.gif", "[流汗]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq028.gif", "[憨笑]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq029.gif", "[装逼]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq030.gif", "[奋斗]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq031.gif", "[咒骂]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq032.gif", "[疑问]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq033.gif", "[嘘]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq034.gif", "[晕]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq035.gif", "[折磨]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq036.gif", "[衰]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq037.gif", "[骷髅]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq038.gif", "[敲打]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq039.gif", "[再见]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq040.gif", "[擦汗]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq041.gif", "[抠鼻]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq042.gif", "[鼓掌]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq043.gif", "[糗大了]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq044.gif", "[坏笑]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq045.gif", "[左哼哼]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq046.gif", "[右哼哼]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq047.gif", "[哈欠]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq048.gif", "[鄙视]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq049.gif", "[委屈]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq050.gif", "[快哭了]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq051.gif", "[阴脸]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq052.gif", "[亲亲]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq053.gif", "[吓]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq054.gif", "[可怜]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq055.gif", "[眨眼睛]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq056.gif", "[笑哭]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq057.gif", "[dogeQQ]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq058.gif", "[泪奔]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq059.gif", "[无奈]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq060.gif", "[托腮]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq061.gif", "[卖萌]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq062.png", "[斜眼笑]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq063.gif", "[喷血]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq064.gif", "[惊喜]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq065.gif", "[骚扰]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq066.gif", "[小纠结]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq067.gif", "[我最美]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq068.gif", "[菜刀]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq069.gif", "[西瓜]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq070.gif", "[啤酒]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq071.gif", "[篮球]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq072.gif", "[乒乓]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq073.gif", "[咖啡]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq074.gif", "[饭]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq075.gif", "[猪]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq076.gif", "[玫瑰]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq077.gif", "[凋谢]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq078.gif", "[示爱]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq079.gif", "[爱心]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq080.gif", "[心碎]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq081.gif", "[蛋糕]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq082.gif", "[闪电]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq083.gif", "[炸弹]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq084.gif", "[刀]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq085.gif", "[足球]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq086.gif", "[瓢虫]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq087.gif", "[便便]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq088.gif", "[月亮]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq089.gif", "[太阳]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq090.gif", "[礼物]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq091.gif", "[抱抱]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq092.gif", "[喝彩]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq93.gif", "[祈祷]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq94.gif", "[棒棒糖]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq95.gif", "[药]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq96.gif", "[赞]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq097.gif", "[差劲]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq098.gif", "[握手]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq099.gif", "[胜利]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq100.gif", "[抱拳]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq101.gif", "[勾引]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq102.gif", "[拳头]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq103.gif", "[差劲]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq104.gif", "[爱你]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq105.gif", "[NO]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq106.gif", "[OK]": "https://cdn-bbs.mt2.cn/static/image/smiley/qq/qq107.gif", "[#呵呵]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_1.png", "[#滑稽]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_10.png", "[#吐舌]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_3.png", "[#哈哈]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_2.png", "[#啊]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_23.png", "[#酷]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_22.png", "[#怒]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_13.png", "[#开心]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_39.png", "[#汗]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_14.png", "[#泪]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_16.png", "[#黑线]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_15.png", "[#鄙视]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_21.png", "[#不高兴]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_12.png", "[#真棒]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_17.png", "[#钱]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_40.png", "[#疑问]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_26.png", "[#阴险]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_20.png", "[#吐]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_34.png", "[#咦]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_41.png", "[#委屈]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_29.png", "[#花心]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_6.png", "[#呼~]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_42.png", "[#激动]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_5.png", "[#冷]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_43.png", "[#可爱]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_4.png", "[#What?]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_25.png", "[#勉强]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_38.png", "[#狂汗]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_24.png", "[#酸爽]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_27.png", "[#乖]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_8.png", "[#雅美蝶]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_28.png", "[#睡觉]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_31.png", "[#惊哭]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_19.png", "[#哼]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_44.png", "[#笑尿]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_32.png", "[#惊讶]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_30.png", "[#小乖]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_7.png", "[#喷]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_18.png", "[#抠鼻]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_33.png", "[#捂嘴笑]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_9.png", "[#你懂的]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_11.png", "[#犀利]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_35.png", "[#小红脸]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_36.png", "[#懒得理]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_37.png", "[#爱心]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_45.png", "[#心碎]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_46.png", "[#玫瑰]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_47.png", "[#礼物]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_48.png", "[#彩虹]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_49.png", "[#太阳]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_50.png", "[#月亮]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_51.png", "[#钱币]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_52.png", "[#咖啡]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_53.png", "[#蛋糕]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_54.png", "[#大拇指]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_55.png", "[#胜利]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_56.png", "[#爱你]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_57.png", "[#OK]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_58.png", "[#弱]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_59.png", "[#沙发]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_60.png", "[#纸巾]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_61.png", "[#香蕉]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_62.png", "[#便便]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_63.png", "[#药丸]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_64.png", "[#红领巾]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_65.png", "[#蜡烛]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_66.png", "[#三道杠]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_67.png", "[#音乐]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_68.png", "[#灯泡]": "https://cdn-bbs.mt2.cn/static/image/smiley/comiis_tb/tb_69.png", "[doge]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/1.png", "[doge思考]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/2.png", "[doge再见]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/3.png", "[doge生气]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/4.png", "[doge气哭]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/5.png", "[doge笑哭]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/7.png", "[doge调皮]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/6.png", "[doge啊哈]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/8.png", "[doge原谅TA]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/9.png", "[miao]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/10.png", "[miao思考]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/11.png", "[miao拜拜]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/12.png", "[miao生气]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/13.png", "[miao气哭]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/14.png", "[二哈]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/15.png", "[摊手]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/19.png", "[w并不简单]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/20.png", "[w滑稽]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/21.png", "[w色]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/22.png", "[w爱你]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/23.png", "[w拜拜]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/24.png", "[w悲伤]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/25.png", "[w鄙视]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/26.png", "[w馋嘴]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/27.png", "[w冷汗]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/28.png", "[w打哈欠]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/29.png", "[w打脸]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/30.png", "[w敲打]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/31.png", "[w生病]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/32.png", "[w闭嘴]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/33.png", "[w鼓掌]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/34.png", "[w哈哈]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/35.png", "[w害羞]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/36.png", "[w呵呵]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/37.png", "[w黑线]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/38.png", "[w哼哼]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/39.png", "[w调皮]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/40.png", "[w可爱]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/41.png", "[w可怜]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/42.png", "[w酷]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/43.png", "[w困]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/44.png", "[w懒得理你]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/45.png", "[w流泪]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/46.png", "[w怒]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/47.png", "[w怒骂]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/48.png", "[w钱]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/49.png", "[w亲亲]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/50.png", "[w傻眼]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/51.png", "[w便秘]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/52.png", "[w失望]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/53.png", "[w衰]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/54.png", "[w睡觉]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/55.png", "[w思考]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/56.png", "[w开心]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/57.png", "[w色舔]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/58.png", "[w偷笑]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/59.png", "[w吐]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/60.png", "[w抠鼻]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/61.png", "[w委屈]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/62.png", "[w笑哭]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/63.png", "[w嘻嘻]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/64.png", "[w嘘]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/65.png", "[w阴险]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/66.png", "[w疑问]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/67.png", "[w抓狂]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/70.png", "[w晕]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/69.png", "[w右哼哼]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/68.png", "[w左哼哼]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/71.png", "[w肥皂]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/77.png", "[w奥特曼]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/78.png", "[w草泥马]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/79.png", "[w兔子]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/80.png", "[w熊猫]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/81.png", "[w猪头]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/82.png", "[w→_→]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/83.png", "[w给力]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/84.png", "[w囧]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/85.png", "[w萌]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/86.png", "[w神马]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/87.png", "[w威武]": "https://cdn-bbs.mt2.cn/static/image/smiley/doge/88.png", } function clickEvent(e) { // 预览按钮点击事件 $jq(".gm_plugin_previewpostforum_html").css("display", "block"); let replaecdText = replaceText($jq("#needmessage").val()); $jq(".gm_plugin_previewpostforum_html .comiis_message_table")[0].innerHTML = replaecdText; }; function replaceText(text) { // 替换内容 let attachimgmatch = text.match(/\[attachimg\]([\s\S]+?)\[\/attachimg\]/g); if (attachimgmatch) { attachimgmatch.forEach(item => { let aimgidMatch = item.match(/\[attachimg\]([\s\S]+?)\[\/attachimg\]/); let aimg_id = aimgidMatch ? aimgidMatch[aimgidMatch.length - 1] : ""; let imgtitle = $jq(`#aimg_${aimg_id}`).attr("title"); let imgsrc = $jq(`#aimg_${aimg_id}`).attr("src"); if (!imgsrc) { imgtitle = "该图片不存在"; } text = text.replace(item, `${imgtitle}`); }); } let code = text.match(/\[code\]([\s\S]*?)\[\/code\]/g); if (code) { code.forEach(item => { let match_content = item.match(/\[code\]([\s\S]*?)\[\/code\]/); let contentAll = match_content ? match_content[match_content.length - 1] : ""; let content = ""; let brSplit = contentAll.split("\n"); if (brSplit.length == 1) { content = "
  • " + contentAll + "
  • "; } else { Array.from(brSplit).forEach((item, index) => { if (index == brSplit.length - 1) { content = `${content}
  • ${item}
  • `; } else { content = `${content}
  • ${item}
  • `; } }) } text = text.replace(item, `
      ${content}
    `); }); } let url = text.match(/\[url\=[\s\S]*?\]([\s\S]*?)\[\/url\]/g); if (url) { url.forEach(item => { let urlMatch = item.match(/\[url=([\s\S]*?)\][\s\S]*\[\/url\]/); let urlNameMatch = item.match(/\[url=[\s\S]*?\]([\s\S]*?)\[\/url\]/); let _url_ = urlMatch ? urlMatch[urlMatch.length - 1] : ""; let _url_name_ = urlNameMatch ? urlNameMatch[urlNameMatch.length - 1] : ""; text = text.replace(item, `${_url_name_}`); }); } let color = text.match(/\[color\=[\s\S]*?\]([\s\S]*?)\[\/color\]/g); if (color) { color.forEach(item => { let colorValueMatch = item.match(/\[color=([\s\S]*?)\][\s\S]*\[\/color\]/); let colorTextMatch = item.match(/\[color=[\s\S]*?\]([\s\S]*?)\[\/color\]/); let colorValue = colorValueMatch ? colorValueMatch[colorValueMatch.length - 1] : ""; let colorText = colorTextMatch ? colorTextMatch[colorTextMatch.length - 1] : ""; text = text.replace(item, `${colorText}`); }); } let size = text.match(/\[size\=[\s\S]*?\]([\s\S]*?)\[\/size\]/g); if (size) { console.log(size); size.forEach(item => { let sizeValueMatch = item.match(/\[size=([\s\S]*?)\][\s\S]*\[\/size\]/); let sizeTextMatch = item.match(/\[size=[\s\S]*?\]([\s\S]*?)\[\/size\]/); let sizeValue = sizeValueMatch ? sizeValueMatch[sizeValueMatch.length - 1] : ""; let sizeText = sizeTextMatch ? sizeTextMatch[sizeTextMatch.length - 1] : ""; text = text.replace(item, `${sizeText}`); }); } let img = text.match(/\[img\]([\s\S]*?)\[\/img\]/g); if (img) { img.forEach(item => { let match_content = item.match(/\[img\]([\s\S]*?)\[\/img\]/); let content = match_content ? match_content[match_content.length - 1] : ""; text = text.replace(item, ``); }); } let hide = text.match(/\[hide\]([\s\S]*?)\[\/hide\]/g); if (hide) { hide.forEach(item => { let match_content = item.match(/\[hide\]([\s\S]*?)\[\/hide\]/); let content = match_content ? match_content[match_content.length - 1] : ""; text = text.replace(item, `

    本帖隐藏的内容:

    ${content}
    `); }); } let quote = text.match(/\[quote\]([\s\S]*?)\[\/quote\]/g); if (quote) { quote.forEach(item => { let match_content = item.match(/\[quote\]([\s\S]*?)\[\/quote\]/); let content = match_content ? match_content[match_content.length - 1] : ""; text = text.replace(item, `
    回复 ${content}
    `); }); } let free = text.match(/\[free\]([\s\S]*?)\[\/free\]/g); if (free) { free.forEach(item => { let match_content = item.match(/\[free\]([\s\S]*?)\[\/free\]/); let content = match_content ? match_content[match_content.length - 1] : ""; text = text.replace(item, `
    ${content}
    `); }); } let strong = text.match(/\[b\]([\s\S]*?)\[\/b\]/g); if (strong) { strong.forEach(item => { let match_content = item.match(/\[b\]([\s\S]*?)\[\/b\]/i); let content = match_content ? match_content[match_content.length - 1] : ""; text = text.replace(item, `${content}`); }); } let xhx = text.match(/\[u\]([\s\S]*?)\[\/u\]/g); if (xhx) { xhx.forEach(item => { let match_content = item.match(/\[u\]([\s\S]*?)\[\/u\]/); let content = match_content ? match_content[match_content.length - 1] : ""; text = text.replace(item, `${content}`); }); } let qx = text.match(/\[i\]([\s\S]*?)\[\/i\]/g); if (qx) { qx.forEach(item => { let match_content = item.match(/\[i\]([\s\S]*?)\[\/i\]/); let content = match_content ? match_content[match_content.length - 1] : ""; text = text.replace(item, `${content}`); }); } let strike = text.match(/\[s\]([\s\S]*?)\[\/s\]/g); if (strike) { strike.forEach(item => { let match_content = item.match(/\[s\]([\s\S]*?)\[\/s\]/); let content = match_content ? match_content[match_content.length - 1] : ""; text = text.replace(item, `${content}`); }); } let smilies = text.match(/\[([\s\S]+?)\]/g); if (smilies) { smilies.forEach(item => { console.log(item); let smiliesMatchSrc = smiliesDictionaries[item]; if (smiliesMatchSrc) { text = text.replace(item, ``); } }); } text = text.replace(/\[hr\]/g, '
    '); text = text.replace(/\[\*\]/g, '
  • '); text = text.replace(/\n/g, "
    "); return text; } function keyUpEvent(e) { // 内容输入事件 let userInputText = e.target.value; let replaecdText = replaceText(userInputText); $jq(".gm_plugin_previewpostforum_html .comiis_message_table")[0].innerHTML = replaecdText; }; $jq(document).on("propertychange input", "#needmessage", keyUpEvent); $jq(".gm_plugin_previewpostforum").on("click", clickEvent); } function userCheckBoxSettings() { // 设置的html function checkboxNode() { return $jq(".whitesevcheckbox"); } function selectedNodeText() { let selectedVal = selectNode().val(); return $jq(`.beauty-select option[value='${selectedVal}']`).text(); } function selectNode() { return $jq(".beauty-select"); } function setCodeNodeCheckedStatus(status) { // 设置 开关的状态 if (status) { checkboxNode().removeClass("comiis_checkbox_close"); } else { checkboxNode().addClass("comiis_checkbox_close"); } } function setLastClickItem() { //初始化设置上次点击的select内容 let selectNodeNormalVal = GM_getValue("last") == null ? "v2" : GM_getValue("last"); selectNode().val(selectNodeNormalVal); setCodeNodeCheckedStatus(GM_getValue(selectNodeNormalVal) != null ? true : false); } function setSelectNodeChangeEvent() { // 设置选项的change事件 selectNode().change(function () { let selected_value = $jq('.beauty-select').val(); GM_setValue("last", selected_value); let check_value = GM_getValue(selected_value) != null ? true : false; setCodeNodeCheckedStatus(check_value); }); } function setCodeNodeClickEvent() { // 设置开关的click事件 checkboxNode().on("click", (e) => { let selected_value = selectNode().val(); let check_value = GM_getValue(selected_value) != null ? false : true; if (check_value) { GM_setValue(selected_value, true); } else { GM_deleteValue(selected_value); } // let showText = check_value ? `${selectedNodeText()}开启` : `${selectedNodeText()}关闭`; // iosOverlay({ // text: showText, // duration: 1500, // icon: "https://www.helloimg.com/images/2022/05/24/ZoDS05.png" // }); let showText = check_value ? '设置-开启' : '设置-关闭'; popup.open(showText, "alert"); setCodeNodeCheckedStatus(check_value); }) } function setSelectNodeCSS() { GM_addStyle(` .beauty-select{ background-color: #fff; height:28px; width: 160px; line-height:28px; border: 1px solid #ececec; background: url(w.png) no-repeat; background-position: 95% 50%; -webkit-appearance: none; /*去掉样式 for chrome*/ appearance:none;/*去掉样式*/ -moz-appearance:none;/*去掉样式*/ }`); } if (window.location.href.match(mt_config.rexp.bbs)) { var setting_content = document.createElement("li"); setting_content.className = "comiis_left_Touch"; setting_content.innerHTML = '