福利吧论坛好孩子看得见

好孩子才看得见,支持移动端

Versão de: 28/01/2020. Veja: a última versão.

// ==UserScript==
// @name                福利吧论坛好孩子看得见
// @name:zh-CN          福利吧论坛 - 好孩子看得见
// @name:zh-TW          福利吧論壇 - 好孩子看得見
// @namespace           https://greasyfork.org/zh-CN/users/193133-pana
// @homepage            https://www.sailboatweb.com
// @version             7.4.6
// @description         好孩子才看得见,支持移动端
// @description:zh-CN   好孩子才看得见,论坛小助手
// @description:zh-TW   好孩子才看得見,論壇小助手
// @author              pana
// @include             http*://www.wnflb19.com/*
// @include             http*://www.wnflb66.com/*
// @exclude             http*://*/member.php?mod=register
// @require             https://cdn.bootcss.com/crypto-js/3.1.9-1/core.min.js
// @require             https://cdn.bootcss.com/crypto-js/3.1.9-1/enc-base64.min.js
// @require             https://cdnjs.cloudflare.com/ajax/libs/arrive/2.4.1/arrive.min.js
// @connect             pan.baidu.com
// @connect             keyfc.net
// @connect             search.pandown.cn
// @connect             www.kutv8.com
// @grant               GM_info
// @grant               GM_setClipboard
// @grant               GM_getValue
// @grant               GM_setValue
// @grant               GM_registerMenuCommand
// @grant               GM_xmlhttpRequest
// @grant               GM_addStyle
// ==/UserScript==

(function() {
	'use strict';
	const SETTING_VALUE = {
		WRAP_DIV: ['settingWrapDiv', 'userStyleConBGC'],
		MAIN_FIELDSET: ['mainFieldset', ''],
		HEADLINE_LEGEND: ['headlineLegend', ''],
		HEADLINE_LINK: ['headlineLink', '好孩子看得见-设置 ver.' + GM_info.script.version, '脚本详细信息', 'https://greasyfork.org/zh-CN/scripts/381494'],
		FEEDBACK_LINK: ['feedbackLink', '反馈', '通过站内消息报告问题', 'https://www.wnflb66.com/home.php?mod=spacecp&ac=pm&op=showmsg&touid=8548'],
		TAG_UL: ['tagUl', ''],
		HIGHLIGHT_CHECKBOX: ['highlightCheckbox', '启用热帖高亮功能', '在帖子列表页面开启热帖高亮'],
		AGREE_NUMBER_TEXT: ['agreeNumberText', '--> 分享高亮的阈值: '],
		AGREE_NUMBER_INPUT: ['agreeNumberInput', '(推荐: 20)'],
		AGREE_COLOR_TEXT: ['agreeColorText', '--> 分享高亮的颜色: '],
		AGREE_COLOR_INPUT: ['agreeColorInput', '(推荐: #EE1B2E)'],
		AGREE_COLOR_EG: ['agreeColorEg', '颜色示例'],
		REPLY_NUMBER_TEXT: ['replyNumberText', '--> 回复高亮的阈值: '],
		REPLY_NUMBER_INPUT: ['replyNumberInput', '(推荐: 50)'],
		REPLY_COLOR_TEXT: ['replyColorText', '--> 回复高亮的颜色: '],
		REPLY_COLOR_INPUT: ['replyColorInput', '(推荐: #2B65B7)'],
		REPLY_COLOR_EG: ['replyColorEg', '颜色示例'],
		COPY_CHECKBOX: ['copyCheckbox', '显示复制按钮', '在提取到的链接后显示一个复制按钮'],
		TEXT_COLOR_TEXT: ['textColorText', '隐藏文字的高亮颜色: '],
		TEXT_COLOR_INPUT: ['textColorInput', '(推荐: #FF33CC)'],
		TEXT_COLOR_EG: ['textColorEg', '颜色示例'],
		LINK_COLOR_TEXT: ['linkColorText', '提取链接的文字颜色: '],
		LINK_COLOR_INPUT: ['linkColorInput', '(推荐: #369)'],
		LINK_COLOR_EG: ['linkColorEg', '颜色示例'],
		SAVE_BUTTON: ['saveButton', '保存', '保存设置'],
		CANCEL_BUTTON: ['cancelButton', '取消', '关闭设置'],
		FLOAT_CHECKBOX: ['floatCheckbox', '启用浮动模式', '将提取到的链接浮动于当前楼层的右侧'],
		EXTRACT_CHECKBOX: ['extractCheckbox', '识别并提取文字中的链接', '提取到的链接以空心圆标记'],
		PANDOWNLOAD_CHECKBOX: ['pandownloadCheckbox', '显示跳转到 PanDownload 网页版的按钮', '在提取到的百度云链接后显示一个跳转按钮'],
		QUERY_CHECKBOX: ['queryCheckbox', '开启自动查询百度网盘提取码', '自动查询百度网盘提取码并填充'],
		CODE_CHECKBOX: ['codeCheckbox', '显示编码解码工具图标', '在网页的右上角显示一个工具图标'],
		BT_CHECKBOX: ['btCheckbox', '显示磁力链接搜索工具图标', '在网页的右上角显示一个工具图标'],
		CLICK_CHECKBOX: ['clickCheckbox', '自动点击张国立', '进入帖子后自动点击张国立'],
		CHECK_CHECKBOX: ['checkCheckbox', '自动检测百度云链接是否失效', '标记失效的百度云链接'],
		NIGHT_CHECKBOX: ['nightCheckbox', '显示切换夜间模式的按钮', '在网页顶部显示夜间模式切换按钮']
	};
	const TOOL_VALUE = {
		WRAP_DIV: ['toolWrapDiv', 'userStyleConBGC'],
		MAIN_FIELDSET: ['toolMainFieldest', ''],
		HEADLINE_LEGEND: ['toolHeadlineLegend', '编码、解码工具'],
		LEFT_BAR: ['leftBar', ''],
		LEFT_TITLE: ['leftTitle', '内容:'],
		LEFT_TEXTAREA: ['leftTextarea', '(请输入内容)'],
		OPERATE_BAR: ['operateBar', ''],
		RIGHT_BAR: ['rightBar', ''],
		RIGHT_TITLE: ['rightTitle', '结果:'],
		RIGHT_TEXTAREA: ['rightTextarea', '(此处显示结果)'],
		COPY_BUTTON: ['toolCopyButton', '复制结果', '复制右侧方框中的内容'],
		CLOSE_BUTTON: ['toolCloseButton', '关闭', '关闭工具界面'],
		BJX_ENCODE: ['BJXEncode', '百家姓 编码 >>> ', '使用"百家姓"进行编码'],
		BJX_DECODE: ['BJXDecode', '解码 百家姓 >>> ', '对"百家姓"的编码进行解码'],
		JZG_ENCODE: ['JZGEncode', '价值观 编码 >>> ', '使用"社会主义核心价值观"进行编码'],
		JZG_DECODE: ['JZGDecode', '解码 价值观 >>> ', '对"社会主义核心价值观"的编码进行解码'],
		YFLC_ENCODE: ['YFLCEncode', '与佛论禅 编码 >>> ', '使用"与佛论禅"进行编码'],
		YFLC_DECODE: ['YFLCDecode', '解码 与佛论禅 >>> ', '对"与佛论禅"的编码进行解码'],
		BASE64_ENCODE: ['BASE64Encode', 'BASE64 编码 >>> ', '使用"BASE64"进行编码'],
		BASE64_DECODE: ['BASE64Decode', '解码 BASE64 >>> ', '对"BASE64"的编码进行解码'],
		BAIDU_QUERY: ['BAIDUQuery', '查询提取码 >>> ', '查询百度网盘的提取码'],
		STATUS_BAR: ['toolStatusBar', '等待操作中...'],
	};
	const BT_VALUE = {
		WRAP_DIV: ['btWrapDiv', 'userStyleConBGC'],
		MAIN_FIELDSET: ['btMainFieldset', ''],
		HEADLINE_LEGEND: ['btHeadlineLegend', ''],
		HEADLINE_LINK: ['btHeadlineLink', '磁力链接搜索工具', '源站地址', 'https://www.kutv8.com'],
		TOP_BAR: ['btTopBar', ''],
		SEARCH_INPUT: ['btSearchInput', '(请输入内容)'],
		SEARCH_BUTTON: ['btSearchButton', '搜索', '搜索磁力链接'],
		MIDDLE_BAR: ['btMiddleBar', ''],
		TABLE_HEADER_DIV: ['btTableHeaderDiv', ''],
		TABLE_HEADER: ['btTableHeader', ''],
		TH: ['btTh_', ''],
		TABLE_BODY_DIV: ['btTableBodyDiv', ''],
		TABLE_BODY: ['btTableBody', ''],
		TBODY: ['btTbody', ''],
		BOTTOM_BAR: ['btBottomBar', ''],
		STATUS_BAR: ['btStatusBar', '等待操作中...', '搜索中,请等候...', '搜索完成!'],
		CLOSE_BUTTON: ['btCloseButton', '关闭', '关闭工具界面'],
		PAGE_TEXT: ['btPageText', '当前页数: '],
		PREV_PAGE_BUTTON: ['btPrevPageButton', '上一页'],
		NEXT_PAGE_BUTTON: ['btNextPageButton', '下一页'],
	};
	const TOOL_ICON = {
		CLASS_NAME: 'codeTool userStyleIcon',
		TITLE: '编码、解码工具',
		GRAY: 'url(data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjQ4cHgiIGhlaWdodD0iNDhweCIgdmlld0JveD0iMCAwIDI0IDI0IiBhcmlhLWxhYmVsbGVkYnk9InRvb2xJY29uVGl0bGUgdG9vbEljb25EZXNjIiBzdHJva2U9IiNCMkIyQjIiIHN0cm9rZS13aWR0aD0iMSIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLWxpbmVqb2luPSJtaXRlciIgZmlsbD0iI0IyQjJCMiIgY29sb3I9IiNCMkIyQjIiPiA8dGl0bGUgaWQ9InRvb2xJY29uVGl0bGUiPlRvb2w8L3RpdGxlPiA8ZGVzYyBpZD0idG9vbEljb25EZXNjIj5JY29uIG9mIGEgd3JlbmNoPC9kZXNjPiA8cGF0aCBkPSJNOS43NDI5MjkzOSwxMy43NDI5Mjk0IEM5LjE5MTM1MDE5LDEzLjkxMDEwODggOC42MDYxNzI3MSwxNCA4LDE0IEM0LjY4NjI5MTUsMTQgMiwxMS4zMTM3MDg1IDIsOCBDMiw3LjA3MzcwNjkzIDIuMjA5OTA0MzEsNi4xOTY0Mzk2NCAyLjU4NDc0MTk3LDUuNDEzMTY5MSBMNi45NDk3NDc0Nyw5Ljc3ODE3NDU5IEw5Ljc3ODE3NDU5LDYuOTQ5NzQ3NDcgTDUuNDEzMTY5MSwyLjU4NDc0MTk3IEM2LjE5NjQzOTY0LDIuMjA5OTA0MzEgNy4wNzM3MDY5MywyIDgsMiBDMTEuMzEzNzA4NSwyIDE0LDQuNjg2MjkxNSAxNCw4IEMxNCw4Ljg4MDQwNzcyIDEzLjgxMDM3NjUsOS43MTY1MjY0OCAxMy40Njk3NDI5LDEwLjQ2OTc0MjkgTDIwLjU4NTg2MzYsMTcuNTg1ODYzNiBDMjEuMzY2OTEyMiwxOC4zNjY5MTIyIDIxLjM2NjkxMjIsMTkuNjMzMjQyMiAyMC41ODU4NjM2LDIwLjQxNDI5MDcgTDE5LjkxNDI5MDcsMjEuMDg1ODYzNiBDMTkuMTMzMjQyMiwyMS44NjY5MTIyIDE3Ljg2NjkxMjIsMjEuODY2OTEyMiAxNy4wODU4NjM2LDIxLjA4NTg2MzYgTDkuNzQyOTI5MzksMTMuNzQyOTI5NCBaIi8+IDwvc3ZnPg==)',
		BLUE: 'url(data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjQ4cHgiIGhlaWdodD0iNDhweCIgdmlld0JveD0iMCAwIDI0IDI0IiBhcmlhLWxhYmVsbGVkYnk9InRvb2xJY29uVGl0bGUgdG9vbEljb25EZXNjIiBzdHJva2U9IiM3OUE0Q0YiIHN0cm9rZS13aWR0aD0iMSIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLWxpbmVqb2luPSJtaXRlciIgZmlsbD0iIzc5QTRDRiIgY29sb3I9IiM3OUE0Q0YiPiA8dGl0bGUgaWQ9InRvb2xJY29uVGl0bGUiPlRvb2w8L3RpdGxlPiA8ZGVzYyBpZD0idG9vbEljb25EZXNjIj5JY29uIG9mIGEgd3JlbmNoPC9kZXNjPiA8cGF0aCBkPSJNOS43NDI5MjkzOSwxMy43NDI5Mjk0IEM5LjE5MTM1MDE5LDEzLjkxMDEwODggOC42MDYxNzI3MSwxNCA4LDE0IEM0LjY4NjI5MTUsMTQgMiwxMS4zMTM3MDg1IDIsOCBDMiw3LjA3MzcwNjkzIDIuMjA5OTA0MzEsNi4xOTY0Mzk2NCAyLjU4NDc0MTk3LDUuNDEzMTY5MSBMNi45NDk3NDc0Nyw5Ljc3ODE3NDU5IEw5Ljc3ODE3NDU5LDYuOTQ5NzQ3NDcgTDUuNDEzMTY5MSwyLjU4NDc0MTk3IEM2LjE5NjQzOTY0LDIuMjA5OTA0MzEgNy4wNzM3MDY5MywyIDgsMiBDMTEuMzEzNzA4NSwyIDE0LDQuNjg2MjkxNSAxNCw4IEMxNCw4Ljg4MDQwNzcyIDEzLjgxMDM3NjUsOS43MTY1MjY0OCAxMy40Njk3NDI5LDEwLjQ2OTc0MjkgTDIwLjU4NTg2MzYsMTcuNTg1ODYzNiBDMjEuMzY2OTEyMiwxOC4zNjY5MTIyIDIxLjM2NjkxMjIsMTkuNjMzMjQyMiAyMC41ODU4NjM2LDIwLjQxNDI5MDcgTDE5LjkxNDI5MDcsMjEuMDg1ODYzNiBDMTkuMTMzMjQyMiwyMS44NjY5MTIyIDE3Ljg2NjkxMjIsMjEuODY2OTEyMiAxNy4wODU4NjM2LDIxLjA4NTg2MzYgTDkuNzQyOTI5MzksMTMuNzQyOTI5NCBaIi8+IDwvc3ZnPg==)'
	};
	const BT_ICON = {
		CLASS_NAME: 'btTool userStyleIcon',
		TITLE: '磁力链接搜索工具',
		GRAY: 'url(data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBhcmlhLWxhYmVsbGVkYnk9InNlYXJjaEljb25UaXRsZSIgc3Ryb2tlPSIjQjJCMkIyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS1saW5lam9pbj0ibWl0ZXIiIGZpbGw9Im5vbmUiIGNvbG9yPSIjQjJCMkIyIj4gPHRpdGxlIGlkPSJzZWFyY2hJY29uVGl0bGUiPlNlYXJjaDwvdGl0bGU+IDxwYXRoIGQ9Ik0xNC40MTIxMTIyLDE0LjQxMjExMjIgTDIwLDIwIi8+IDxjaXJjbGUgY3g9IjEwIiBjeT0iMTAiIHI9IjYiLz4gPC9zdmc+)',
		BLUE: 'url(data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBhcmlhLWxhYmVsbGVkYnk9InNlYXJjaEljb25UaXRsZSIgc3Ryb2tlPSIjNzlBNENGIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiIHN0cm9rZS1saW5lam9pbj0ibWl0ZXIiIGZpbGw9Im5vbmUiIGNvbG9yPSIjNzlBNENGIj4gPHRpdGxlIGlkPSJzZWFyY2hJY29uVGl0bGUiPlNlYXJjaDwvdGl0bGU+IDxwYXRoIGQ9Ik0xNC40MTIxMTIyLDE0LjQxMjExMjIgTDIwLDIwIi8+IDxjaXJjbGUgY3g9IjEwIiBjeT0iMTAiIHI9IjYiLz4gPC9zdmc+)'
	};
	const MODE_ICON = {
		NIGHT: 'url(data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDI0IDI0IiBhcmlhLWxhYmVsbGVkYnk9Im1vb25JY29uVGl0bGUiIHN0cm9rZT0iIzMzMyIgc3Ryb2tlLXdpZHRoPSIzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIGNvbG9yPSIjMzMzIj4gPHRpdGxlIGlkPSJtb29uSWNvblRpdGxlIj5Nb29uPC90aXRsZT4gPHBhdGggZD0iTTEwLjQyMzgzOSwzIEMxMC4xNDkwNDc0LDMuODA4MzcyODkgMTAsNC42NzQ4NjA5OSAxMCw1LjU3NjE2MDk4IEMxMCw5Ljk5NDQzODk4IDEzLjU4MTcyMiwxMy41NzYxNjEgMTgsMTMuNTc2MTYxIEMxOC45MDEzLDEzLjU3NjE2MSAxOS43Njc3ODgxLDEzLjQyNzExMzUgMjAuNTc2MTYxLDEzLjE1MjMyMiBDMTkuNTAzODkyMSwxNi4zMDY2ODc1IDE2LjUxNjk3OCwxOC41NzYxNjEgMTMsMTguNTc2MTYxIEM4LjU4MTcyMiwxOC41NzYxNjEgNSwxNC45OTQ0MzkgNSwxMC41NzYxNjEgQzUsNy4wNTkxODI5NyA3LjI2OTQ3MzQzLDQuMDcyMjY4ODkgMTAuNDIzODM5LDMgWiIvPiA8L3N2Zz4=)',
		DAY: 'url(data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDI0IDI0IiBhcmlhLWxhYmVsbGVkYnk9InN1bkljb25UaXRsZSIgc3Ryb2tlPSIjMzMzIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZmlsbD0ibm9uZSIgY29sb3I9IiMzMzMiPiA8dGl0bGUgaWQ9InN1bkljb25UaXRsZSI+U3VuPC90aXRsZT4gPGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iNCIvPiA8cGF0aCBkPSJNMTIgNUwxMiAzTTEyIDIxTDEyIDE5TTUgMTJMMiAxMiA1IDEyek0yMiAxMkwxOSAxMiAyMiAxMnpNMTYuOTQ5NzQ3NSA3LjA1MDI1MjUzTDE5LjA3MTA2NzggNC45Mjg5MzIxOSAxNi45NDk3NDc1IDcuMDUwMjUyNTN6TTQuOTI4OTMyMTkgMTkuMDcxMDY3OEw3LjA1MDI1MjUzIDE2Ljk0OTc0NzUgNC45Mjg5MzIxOSAxOS4wNzEwNjc4ek0xNi45NDk3NDc1IDE2Ljk0OTc0NzVMMTkuMDcxMDY3OCAxOS4wNzEwNjc4IDE2Ljk0OTc0NzUgMTYuOTQ5NzQ3NXpNNC45Mjg5MzIxOSA0LjkyODkzMjE5TDcuMDUwMjUyNTMgNy4wNTAyNTI1MyA0LjkyODkzMjE5IDQuOTI4OTMyMTl6Ii8+IDwvc3ZnPg==)'
	};
	const COLLAPSED_IMG = {
		YES: 'static/image/common/collapsed_yes.gif',
		NO: 'static/image/common/collapsed_no.gif'
	};
	const URL_REG = /^[\S\s]*?((?:magnet:\?xt=urn:btih:|ftp:\/\/|ed2k:\/\/|thunder:\/\/|flashget:\/\/|qqdl:\/\/|xfplay:\/\/|https?:\/\/[\w-]*\.*[\w-]+\.+\w+)\S+)/i;
	const DOWNLOAD_REG = /^[\S\s]*?((?:magnet:\?xt=urn:btih:|ed2k:\/\/|thunder:\/\/)\S+)/i;
	const WWW_REG = /^[\S\s]*?(www\.[\w-]+\.[a-z]+[\w#=%+?/-]*)/i;
	const BAIDUPAN_REG = /^https?:\/\/pan\.baidu\.com\/s(?:hare)?\/[\w=?&-]+$/i;
	const BAIDUPAN_INCLUDE_CODE_REG = /^https?:\/\/pan\.baidu\.com\/s(?:hare)?\/[\w=?#&-]+$/i;
	const CODE_REG = /(?:提取)+[^a-z0-9解压]*([a-z0-9]{4})[^a-z0-9]*/i;
	const BAIDUPAN_CODE_REG = /^(?:(?:下载)?链接\S+\s+)?(?:[^解压]+\s+)?[^a-z0-9解压]*([a-z0-9]{4})[^a-z0-9]*(?:app)?[^a-z0-9]*$/i;
	const SINGLE_CHAR_CODE_REG = /^[a-z0-9]$/i;
	const MISSING_HEADER_BAIDUPAN_REG = /^[\S\s]*?[^/\w-]?(\/?s(?:hare)?\/[\w=?-]{10,50})/i;
	const MISSING_HEADER_BAIDUPAN_TEST_REG = /^([\w=?-]{15,50})\s+[a-z0-9]{4}$/i;
	const PAN_REG = /^[\S\s]*?(pan\.baidu\.com\/s(?:hare)?\/[\w=?&-]+)/i;
	const HASH_REG = /(?:[^a-z0-9]|^)([a-z0-9]{40}|[a-z0-9]{32})(?:&dn=.*|[^a-z0-9]|$)/i;
	const MD5_REG = /(?:md5[^a-z0-9]+|sha1[^a-z0-9]+)/i;
	const CORE_VALUES_REG = /^.*?((?:富强|民主|文明|和谐|自由|平等|公正|法治|爱国|敬业|诚信|友善){10,}).*?$/i;
	const BAIJIA_REG = /^.*?([赵钱孙李周吴郑王冯陈褚卫蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜戚谢邹喻福水窦章云苏潘葛奚范彭郎鲁韦昌马苗凤花方俞任袁柳唐罗薛伍余米贝姚孟顾尹江钟]{10,}).*?$/i;
	const FOYU_REG = /^.*?((?:佛曰:|如是我闻:)\S{10,}).*?$/i;
	const PREFIX_LINK_REG = {
		MAGNET: /^https?:\/\/www\.wnflb\d*\.com\/magnet:\?xt=.*$/i,
		MAGNET_SWITCH: /^https?:\/\/www\.wnflb\d*\.com\//i,
	};
	const PREFIX_CODE_REG = {
		CODE: /^https?:\/\/www\.wnflb\d*\.com\/\w+-\w+$/i,
		CODE_SWITCH: /^https?:\/\/www\.wnflb\d*\.com\//i,
	};
	const BASE_IMAGE_REG = /^https?:\/\/(data:)/i;
	const FILTER_LINK_REG = {
		PAN_TEXT: /^https?:\/\/pan\.baidu\.com\/(?:s|share|mbox)?\/[\w#?%=/&-]*[^\w#?%=/&-]+/i,
		POJIE: /^https?:\/\/www\.52pojie\.cn\/?#?$/i,
		POJIE_PHP: /^https?:\/\/www\.52pojie\.cn\/(?:forum|home|misc)\.php\?/i,
		POJIE_HTML: /^https?:\/\/www\.52pojie\.cn\/(?:forum|thread)-\d+-\d+(?:-\d+)?\.html$/i,
		FULIBA: /^https?:\/\/www\.wnflb\d*\.com\/?$/i,
		FULIBA_PHP: /^https?:\/\/www\.wnflb\d*\.com\/(?:home|forum)\.php\?/i,
		FULIBA_HTML: /^https?:\/\/www\.wnflb\d*\.com\/(?:thread|forum)-\d+-\d+(?:-\d+)?\.html$/i,
		IMDB: /^https?:\/\/www\.imdb\.com\/title\//i,
		DOUBAN: /^https?:\/\/movie\.douban\.com\/(?:subject|celebrity)/i,
		PHOTO_WEIBO: /^https?:\/\/photo\.weibo\.com\//i,
		S_WEIBO: /^https?:\/\/s\.weibo\.com\/weibo\?q=/i,
		BAIKE: /^https?:\/\/baike\.(?:so|baidu|sogou)\.com/i,
		BILIBILI_APP: /^https?:\/\/app\.bilibili\.com/i,
		ZHIYOO: /^https?:\/\/bbs\.zhiyoo\.com\/(?:forum|gforum)-\d+-\d+\.html/i,
		TAG_3DM: /^https?:\/\/www\.3dmgame\.com\/tag\//i,
		GAMES_3DM: /^https?:\/\/www\.3dmgame\.com\/games\/[^/]*\/?$/i,
		TV432: /^https?:\/\/www\.tv432\.com\/search\.php\?searchword=/i,
		VIIDII: /^https?:\/\/www\.viidii\.info\/\?/i,
		DAYBOX: /^https?:\/\/www\.daybox\.net\/image\//i,
		YIDIANZIXUN: /^https?:\/\/www\.yidianzixun\.com\/channel\//i,
		SINA: /^https?:\/\/[\w-]*\.?sina\.com\.cn\/?/i,
	};
	const CORE_VALUES = '富强民主文明和谐自由平等公正法治爱国敬业诚信友善';
	const BAIJIA_VALUES = {
		"赵": "0",
		"钱": "1",
		"孙": "2",
		"李": "3",
		"周": "4",
		"吴": "5",
		"郑": "6",
		"王": "7",
		"冯": "8",
		"陈": "9",
		"褚": "a",
		"卫": "b",
		"蒋": "c",
		"沈": "d",
		"韩": "e",
		"杨": "f",
		"朱": "g",
		"秦": "h",
		"尤": "i",
		"许": "j",
		"何": "k",
		"吕": "l",
		"施": "m",
		"张": "n",
		"孔": "o",
		"曹": "p",
		"严": "q",
		"华": "r",
		"金": "s",
		"魏": "t",
		"陶": "u",
		"姜": "v",
		"戚": "w",
		"谢": "x",
		"邹": "y",
		"喻": "z",
		"福": "A",
		"水": "B",
		"窦": "C",
		"章": "D",
		"云": "E",
		"苏": "F",
		"潘": "G",
		"葛": "H",
		"奚": "I",
		"范": "J",
		"彭": "K",
		"郎": "L",
		"鲁": "M",
		"韦": "N",
		"昌": "O",
		"马": "P",
		"苗": "Q",
		"凤": "R",
		"花": "S",
		"方": "T",
		"俞": "U",
		"任": "V",
		"袁": "W",
		"柳": "X",
		"唐": "Y",
		"罗": "Z",
		"薛": ".",
		"伍": "-",
		"余": "_",
		"米": "+",
		"贝": "=",
		"姚": "/",
		"孟": "?",
		"顾": "#",
		"尹": "%",
		"江": "&",
		"钟": "*"
	};
	const CON_STYLE = '.userStyleIcon { background-color: #f4f4f4 !important; } .userStyleConBGC { background-color: #fff !important; }';
	const NIGHT_STYLE = "html, body, .bm, .bdl, .bdl dt, .bdl dd.bdl_a a, .tb .a a, .pn, .fl .bm_h, .ct2_a, .ct3_a { background: #282A36; } .bdl dl.a, .tl .th, .tl .ts th, .tl .ts td, .pg a, .pg strong, .pgb a, .pg label, .bml .bm_h, #scrolltop a, .bmn, .bm_h, td.pls, .ad td.plc, div.exfm, .tb a, .tb_h, .ttp li.a a, div.uo a, input#addsubmit_btn, #gh .bm .bm_h, .jump_bdl li, .newthread tr th, .newthread tr td, .tl .threadpre td, .tl .threadpre:hover td, .nfl .f_c { background-color: #282A36; } .userStyleIcon, .userStyleConBGC { background-color: #282A36 !important; } #nv, .card_gender_0, .card .o a, .tbn li.a, #p_btn a, #p_btn i { background: #40444D;} #toptb, .tedt .bar, .edt .bar, .edt .bbar, #post_extra_tb label.a, #extcreditmenu.a, #g_upmine.a, .tl #forumnewshow, .jump_bdl .a a, .jump_bdl .a a:hover, .psth, .pl .quote, .pm_tac, .pm .c, .pml .hover, #uhd, #flw_header .bar, .ttp a, .ttp strong, .bmw .bm_h, .GzList ul li a, .m_c, .m_c .o, .dt th { background-color: #40444D; } #nv li a:hover, #nv li.hover a, #nv li.hover a:hover { background: #1A1A1A; } .p_pop, .p_pof, .sllt, .tl #forumnewshow a:hover, #autopbn:hover, .pgbtn a:hover { background-color: #1A1A1A; } #threadlist > div > table > tbody > tr:hover > *, #threadlist > div > form > table > tbody > tr:not(.threadpre):hover > *, div.tl > form > table > tbody > tr:hover > * { background-color: #1A1A1A !important; } .p_pop a:hover { background: #3D3D3D; } a, #um, #um a, body, input, button, select, textarea, .xi2, .xi2 a, .pg a, .pg strong, .pgb a, .pg label, .jump_bdl a, div#forum_rules_37 font { color: #C0C0C0; } .tps a, .chart em { color: #666; } .GzList ul li a { color: #000 !important; } .tedt .pt, .px, .pt, .ps, select, input { background-color: #38383D; } .userStyleTextarea { background-color: #38383D; }";
	var highlight_config = {
		highlight_enable: true,
		agree_threshold: 20,
		agree_color: '#EE1B2E',
		reply_threshold: 50,
		reply_color: '#2B65B7',
		copy_enable: true,
		text_color: '#FF33CC',
		link_color: '#369',
		float_enable: false,
		extract_enable: false,
		pandownload_enable: false,
		query_enable: false,
		code_enable: false,
		bt_enable: false,
		click_enable: false,
		check_enable: false,
		night_btn_enable: false,
		night_enable: false,
		collapsed_fxzm_enable: false,
		collapsed_gwwz_enable: false
	};
	var check_date = '2000-1-1';
	var bt_page_num = 0;

	function rand_Bin() {
		return Math.random() >= 0.5
	}
	function str_2_Utf8(str) {
		let not_encoded = /[A-Za-z0-9\-_.!~*'()]/g;
		let str1 = str.replace(not_encoded, c => c.codePointAt(0).toString(16));
		let str2 = encodeURIComponent(str1);
		let concated = str2.replace(/%/g, '').toUpperCase();
		return concated
	}
	function hex_2_Duo(hexs) {
		let duo = [];
		for (let c of hexs) {
			let n = Number.parseInt(c, 16);
			if (n < 10) {
				duo.push(n)
			} else {
				if (rand_Bin()) {
					duo.push(10);
					duo.push(n - 10)
				} else {
					duo.push(11);
					duo.push(n - 6)
				}
			}
		}
		return duo
	}
	function utf8_2_Str(utfs) {
		let l = utfs.length;
		let splited = [];
		for (let i = 0; i < l; i++) {
			if ((i & 1) === 0) {
				splited.push('%')
			}
			splited.push(utfs[i])
		}
		return decodeURIComponent(splited.join(''))
	}
	function duo_2_Hex(duo) {
		let hex = [];
		let l = duo.length;
		let i = 0;
		while (i < l) {
			if (duo[i] < 10) {
				hex.push(duo[i])
			} else {
				if (duo[i] === 10) {
					i++;
					hex.push(duo[i] + 10)
				} else {
					i++;
					hex.push(duo[i] + 6)
				}
			}
			i++
		}
		return hex.map(v => v.toString(16).toUpperCase()).join('')
	}
	function duo_2_Values(duo) {
		return duo.map(d => CORE_VALUES[2 * d] + CORE_VALUES[2 * d + 1]).join('')
	}
	function values_Encode(str) {
		return duo_2_Values(hex_2_Duo(str_2_Utf8(str)))
	}
	function values_Decode(encoded) {
		let duo = [];
		for (let c of encoded) {
			let i = CORE_VALUES.indexOf(c);
			if (i === -1) {
				continue
			} else if (i & 1) {
				continue
			} else {
				duo.push(i >> 1)
			}
		}
		let hexs = duo_2_Hex(duo);
		let str;
		try {
			str = utf8_2_Str(hexs)
		} catch (e) {
			throw e;
		}
		return str
	}
	function get_Cut_Link_Text(link_text, float_enable = false) {
		if (check_Mobile_Page()) {
			return (link_text.length >= 35) ? (link_text.slice(0, 15) + ' ... ' + link_text.slice(-10)) : (link_text)
		} else if (float_enable) {
			return (link_text.length >= 50) ? (link_text.slice(0, 25) + ' ... ' + link_text.slice(-15)) : (link_text)
		}
		return (link_text.length >= 80) ? (link_text.slice(0, 45) + ' ... ' + link_text.slice(-25)) : (link_text)
	}
	function create_Button(value_array, style_string, wrap_id, callback) {
		let user_btn = document.createElement('button');
		user_btn.className = 'pn pnc';
		user_btn.type = 'button';
		user_btn.id = value_array[0];
		user_btn.innerText = value_array[1];
		user_btn.title = value_array[2];
		user_btn.setAttribute('style', style_string);
		if (wrap_id) {
			user_btn.addEventListener('click', function(e) {
				document.getElementById(wrap_id).style.display = 'none';
				e.stopPropagation()
			})
		} else {
			user_btn.addEventListener('click', callback)
		}
		return user_btn
	}
	function create_Link(link_href, list_style, float_enable = false) {
		let link_li = document.createElement('li');
		if (list_style) {
			link_li.style.listStyleType = 'disc'
		} else {
			link_li.style.listStyleType = 'circle'
		}
		let link_a = document.createElement('a');
		link_a.title = '点击访问';
		link_href = manage_Prefix_Code(link_href);
		link_a.href = encodeURI(link_href);
		link_a.target = '_blank';
		link_a.innerText = get_Cut_Link_Text(link_href, float_enable);
		link_a.style.display = 'inline';
		link_a.style.fontSize = '15px';
		link_a.style.color = highlight_config.link_color;
		link_a.style.whiteSpace = 'nowrap';
		link_li.appendChild(link_a);
		if (highlight_config.copy_enable) {
			let copy_a = document.createElement('a');
			copy_a.className = 'copy_btn';
			copy_a.title = '复制链接';
			copy_a.href = 'javascript:;';
			copy_a.target = '_self';
			copy_a.innerText = '复制';
			copy_a.style.display = 'inline-block';
			copy_a.style.fontSize = '15px';
			copy_a.style.color = highlight_config.link_color;
			copy_a.style.marginLeft = '20px';
			copy_a.style.textDecoration = 'underline';
			copy_a.addEventListener('click', function() {
				GM_setClipboard(link_href, "text");
				this.style.color = '#f60';
				this.title = '复制成功'
			});
			link_li.appendChild(copy_a);
			if (BAIDUPAN_INCLUDE_CODE_REG.test(link_href) && (/#[a-z0-9]{4}$/i.test(link_href))) {
				let code_value = /#([a-z0-9]{4})$/i.exec(link_href)[1];
				let code_copy_a = document.createElement('a');
				code_copy_a.className = 'code_copy_btn';
				code_copy_a.title = '复制提取码';
				code_copy_a.href = 'javascript:;';
				code_copy_a.target = '_self';
				code_copy_a.innerText = '复制提取码';
				code_copy_a.style.display = 'inline-block';
				code_copy_a.style.fontSize = '15px';
				code_copy_a.style.color = highlight_config.link_color;
				code_copy_a.style.marginLeft = '20px';
				code_copy_a.style.textDecoration = 'underline';
				code_copy_a.addEventListener('click', function() {
					GM_setClipboard(code_value, "text");
					this.style.color = '#f60';
					this.title = '复制成功'
				});
				link_li.appendChild(code_copy_a)
			}
		}
		if (highlight_config.pandownload_enable) {
			if (BAIDUPAN_INCLUDE_CODE_REG.test(link_href)) {
				let jump_a = document.createElement('a');
				jump_a.className = 'jump_btn';
				jump_a.title = '跳转到PanDownload网页版';
				jump_a.href = link_href.replace('pan.baidu.com', 'pan.baiduwp.com');
				jump_a.target = '_blank';
				jump_a.innerText = '跳转';
				jump_a.style.display = 'inline-block';
				jump_a.style.fontSize = '15px';
				jump_a.style.color = highlight_config.link_color;
				jump_a.style.marginLeft = '20px';
				jump_a.style.textDecoration = 'underline';
				link_li.appendChild(jump_a)
			}
		}
		if (highlight_config.query_enable) {
			query_Baidupan(link_a.href, link_a)
		}
		if (highlight_config.check_enable) {
			if (BAIDUPAN_INCLUDE_CODE_REG.test(link_href)) {
				check_Baidupan(link_href, link_a)
			}
		}
		return link_li
	}
	function query_Baidupan(link_value, link_dom) {
		if (BAIDUPAN_REG.test(link_value, link_dom)) {
			let details = {
				'method': 'GET',
				'url': 'https://search.pandown.cn/api/query?surl=' + link_value.split('/').pop(),
				'responseType': 'json',
				'headers': {
					'Content-Type': 'application/x-www-form-urlencoded'
				},
				'onload': function(res) {
					if ((res.response.code === 0) && (res.response.data[0].password)) {
						link_dom.href = link_value + '#' + res.response.data[0].password;
						link_dom.innerText = link_dom.innerText + '#' + res.response.data[0].password
					} else {
						console.log(res.response.message)
					}
				},
				'onerror': function() {
					console.log('网络连接出问题啦。')
				}
			};
			GM_xmlhttpRequest(details)
		}
	}
	function check_Baidupan(link_value, link_dom) {
		let pan_details = {
			method: 'GET',
			url: link_value,
			'headers': {
				'Content-Type': 'application/x-www-form-urlencoded'
			},
			onload: function(res) {
				if ((res.responseText.indexOf('此链接分享内容可能因为涉及侵权') !== -1) || (res.responseText.indexOf('你所访问的页面不存在了') !== -1) || (res.responseText.indexOf('分享的文件已经被取消了') !== -1)) {
					link_dom.style.textDecoration = 'line-through';
					link_dom.style.color = '#999999';
					link_dom.title = '链接失效!'
				} else {
					link_dom.title = '链接可以访问。'
				}
			},
			onerror: function() {
				console.log('"' + link_value + '" is error.')
			}
		};
		GM_xmlhttpRequest(pan_details)
	}
	function manage_Prefix(input_link_array) {
		let return_link_array = [];
		input_link_array.forEach(function(item) {
			return_link_array.push(PREFIX_LINK_REG.MAGNET.test(item) ? item.replace(PREFIX_LINK_REG.MAGNET_SWITCH, '') : item)
		});
		return return_link_array
	}
	function manage_Prefix_Code(input_link) {
		return (PREFIX_CODE_REG.CODE.test(input_link) ? input_link.replace(PREFIX_CODE_REG.CODE_SWITCH, '') : input_link)
	}
	function manage_Text(text_array) {
		let temp_array = [];
		text_array.forEach(function(item) {
			let temp_link = '';
			if (PAN_REG.test(item)) {
				temp_link = 'https://' + PAN_REG.exec(item)[1]
			} else if (URL_REG.test(item)) {
				temp_link = URL_REG.exec(item)[1]
			} else if (WWW_REG.test(item)) {
				temp_link = 'http://' + WWW_REG.exec(item)[1]
			} else if (MISSING_HEADER_BAIDUPAN_REG.test(item)) {
				let link_miss_value = MISSING_HEADER_BAIDUPAN_REG.exec(item)[1];
				temp_link = (/^\//i.test(link_miss_value)) ? ('https://pan.baidu.com' + link_miss_value) : ('https://pan.baidu.com/' + link_miss_value)
			} else if (MISSING_HEADER_BAIDUPAN_TEST_REG.test(item)) {
				temp_link = 'https://pan.baidu.com/s/' + MISSING_HEADER_BAIDUPAN_TEST_REG.exec(item)[1]
			} else if ((!MD5_REG.test(item)) && HASH_REG.test(item)) {
				temp_link = 'magnet:?xt=urn:btih:' + HASH_REG.exec(item)[1]
			} else if (item.length > 32) {
				temp_link = pick_Up_Magnet(item)
			}
			if (filter_Link(temp_link)) {
				temp_array.push(temp_link)
			}
		});
		return manage_Prefix(temp_array)
	}
	function pick_Up_Magnet(item) {
		let temp_link = '';
		let item_1 = item.replace(/[^a-z0-9:=?/.&%|-]/gi, '');
		if (DOWNLOAD_REG.test(item_1)) {
			temp_link = DOWNLOAD_REG.exec(item_1)[1]
		} else {
			let item_2 = item.replace(/[^a-z0-9:=?/.,,。|\s-]/gi, '');
			if ((!MD5_REG.test(item_2)) && HASH_REG.test(item_2) && (!(URL_REG.test(item_2)))) {
				let temp_hash = HASH_REG.exec(item_2)[1];
				if (!(/^(?:[a-z]+|[0-9]+)$/i.test(temp_hash))) {
					temp_link = 'magnet:?xt=urn:btih:' + temp_hash
				}
			}
		}
		return temp_link
	}
	function decode_Link(input_link_array) {
		input_link_array.forEach(function(item, index) {
			if (URL_REG.test(item)) {
				input_link_array[index] = decodeURI(item)
			}
		});
		return input_link_array
	}
	function foyu_Promise(encoded) {
		return new Promise(function(resolve, _reject) {
			let details = {
				'method': 'POST',
				'url': 'http://keyfc.net/bbs/tools/tudou.aspx',
				'data': 'orignalMsg=' + encoded.replace(/\s/g, '') + '&action=Decode',
				'headers': {
					'Content-Type': 'application/x-www-form-urlencoded'
				},
				'onload': function(res) {
					resolve(res.responseText.replace(/^<BUDDHIST><Message><!\[CDATA\[|\]\]><\/Message><\/BUDDHIST>$/g, ''))
				},
				'onerror': function() {
					console.log('Decode is error.');
					resolve('')
				}
			};
			GM_xmlhttpRequest(details)
		})
	}
	async function foyu_Decode(container, id_number, encoded, float_enable) {
		await foyu_Promise(encoded).then(function(data) {
			if (data) {
				let good_boy_ul = document.getElementById('goodBoyId_' + id_number);
				if (good_boy_ul) {
					if (float_enable) {
						good_boy_ul.appendChild(create_Link(data, true, true))
					} else {
						good_boy_ul.appendChild(create_Link(data, true))
					}
				} else {
					if (float_enable) {
						let good_boy_div = create_Good_Boy_Div();
						let good_boy_p = create_Good_Boy_P();
						good_boy_ul = document.createElement('ul');
						good_boy_ul.id = 'goodBoyId_' + id_number;
						good_boy_ul.appendChild(good_boy_p);
						good_boy_div.appendChild(good_boy_ul);
						good_boy_ul.appendChild(create_Link(data, true, true));
						container.appendChild(good_boy_div)
					} else {
						good_boy_ul = document.createElement('ul');
						good_boy_ul.id = 'goodBoyId_' + id_number;
						good_boy_ul.className = 'goodBoy';
						let good_boy_p = create_Good_Boy_P();
						good_boy_ul.appendChild(good_boy_p);
						good_boy_ul.appendChild(create_Link(data, true));
						container.appendChild(good_boy_ul)
					}
				}
			}
		})
	}
	function baijia_Encode(str) {
		str = str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
		let v = str.replace(/magnet:\?xt=urn:btih:/, "");
		let strc = v.split("");
		let a = '';
		for (let i = 0; i < strc.length; i++) {
			for (let key in BAIJIA_VALUES) {
				if (BAIJIA_VALUES[key] === strc[i]) {
					a += key;
					break
				}
			}
		}
		return a
	}
	function baijia_Decode(encoded) {
		let char_array = encoded.split("");
		let str = '';
		for (let i = 0; i < char_array.length; i++) {
			if (BAIJIA_VALUES[char_array[i]]) {
				str += BAIJIA_VALUES[char_array[i]]
			}
		}
		if (/^https?\/\/[\w-]*\.*[\w-]+\.+\w+/i.test(str)) {
			return str.replace('https//', 'https://').replace('http//', 'http://')
		} else {
			return 'magnet:?xt=urn:btih:' + str
		}
	}
	function decode_Core_Values(container, id_number, text_array, float_enable) {
		let decode_array = [];
		text_array.forEach(function(item) {
			if (CORE_VALUES_REG.test(item)) {
				decode_array.push(values_Decode(CORE_VALUES_REG.exec(item)[1]))
			} else if (BAIJIA_REG.test(item)) {
				decode_array.push(baijia_Decode(BAIJIA_REG.exec(item)[1]))
			} else if (FOYU_REG.test(item)) {
				foyu_Decode(container, id_number, FOYU_REG.exec(item)[1], float_enable)
			}
		});
		return decode_array
	}
	function pick_Up_Baidupan_Code(text_array) {
		let code_array = [];
		let char_array = [];
		for (let i = 0; i < text_array.length; i++) {
			let temp_value = '';
			if (CODE_REG.test(text_array[i])) {
				temp_value = CODE_REG.exec(text_array[i])[1]
			} else if (BAIDUPAN_CODE_REG.test(text_array[i])) {
				temp_value = BAIDUPAN_CODE_REG.exec(text_array[i])[1]
			} else if (SINGLE_CHAR_CODE_REG.test(text_array[i])) {
				char_array.push(text_array[i])
			}
			if (temp_value && (!(/\d{4}/i.test(temp_value))) && (code_array.indexOf(temp_value) === -1)) {
				code_array.push(temp_value)
			}
		}
		while ((char_array.length > 0) && (char_array.length % 4 === 0)) {
			let temp_code = char_array.splice(0, 4);
			let char_value = temp_code.join("");
			if ((!(/\d{4}/i.test(char_value))) && (code_array.indexOf(char_value) === -1)) {
				code_array.push(char_value)
			}
		}
		return code_array
	}
	function judge_Links(links_array, link_value) {
		let status = true;
		for (let i = 0; i < links_array.length; i++) {
			if (get_Pure_Link(links_array[i], true).includes(get_Pure_Link(link_value, true))) {
				status = false;
				break
			}
		}
		return status
	}
	function baidupan_Auto_Event(container, id_number, link_obj_array, baidu_obj_array, links_array, hide_text_array, show_text_array, node_text_array, float_enable = false) {
		let link_array = [];
		let link_text_array = [];
		link_obj_array.forEach(function(item) {
			link_array.push(item.ele_value);
			link_text_array.push(item.ele_container)
		});
		let concat_text_array = manage_Repeat_Array(decode_Link(hide_text_array));
		let concat_link_array = manage_Repeat_Array(decode_Link(manage_Text(link_array.concat(concat_text_array))));
		let general_text_array = show_text_array.concat(node_text_array.concat(link_text_array));
		let index_a = [];
		let code_b = pick_Up_Baidupan_Code(concat_text_array);
		let code_c = [];
		if (code_b.length > 0) {
			for (let j = 0; j < concat_link_array.length; j++) {
				if (BAIDUPAN_REG.test(concat_link_array[j])) {
					index_a.push(j)
				}
			}
			if (code_b.length === index_a.length) {
				for (let k = 0; k < index_a.length; k++) {
					concat_link_array[index_a[k]] += ('#' + code_b[k])
				}
			} else if (code_b.length === baidu_obj_array.length) {
				for (let l = 0; l < baidu_obj_array.length; l++) {
					baidu_obj_array[l].ele.innerText = baidu_obj_array[l].ele_container + '#' + code_b[l];
					baidu_obj_array[l].ele.href = baidu_obj_array[l].ele_value + '#' + code_b[l]
				}
			}
		} else {
			code_c = pick_Up_Baidupan_Code(general_text_array);
			if (code_c.length > 0) {
				for (let j = 0; j < concat_link_array.length; j++) {
					if (BAIDUPAN_REG.test(concat_link_array[j])) {
						index_a.push(j)
					}
				}
				if (code_c.length === index_a.length) {
					for (let k = 0; k < index_a.length; k++) {
						concat_link_array[index_a[k]] += ('#' + code_c[k])
					}
				} else if (code_c.length === baidu_obj_array.length) {
					for (let l = 0; l < baidu_obj_array.length; l++) {
						baidu_obj_array[l].ele.innerText = baidu_obj_array[l].ele_container + '#' + code_c[l];
						baidu_obj_array[l].ele.href = baidu_obj_array[l].ele_value + '#' + code_c[l]
					}
				}
			}
		}
		let hash_array = [];
		general_text_array.forEach(function(item) {
			if (DOWNLOAD_REG.test(item)) {
				hash_array.push(DOWNLOAD_REG.exec(item)[1])
			} else if ((!MD5_REG.test(item)) && (HASH_REG.test(item)) && (!URL_REG.test(item))) {
				hash_array.push('magnet:?xt=urn:btih:' + HASH_REG.exec(item)[1])
			} else if (item.length > 32) {
				let temp_link = pick_Up_Magnet(item);
				if (temp_link) {
					hash_array.push(temp_link)
				}
			}
		});
		hash_array = decode_Link(hash_array);
		concat_link_array = manage_Repeat_Array(concat_link_array.concat(hash_array));
		let extract_array = [];
		if (highlight_config.extract_enable) {
			let general_link_array = decode_Link(manage_Text(general_text_array));
			general_link_array.forEach(function(item) {
				if ((filter_Link(item)) && (judge_Links(links_array, item))) {
					if (judge_Links(concat_link_array, item)) {
						extract_array.push(item)
					}
				}
			})
		}
		if (extract_array.length > 0) {
			extract_array = manage_Repeat_Array(extract_array);
			if ((index_a.length === 0) && (baidu_obj_array.length === 0)) {
				if ((code_b.length > 0)) {
					let index_m = [];
					for (let m = 0; m < extract_array.length; m++) {
						if (BAIDUPAN_REG.test(extract_array[m])) {
							index_m.push(m)
						}
					}
					if (code_b.length === index_m.length) {
						for (let n = 0; n < index_m.length; n++) {
							extract_array[index_m[n]] += ('#' + code_b[n])
						}
					}
				} else if (code_c.length > 0) {
					let index_p = [];
					for (let p = 0; p < extract_array.length; p++) {
						if (BAIDUPAN_REG.test(extract_array[p])) {
							index_p.push(p)
						}
					}
					if (code_c.length === index_p.length) {
						for (let q = 0; q < index_p.length; q++) {
							extract_array[index_p[q]] += ('#' + code_c[q])
						}
					}
				}
			}
		}
		if (highlight_config.check_enable) {
			for (let pan_index = 0; pan_index < baidu_obj_array.length; pan_index++) {
				check_Baidupan(baidu_obj_array[pan_index].ele_value, baidu_obj_array[pan_index].ele)
			}
		}
		if (highlight_config.query_enable) {
			for (let query_index = 0; query_index < baidu_obj_array.length; query_index++) {
				query_Baidupan(baidu_obj_array[query_index].href, baidu_obj_array[query_index].ele)
			}
		}
		let hide_code_text_array = decode_Core_Values(container, id_number, hide_text_array.concat(general_text_array), float_enable);
		if (hide_code_text_array.length > 0) {
			concat_link_array = manage_Repeat_Array(concat_link_array.concat(hide_code_text_array))
		}
		let back_obj = {
			concat_link_array: concat_link_array,
			extract_link_array: extract_array,
		};
		return back_obj
	}
	function create_Good_Boy_Div() {
		let good_boy_div = document.createElement('div');
		good_boy_div.className = 'goodBoyDiv';
		good_boy_div.style.position = 'absolute';
		good_boy_div.style.width = '430px';
		good_boy_div.style.paddingLeft = '20px';
		good_boy_div.style.paddingRight = '10px';
		good_boy_div.style.marginLeft = '962px';
		good_boy_div.style.marginTop = '-170px';
		good_boy_div.style.border = '2px #CDCDCD solid';
		good_boy_div.style.borderRadius = '8px';
		return good_boy_div
	}
	function create_Good_Boy_P() {
		let good_boy_p = document.createElement('p');
		good_boy_p.innerText = '好孩子看得见:';
		good_boy_p.style.color = 'red';
		good_boy_p.style.fontSize = '15px';
		return good_boy_p
	}
	function create_Good_Boy_Button(container, id_number, link_obj, text_obj, node_text_array, float_enable = false) {
		let back_obj = baidupan_Auto_Event(container, id_number, link_obj.link_obj_array, link_obj.baidu_obj_array, link_obj.links_array, text_obj.hide_text_array, text_obj.show_text_array, node_text_array, float_enable);
		if ((back_obj.concat_link_array.length !== 0) || (back_obj.extract_link_array.length !== 0)) {
			let good_boy_ul = document.getElementById('goodBoyId_' + id_number);
			if (good_boy_ul) {
				if (float_enable) {
					back_obj.concat_link_array.forEach(function(item) {
						good_boy_ul.appendChild(create_Link(item, true, true))
					});
					back_obj.extract_link_array.forEach(function(item) {
						good_boy_ul.appendChild(create_Link(item, false, true))
					})
				} else {
					back_obj.concat_link_array.forEach(function(item) {
						good_boy_ul.appendChild(create_Link(item, true))
					});
					back_obj.extract_link_array.forEach(function(item) {
						good_boy_ul.appendChild(create_Link(item, false))
					})
				}
			} else {
				if (float_enable) {
					let good_boy_div = create_Good_Boy_Div();
					let good_boy_p = create_Good_Boy_P();
					good_boy_ul = document.createElement('ul');
					good_boy_ul.id = 'goodBoyId_' + id_number;
					good_boy_ul.appendChild(good_boy_p);
					good_boy_div.appendChild(good_boy_ul);
					back_obj.concat_link_array.forEach(function(item) {
						good_boy_ul.appendChild(create_Link(item, true, true))
					});
					back_obj.extract_link_array.forEach(function(item) {
						good_boy_ul.appendChild(create_Link(item, false, true))
					});
					container.appendChild(good_boy_div)
				} else {
					good_boy_ul = document.createElement('ul');
					good_boy_ul.id = 'goodBoyId_' + id_number;
					good_boy_ul.className = 'goodBoy';
					let good_boy_p = create_Good_Boy_P();
					good_boy_ul.appendChild(good_boy_p);
					back_obj.concat_link_array.forEach(function(item) {
						good_boy_ul.appendChild(create_Link(item, true))
					});
					back_obj.extract_link_array.forEach(function(item) {
						good_boy_ul.appendChild(create_Link(item, false))
					});
					container.appendChild(good_boy_ul)
				}
			}
		}
	}
	function filter_Link(input_link) {
		let status = true;
		if (input_link) {
			for (let i in FILTER_LINK_REG) {
				if (FILTER_LINK_REG[i].test(input_link)) {
					status = false;
					break
				}
			}
		} else {
			status = false
		}
		return status
	}
	function manage_Repeat_Array(input_link_array) {
		let output_link_array = [];
		for (let i = 0, l = input_link_array.length; i < l; i++) {
			for (let j = i + 1; j < l; j++) {
				if (get_Pure_Link(input_link_array[i]) === get_Pure_Link(input_link_array[j])) {
					++i;
					j = i
				}
			}
			output_link_array.push(input_link_array[i])
		}
		return output_link_array
	}
	function get_Pure_Link(input_link, depth_boolean) {
		let output_link = input_link;
		if (depth_boolean) {
			if (BAIDUPAN_INCLUDE_CODE_REG.test(output_link)) {
				if (/#[a-z0-9]{4}$/i.test(output_link)) {
					output_link = output_link.replace(/#[a-z0-9]{4}$/i, '')
				}
			} else if (/^https?:\/\/www\.bilibili\.com\/video\/av\d+\?from=search/i.test(output_link)) {
				output_link = output_link.replace(/\?from=search.*/, '')
			}
		}
		return output_link.replace(/(^(?:\s+)?(?:\[url\])?(?:\s+)?(?:https?:\/\/)?|(?:\/+)?(?:\s+)?(?:\[\/url\])?$|%C2%A0$)/gi, '').replace(/%C2%A0/gi, '%20')
	}
	function contrast_Text_And_Link(text_value, link_value) {
		let status = true;
		text_value = get_Pure_Link(text_value, true);
		link_value = get_Pure_Link(link_value, true);
		if (/\s...\s/i.test(text_value)) {
			status = false
		} else if (text_value === link_value) {
			status = false
		}
		return status
	}
	function find_Link(container) {
		let link_a = container.getElementsByTagName('a');
		let temp_obj = {
			link_obj_array: [],
			baidu_obj_array: [],
			links_array: [],
		};
		let temp_baidu_array = [];
		for (let i = 0; i < link_a.length; i++) {
			if (link_a[i].closest('div.aimg_tip')) {
				continue
			}
			let temp_link = link_a[i].href;
			if ((link_a[i].querySelectorAll('img.zoom').length === 1) && (!BAIDUPAN_REG.test(temp_link))) {
				let zoom_img = link_a[i].querySelector('img.zoom');
				if (!/^data:/i.test(zoom_img.src)) {
					continue
				}
			}
			if (filter_Link(temp_link)) {
				let temp_img = link_a[i].querySelectorAll('img');
				if ((temp_img.length === 0) || ((temp_img.length > 0) && (temp_img[0].src !== temp_link))) {
					let temp_text = link_a[i].innerText.replace(/^\s+|\s+$/gi, '');
					if (contrast_Text_And_Link(temp_text, temp_link)) {
						let link_obj = {
							ele_value: temp_link,
							ele_container: temp_text,
							ele: link_a[i],
						};
						temp_obj.link_obj_array.push(link_obj)
					} else if (BAIDUPAN_REG.test(temp_link)) {
						let baidu_obj = {
							ele_value: temp_link,
							ele_container: temp_text,
							ele: link_a[i],
						};
						if (temp_baidu_array.indexOf(temp_link) === -1) {
							temp_baidu_array.push(temp_link);
							temp_obj.baidu_obj_array.push(baidu_obj)
						}
					}
				}
				if (temp_obj.links_array.indexOf(temp_link) === -1) {
					temp_obj.links_array.push(temp_link)
				}
			}
		}
		return temp_obj
	}
	function judge_Color(rgb_color_value) {
		if (/rgb\(/i.test(rgb_color_value)) {
			let rgb_value = rgb_color_value.replace('rgb(', '').replace(')', '');
			let rgb_value_array = rgb_value.split(',');
			let gray_level = rgb_value_array[0] * 0.299 + rgb_value_array[1] * 0.587 + rgb_value_array[2] * 0.114;
			return gray_level > 192
		} else if (/rgba\(/i.test(rgb_color_value)) {
			let rgba_value = rgb_color_value.replace('rgba(', '').replace(')', '');
			let rgba_value_array = rgba_value.split(',');
			if (rgba_value_array[3] <= 0.2) {
				return true
			} else {
				let gray_level_2 = rgba_value_array[0] * 0.299 + rgba_value_array[1] * 0.587 + rgba_value_array[2] * 0.114;
				return gray_level_2 > 192
			}
		}
		return false
	}
	function rgb_To_Rgba(color_string) {
		let color_value = color_string.match(/\d+/g);
		if (color_value.length === 3) {
			return 'rgba(' + color_value[0] + ', ' + color_value[1] + ', ' + color_value[2] + (', 1)')
		}
		return color_string
	}
	function display_Text(container, new_text_color, new_text_background_color) {
		let text_font = container.getElementsByTagName('font');
		let temp_obj = {
			hide_text_array: [],
			show_text_array: [],
		};
		for (let i = 0; i < text_font.length; i++) {
			if ((text_font[i].closest('.quote')) || (text_font[i].getElementsByClassName('aimg_tip').length !== 0)) {
				continue
			}
			let temp_text = text_font[i].innerText.replace(/^\s+|\s+$/gi, '');
			if (!/^\s*$/i.test(temp_text)) {
				let text_color = window.getComputedStyle(text_font[i]).color;
				let text_background_color = window.getComputedStyle(text_font[i]).backgroundColor;
				if ((judge_Color(text_color)) && (judge_Color(text_background_color))) {
					text_font[i].style.color = new_text_color;
					temp_obj.hide_text_array.push(temp_text)
				} else if (rgb_To_Rgba(text_background_color) === rgb_To_Rgba(text_color)) {
					text_font[i].style.backgroundColor = new_text_background_color;
					text_font[i].style.color = new_text_color;
					temp_obj.hide_text_array.push(temp_text)
				} else if ((!judge_Color(text_background_color)) && (!judge_Color(text_color))) {
					text_font[i].style.backgroundColor = new_text_background_color;
					text_font[i].style.color = new_text_color;
					temp_obj.hide_text_array.push(temp_text)
				} else {
					if (!temp_obj.show_text_array.includes(temp_text)) {
						temp_obj.show_text_array.push(temp_text)
					}
				}
			}
		}
		let temp_table = container.getElementsByTagName('table');
		for (let j = 0; j < temp_table.length; j++) {
			if ((!judge_Color(temp_table[j].style.backgroundColor)) && (!judge_Color(temp_table[j].style.color))) {
				temp_table[j].style.backgroundColor = new_text_background_color
			} else if ((judge_Color(temp_table[j].style.color)) && (judge_Color(temp_table[j].style.backgroundColor))) {
				temp_table[j].style.color = new_text_color
			}
		}
		return temp_obj
	}
	function analysis_Text(dom_point) {
		let node_list = dom_point.childNodes;
		let node_text_array = [];
		for (let i = 0; i < node_list.length; i++) {
			if (node_list[i].nodeType === 3) {
				let temp_text = node_list[i].nodeValue.replace(/^\s+|\s+$/gi, '');
				if (!/^\s*$/i.test(temp_text)) {
					node_text_array.push(temp_text)
				}
			} else if ((node_list[i].nodeType === 1) && (!node_list[i].className.includes('quote')) && (!node_list[i].className.includes('pstatus')) && (!node_list[i].className.includes('aimg_tip')) && (!node_list[i].className.includes('blockcode')) && ((node_list[i].nodeName !== 'FONT') || ((node_list[i].nodeName === 'FONT') && node_list[i].getElementsByTagName('br').length > 0)) && (node_list[i].nodeName !== 'A') && (node_list[i].nodeName !== 'SCRIPT') && (node_list[i].childNodes.length > 0)) {
				let recursive_array = analysis_Text(node_list[i]);
				for (let j = 0; j < recursive_array.length; j++) {
					node_text_array.push(recursive_array[j])
				}
			}
		}
		return node_text_array
	}
	function check_Mobile_Page() {
		return document.getElementsByClassName('footer').length > 0
	}
	function get_Now_Date() {
		let now = new Date();
		return now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate()
	}
	function highlight_Post() {
		let access_num = document.getElementById('g_upmine').innerText;
		access_num = /LV\.(-?[0-9])/.exec(access_num)[1];
		if (access_num) {
			access_num = Number(access_num);
			switch (access_num) {
			case -1:
				access_num = 0;
				break;
			case 0:
				access_num = 5;
				break;
			case 1:
				access_num = 10;
				break;
			case 2:
				access_num = 20;
				break;
			case 3:
				access_num = 30;
				break;
			case 4:
				access_num = 40;
				break;
			case 5:
				access_num = 50;
				break;
			case 6:
				access_num = 60;
				break;
			case 7:
				access_num = 70;
				break;
			case 8:
				access_num = 80;
				break;
			case 9:
				access_num = 90;
				break;
			default:
				access_num = 90;
				break
			}
		} else {
			access_num = 90
		}
		let common_btn = document.querySelectorAll('tbody .common, tbody .new, tbody .lock');
		for (let i = 0; i < common_btn.length; i++) {
			let read_num = common_btn[i].querySelector('.xw1');
			if (read_num) {
				read_num = Number(read_num.innerText);
				if (read_num > 90) {
					common_btn[i].querySelector('.xst').setAttribute('style', 'color: #99999; font-weight: bold; text-decoration-line: line-through; text-decoration-color: #000000;');
					continue
				} else if (read_num > access_num) {
					common_btn[i].querySelector('.xst').setAttribute('style', 'color: #999999; font-weight: bold;');
					continue
				}
			}
			if (common_btn[i].querySelector('.xst').style.fontWeight === '700') {
				continue
			}
			let agree_num = 0;
			let font_ele = common_btn[i].querySelectorAll('font');
			for (let j = 0; j < font_ele.length; j++) {
				let font_num = font_ele[j].innerText;
				if (font_num) {
					font_num = Number(font_num.replace('+', ''));
					if (font_num > agree_num) {
						agree_num = font_num
					}
				}
			}
			if (agree_num > 0) {
				if (agree_num >= highlight_config.agree_threshold) {
					common_btn[i].querySelector('.xst').setAttribute('style', 'font-weight: bold; color: ' + highlight_config.agree_color + ';');
					continue
				}
			}
			let reply_num = common_btn[i].parentNode.querySelector('td.num .xi2').innerText;
			if (reply_num) {
				reply_num = Number(reply_num);
				if (reply_num >= highlight_config.reply_threshold) {
					common_btn[i].querySelector('.xst').setAttribute('style', 'font-weight: bold; color: ' + highlight_config.reply_color + ';')
				}
			}
		}
	}
	function insert_Checkbox(ul_node, li_array, check_enable_value, status = false) {
		let temp_li = document.createElement('li');
		let temp_label = document.createElement('label');
		temp_label.setAttribute('style', 'vertical-align: middle; ' + (status ? 'text-decoration: line-through;' : ''));
		let temp_input = document.createElement('input');
		temp_input.id = li_array[0];
		temp_input.type = 'checkbox';
		temp_input.setAttribute('style', 'margin-right: 5px; margin-bottom: 6px;');
		if (check_enable_value) {
			temp_input.checked = 'checked'
		}
		let temp_span = document.createElement('span');
		temp_span.innerText = li_array[1];
		temp_span.title = li_array[2];
		temp_label.appendChild(temp_input);
		temp_label.appendChild(temp_span);
		temp_li.appendChild(temp_label);
		ul_node.appendChild(temp_li)
	}
	function insert_Input(ul_node, text_array, input_array, input_value, eg_array) {
		let temp_li = document.createElement('li');
		let text_span = document.createElement('span');
		text_span.id = text_array[0];
		text_span.innerText = text_array[1];
		text_span.style.marginLeft = '5px';
		temp_li.appendChild(text_span);
		let temp_input = document.createElement('input');
		temp_input.id = input_array[0];
		temp_input.placeholder = input_array[1];
		temp_input.value = input_value;
		temp_input.style.width = '120px';
		temp_li.appendChild(temp_input);
		if (arguments.length === 5) {
			let eg_span = document.createElement('span');
			eg_span.id = eg_array[0];
			eg_span.innerText = eg_array[1];
			eg_span.style.marginLeft = '5px';
			eg_span.style.color = input_value;
			temp_input.oninput = function() {
				eg_span.style.color = this.value
			};
			temp_li.appendChild(eg_span)
		}
		ul_node.appendChild(temp_li)
	}
	function show_Display_Mode(html_span, display_status) {
		if (display_status) {
			html_span.title = '开启日间模式';
			html_span.style.backgroundImage = MODE_ICON.DAY
		} else {
			html_span.title = '开启夜间模式';
			html_span.style.backgroundImage = MODE_ICON.NIGHT
		}
	}
	function create_Night_Icon() {
		let icon_span = document.createElement('span');
		icon_span.id = 'nightIcon';
		icon_span.style.display = 'block';
		icon_span.style.float = 'right';
		icon_span.style.cursor = 'pointer';
		icon_span.style.marginTop = '5px';
		icon_span.style.width = '23px';
		icon_span.style.height = '18px';
		icon_span.style.backgroundRepeat = 'no-repeat';
		icon_span.style.backgroundSize = '16px auto';
		icon_span.style.backgroundPosition = 'center';
		if (highlight_config.night_enable) {
			show_Display_Mode(icon_span, true)
		} else {
			show_Display_Mode(icon_span, false)
		}
		icon_span.addEventListener('click', function() {
			if (highlight_config.night_enable) {
				highlight_config.night_enable = false
			} else {
				highlight_config.night_enable = true
			}
			GM_setValue('highlight_config', highlight_config);
			location.reload()
		});
		return icon_span
	}
	function create_Icon(icon_obj, top_value, wrap_id, hide_id, create_tag) {
		let icon_span = document.createElement('span');
		let icon_a = document.createElement('a');
		icon_a.className = icon_obj.CLASS_NAME;
		icon_a.title = icon_obj.TITLE;
		icon_a.target = '_self';
		icon_a.href = 'javascript:;';
		icon_a.style.backgroundImage = icon_obj.GRAY;
		icon_a.style.backgroundRepeat = 'no-repeat';
		icon_a.style.backgroundSize = '24px auto';
		icon_a.style.backgroundPosition = 'center';
		icon_a.style.visibility = 'visible';
		icon_a.style.position = 'fixed';
		icon_a.style.display = 'block';
		icon_a.style.border = '1px #cdcdcd solid';
		icon_a.style.borderRadius = '3px';
		icon_a.style.width = '30px';
		icon_a.style.height = '24px';
		icon_a.style.right = '10px';
		icon_a.style.top = top_value;
		hover(icon_a, function() {
			this.style.backgroundImage = icon_obj.BLUE
		}, function() {
			this.style.backgroundImage = icon_obj.GRAY
		});
		icon_a.addEventListener('click', function() {
			if (document.getElementById(hide_id)) {
				document.getElementById(hide_id).style.display = 'none'
			}
			if (document.getElementById(wrap_id)) {
				if (document.getElementById(wrap_id).style.display === 'none') {
					document.getElementById(wrap_id).style.display = 'block'
				} else {
					document.getElementById(wrap_id).style.display = 'none'
				}
			} else {
				document.getElementById('hd').appendChild(create_tag())
			}
		});
		icon_span.appendChild(icon_a);
		return icon_span
	}
	function hover(ele, over, out) {
		ele.addEventListener('mouseover', over, false);
		ele.addEventListener('mouseout', out, false)
	}
	function set_Status_Bar(bar_id, bar_value) {
		if (bar_id === 0) {
			document.getElementById(TOOL_VALUE.STATUS_BAR[0]).innerText = bar_value
		} else if (bar_id === 1) {
			document.getElementById(BT_VALUE.STATUS_BAR[0]).innerText = bar_value
		}
	}
	function create_Operate_Button(text_array, callback, status = 0) {
		let operate_btn = create_Button(text_array, 'height: auto; margin: 5px; padding: 0 5px;', '', function() {
			let str = document.getElementById(TOOL_VALUE.LEFT_TEXTAREA[0]).value;
			let result = callback(str);
			if (result) {
				document.getElementById(TOOL_VALUE.RIGHT_TEXTAREA[0]).value = result;
				if (status === 0) {
					set_Status_Bar(0, '编码完成!')
				} else {
					set_Status_Bar(0, '解码完成!')
				}
			}
		});
		return operate_btn
	}
	function create_Col(width) {
		let col = document.createElement('col');
		col.width = width;
		return col
	}
	function create_Th(class_name, text_value, align_value = 0) {
		let th = document.createElement('th');
		th.className = class_name;
		th.innerText = text_value;
		if (align_value === 1) {
			th.style.textAlign = 'center'
		}
		return th
	}
	function create_Td(id_name, html_value, align_value = 0) {
		let td = document.createElement('td');
		td.id = id_name;
		td.innerHTML = html_value;
		if (align_value === 1) {
			td.style.textAlign = 'center'
		}
		return td
	}
	function create_Magnet_Result(num, name_html, format_size, hot, date, magnet) {
		let tr = document.createElement('tr');
		tr.appendChild(create_Td('btNum_' + num, num + 1, 1));
		tr.appendChild(create_Td('btName_' + num, name_html));
		tr.appendChild(create_Td('btSize_' + num, format_size, 1));
		tr.appendChild(create_Td('btHot_' + num, hot, 1));
		tr.appendChild(create_Td('btDate_' + num, date, 1));
		let temp_td = document.createElement('td');
		temp_td.style.textAlign = 'center';
		let copy_button = create_Button(['btCopy_' + num, '复制', '复制磁力链接'], 'padding: 0 5px; margin-right: 0;', '', function() {
			GM_setClipboard(magnet, "text");
			set_Status_Bar(1, '复制成功!')
		});
		temp_td.appendChild(copy_button);
		tr.appendChild(temp_td);
		return tr
	}
	function search_Magnet(page_num = 1) {
		set_Status_Bar(1, BT_VALUE.STATUS_BAR[2]);
		let bt_details = {
			'method': 'GET',
			'url': 'https://www.kutv8.com/api/search?source=+%E7%A3%81%E5%8A%9B%E7%8B%97&keyword=' + document.getElementById(BT_VALUE.SEARCH_INPUT[0]).value + '&page=' + page_num + '&sort=default',
			'responseType': 'json',
			'headers': {
				'Content-Type': 'application/x-www-form-urlencoded'
			},
			'onload': function(res) {
				document.getElementById(BT_VALUE.TBODY[0]).innerHTML = '';
				if (res.response.data) {
					if (res.response.data.results.length > 0) {
						let results = res.response.data.results;
						for (let i = 0; i < results.length; i++) {
							document.getElementById(BT_VALUE.TBODY[0]).appendChild(create_Magnet_Result(i, results[i].nameHtml, results[i].formatSize, results[i].hot, results[i].date, results[i].magnet))
						}
						if (results.length >= 12) {
							document.getElementById(BT_VALUE.NEXT_PAGE_BUTTON[0]).style.display = 'inline-block'
						} else {
							document.getElementById(BT_VALUE.NEXT_PAGE_BUTTON[0]).style.display = 'none'
						}
					}
				} else {
					document.getElementById(BT_VALUE.NEXT_PAGE_BUTTON[0]).style.display = 'none'
				}
				bt_page_num = page_num;
				document.getElementById(BT_VALUE.PAGE_TEXT[0]).innerText = BT_VALUE.PAGE_TEXT[1] + bt_page_num;
				if (bt_page_num > 1) {
					document.getElementById(BT_VALUE.PREV_PAGE_BUTTON[0]).style.display = 'inline-block'
				} else {
					document.getElementById(BT_VALUE.PREV_PAGE_BUTTON[0]).style.display = 'none'
				}
				if (res.response.message) {
					set_Status_Bar(1, res.response.message)
				} else {
					set_Status_Bar(1, BT_VALUE.STATUS_BAR[3])
				}
			},
			'onerror': function() {
				set_Status_Bar(1, '网络连接出问题啦!')
			}
		};
		GM_xmlhttpRequest(bt_details)
	}
	function create_Wrap_Div(wrap_array, style_value = '') {
		let wrap_div = document.createElement('div');
		wrap_div.id = wrap_array[0];
		wrap_div.className = wrap_array[1];
		if (style_value) {
			wrap_div.setAttribute('style', style_value)
		} else {
			wrap_div.setAttribute('style', 'position: fixed; top: 50%; left: 50%; z-index: 250; dispaly: block; padding: 0; margin: -300px 0 0 -450px; border: 1px solid #a0a0a0; border-radius: 3px; width: 900px; height: 600px;')
		}
		return wrap_div
	}
	function create_Main_Fieldsest(fieldset_array, style_value = '') {
		let main_fieldset = document.createElement('fieldset');
		main_fieldset.id = fieldset_array[0];
		if (style_value) {
			main_fieldset.setAttribute('style', style_value)
		} else {
			main_fieldset.setAttribute('style', 'border: 3px solid #ccc; border-radius: 3px; padding: 4px 9px 6px 9px; margin: 8px; height: 540px;')
		}
		return main_fieldset
	}
	function create_Bt_Tag() {
		let wrap_div = create_Wrap_Div(BT_VALUE.WRAP_DIV);
		let main_fieldset = create_Main_Fieldsest(BT_VALUE.MAIN_FIELDSET);
		wrap_div.appendChild(main_fieldset);
		let headline_legend = document.createElement('legend');
		headline_legend.id = BT_VALUE.HEADLINE_LEGEND[0];
		let headline_link = document.createElement('a');
		headline_link.id = BT_VALUE.HEADLINE_LINK[0];
		headline_link.innerText = BT_VALUE.HEADLINE_LINK[1];
		headline_link.title = BT_VALUE.HEADLINE_LINK[2];
		headline_link.href = BT_VALUE.HEADLINE_LINK[3];
		headline_link.target = '_blank';
		headline_legend.appendChild(headline_link);
		main_fieldset.appendChild(headline_legend);
		let top_bar = document.createElement('div');
		top_bar.id = BT_VALUE.TOP_BAR[0];
		main_fieldset.appendChild(top_bar);
		let search_input = document.createElement('input');
		search_input.id = BT_VALUE.SEARCH_INPUT[0];
		search_input.type = 'text';
		search_input.placeholder = BT_VALUE.SEARCH_INPUT[1];
		search_input.style.width = '400px';
		search_input.style.marginTop = '5px';
		search_input.oninput = function() {
			document.getElementById(BT_VALUE.PREV_PAGE_BUTTON[0]).style.display = 'none';
			document.getElementById(BT_VALUE.NEXT_PAGE_BUTTON[0]).style.display = 'none'
		};
		search_input.addEventListener('keyup', function(e) {
			if (e.keyCode === 13) {
				search_Magnet(1)
			}
		});
		top_bar.appendChild(search_input);
		let search_button = create_Button(BT_VALUE.SEARCH_BUTTON, 'padding: 0 5px; margin-left: 5px;', '', function() {
			search_Magnet(1)
		});
		top_bar.appendChild(search_button);
		let prev_page_button = create_Button(BT_VALUE.PREV_PAGE_BUTTON, 'padding: 0 5px; display: none;', '', function() {
			if (bt_page_num > 1) {
				search_Magnet(bt_page_num - 1)
			}
		});
		top_bar.appendChild(prev_page_button);
		let next_page_button = create_Button(BT_VALUE.NEXT_PAGE_BUTTON, 'padding: 0 5px; display: none;', '', function() {
			search_Magnet(bt_page_num + 1)
		});
		top_bar.appendChild(next_page_button);
		let page_text = document.createElement('span');
		page_text.id = BT_VALUE.PAGE_TEXT[0];
		page_text.innerText = BT_VALUE.PAGE_TEXT[1] + 0;
		page_text.style.float = 'right';
		page_text.style.marginRight = '5px';
		top_bar.appendChild(page_text);
		let middle_bar = document.createElement('div');
		middle_bar.id = BT_VALUE.MIDDLE_BAR[0];
		middle_bar.style.marginTop = '5px';
		main_fieldset.appendChild(middle_bar);
		let table_header_div = document.createElement('div');
		table_header_div.id = BT_VALUE.TABLE_HEADER_DIV[0];
		let table_header = document.createElement('table');
		table_header.id = BT_VALUE.TABLE_HEADER[0];
		table_header.border = '1';
		let colgroup_header = document.createElement('colgroup');
		colgroup_header.appendChild(create_Col(30));
		colgroup_header.appendChild(create_Col(560));
		colgroup_header.appendChild(create_Col(90));
		colgroup_header.appendChild(create_Col(50));
		colgroup_header.appendChild(create_Col(80));
		colgroup_header.appendChild(create_Col(50));
		table_header.appendChild(colgroup_header);
		let theader = document.createElement('thead');
		let theader_tr = document.createElement('tr');
		theader_tr.appendChild(create_Th(BT_VALUE.TH[0] + '1', '序号', 1));
		theader_tr.appendChild(create_Th(BT_VALUE.TH[0] + '2', '名称'));
		theader_tr.appendChild(create_Th(BT_VALUE.TH[0] + '3', '大小', 1));
		theader_tr.appendChild(create_Th(BT_VALUE.TH[0] + '4', '人气', 1));
		theader_tr.appendChild(create_Th(BT_VALUE.TH[0] + '5', '发布日期', 1));
		theader_tr.appendChild(create_Th(BT_VALUE.TH[0] + '6', '操作', 1));
		theader.appendChild(theader_tr);
		table_header.appendChild(theader);
		table_header_div.appendChild(table_header);
		middle_bar.appendChild(table_header_div);
		let table_body_div = document.createElement('div');
		table_body_div.id = BT_VALUE.TABLE_BODY_DIV[0];
		table_body_div.style.marginTop = '1px';
		middle_bar.appendChild(table_body_div);
		let table_body = document.createElement('table');
		table_body.id = BT_VALUE.TABLE_BODY[0];
		table_body.border = '1';
		table_body_div.appendChild(table_body);
		let colgroup_body = colgroup_header.cloneNode(true);
		table_body.appendChild(colgroup_body);
		let tbody = document.createElement('tbody');
		tbody.id = BT_VALUE.TBODY[0];
		table_body.appendChild(tbody);
		let close_btn = create_Button(BT_VALUE.CLOSE_BUTTON, 'position: relative; float: right; margin-right: 10px; padding: 0 5px;', BT_VALUE.WRAP_DIV[0]);
		wrap_div.appendChild(close_btn);
		let status_bar = document.createElement('span');
		status_bar.id = BT_VALUE.STATUS_BAR[0];
		status_bar.innerText = BT_VALUE.STATUS_BAR[1];
		status_bar.style.marginLeft = '10px';
		wrap_div.appendChild(status_bar);
		return wrap_div
	}
	function create_Tool_Tag() {
		let wrap_div = create_Wrap_Div(TOOL_VALUE.WRAP_DIV);
		let main_fieldset = create_Main_Fieldsest(TOOL_VALUE.MAIN_FIELDSET);
		wrap_div.appendChild(main_fieldset);
		let headline_legend = document.createElement('legend');
		headline_legend.id = TOOL_VALUE.HEADLINE_LEGEND[0];
		headline_legend.innerText = TOOL_VALUE.HEADLINE_LEGEND[1];
		main_fieldset.appendChild(headline_legend);
		let left_bar = document.createElement('span');
		left_bar.id = TOOL_VALUE.LEFT_BAR[0];
		left_bar.style.float = 'left';
		main_fieldset.appendChild(left_bar);
		let left_title = document.createElement('div');
		left_title.id = TOOL_VALUE.LEFT_TITLE[0];
		left_title.innerText = TOOL_VALUE.LEFT_TITLE[1];
		left_bar.appendChild(left_title);
		let left_textarea = document.createElement('textarea');
		left_textarea.id = TOOL_VALUE.LEFT_TEXTAREA[0];
		left_textarea.className = 'userStyleTextarea';
		left_textarea.placeholder = TOOL_VALUE.LEFT_TEXTAREA[1];
		left_textarea.setAttribute('style', 'width: 372px; height: 500px; border: 1px solid #ccc;');
		left_bar.appendChild(left_textarea);
		let operate_bar = document.createElement('span');
		operate_bar.id = TOOL_VALUE.OPERATE_BAR[0];
		operate_bar.style.float = 'left';
		operate_bar.style.width = '100px';
		operate_bar.style.marginTop = '20px';
		main_fieldset.appendChild(operate_bar);
		operate_bar.appendChild(create_Operate_Button(TOOL_VALUE.BJX_ENCODE, baijia_Encode, 0));
		operate_bar.appendChild(create_Operate_Button(TOOL_VALUE.BJX_DECODE, baijia_Decode, 1));
		operate_bar.appendChild(create_Operate_Button(TOOL_VALUE.JZG_ENCODE, values_Encode, 0));
		operate_bar.appendChild(create_Operate_Button(TOOL_VALUE.JZG_DECODE, values_Decode, 1));
		operate_bar.appendChild(create_Operate_Button(TOOL_VALUE.YFLC_ENCODE, function(str) {
			set_Status_Bar(0, '编码中...');
			let encode_details = {
				'method': 'POST',
				'url': 'http://keyfc.net/bbs/tools/tudou.aspx',
				'data': 'orignalMsg=' + encodeURIComponent(str) + '&action=Encode',
				'headers': {
					'Content-Type': 'application/x-www-form-urlencoded'
				},
				'onload': function(res) {
					document.getElementById(TOOL_VALUE.RIGHT_TEXTAREA[0]).value = res.responseText.replace(/^<BUDDHIST><Message><!\[CDATA\[|\]\]><\/Message><\/BUDDHIST>$/g, '');
					set_Status_Bar(0, '编码完成!')
				},
				'onerror': function() {
					document.getElementById(TOOL_VALUE.RIGHT_TEXTAREA[0]).value = '编码出现错误!';
					set_Status_Bar(0, '编码完成!')
				}
			};
			GM_xmlhttpRequest(encode_details);
			return false
		}));
		operate_bar.appendChild(create_Operate_Button(TOOL_VALUE.YFLC_DECODE, function(str) {
			set_Status_Bar(0, '解码中...');
			let decode_details = {
				'method': 'POST',
				'url': 'http://keyfc.net/bbs/tools/tudou.aspx',
				'data': 'orignalMsg=' + str.replace(/\s/g, '') + '&action=Decode',
				'headers': {
					'Content-Type': 'application/x-www-form-urlencoded'
				},
				'onload': function(res) {
					document.getElementById(TOOL_VALUE.RIGHT_TEXTAREA[0]).value = res.responseText.replace(/^<BUDDHIST><Message><!\[CDATA\[|\]\]><\/Message><\/BUDDHIST>$/g, '');
					set_Status_Bar(0, '解码完成!')
				},
				'onerror': function() {
					document.getElementById(TOOL_VALUE.RIGHT_TEXTAREA[0]).value = '解码出现错误!';
					set_Status_Bar(0, '解码完成!')
				}
			};
			GM_xmlhttpRequest(decode_details);
			return false
		}));
		operate_bar.appendChild(create_Operate_Button(TOOL_VALUE.BASE64_ENCODE, function(str) {
			str = CryptoJS.enc.Utf8.parse(str);
			return CryptoJS.enc.Base64.stringify(str)
		}, 0));
		operate_bar.appendChild(create_Operate_Button(TOOL_VALUE.BASE64_DECODE, function(str) {
			let words = CryptoJS.enc.Base64.parse(str);
			return words.toString(CryptoJS.enc.Utf8)
		}, 1));
		operate_bar.appendChild(create_Operate_Button(TOOL_VALUE.BAIDU_QUERY, function(str) {
			set_Status_Bar(0, '查询提取码中...');
			let query_details = {
				'method': 'GET',
				'url': 'https://search.pandown.cn/api/query?surl=' + str.split('/').pop(),
				'responseType': 'json',
				'headers': {
					'Content-Type': 'application/x-www-form-urlencoded'
				},
				'onload': function(res) {
					if ((res.response.code === 0) && (res.response.data[0].password)) {
						document.getElementById(TOOL_VALUE.RIGHT_TEXTAREA[0]).value = res.response.data[0].password
					} else {
						console.log(res.response.message);
						document.getElementById(TOOL_VALUE.RIGHT_TEXTAREA[0]).value = '没有查询到提取码哦。'
					}
					set_Status_Bar(0, '查询提取码完成!')
				},
				'onerror': function() {
					document.getElementById(TOOL_VALUE.RIGHT_TEXTAREA[0]).value = '网络连接出问题啦。';
					set_Status_Bar(0, '查询提取码完成!')
				}
			};
			GM_xmlhttpRequest(query_details);
			return false
		}));
		let right_bar = document.createElement('span');
		right_bar.id = TOOL_VALUE.RIGHT_BAR[0];
		right_bar.style.float = 'right';
		main_fieldset.appendChild(right_bar);
		let right_title = document.createElement('div');
		right_title.id = TOOL_VALUE.RIGHT_TITLE[0];
		right_title.innerText = TOOL_VALUE.RIGHT_TITLE[1];
		right_bar.appendChild(right_title);
		let right_textarea = document.createElement('textarea');
		right_textarea.id = TOOL_VALUE.RIGHT_TEXTAREA[0];
		right_textarea.className = 'userStyleTextarea';
		right_textarea.placeholder = TOOL_VALUE.RIGHT_TEXTAREA[1];
		right_textarea.setAttribute('style', 'width: 372px; height: 500px; border: 1px solid #ccc;');
		right_bar.appendChild(right_textarea);
		let close_btn = create_Button(TOOL_VALUE.CLOSE_BUTTON, 'position: relative; float: right; margin-right: 10px; padding: 0 5px;', TOOL_VALUE.WRAP_DIV[0]);
		wrap_div.appendChild(close_btn);
		let copy_btn = create_Button(TOOL_VALUE.COPY_BUTTON, 'position: relative; float: right; margin-right: 10px; padding: 0 5px;', '', function() {
			GM_setClipboard(document.getElementById(TOOL_VALUE.RIGHT_TEXTAREA[0]).value, "text");
			set_Status_Bar(0, '复制成功!')
		});
		wrap_div.appendChild(copy_btn);
		let status_bar = document.createElement('span');
		status_bar.id = TOOL_VALUE.STATUS_BAR[0];
		status_bar.innerText = TOOL_VALUE.STATUS_BAR[1];
		status_bar.style.marginLeft = '10px';
		wrap_div.appendChild(status_bar);
		return wrap_div
	}
	function create_Setting_Tag() {
		let wrap_div = create_Wrap_Div(SETTING_VALUE.WRAP_DIV, 'position: fixed; top: 4vw; right: 2vw; z-index: 9999; text-align: left; display: block; padding: 0; margin: 0; border: 1px solid #a0a0a0; border-radius: 3px; color: #000; font-size: 13px; display: block;');
		let main_fieldset = create_Main_Fieldsest(SETTING_VALUE.MAIN_FIELDSET, 'border: 3px solid #ccc; border-radius: 3px; padding: 4px 9px 6px 9px; margin: 8px; min-width: 300px; width: auto; height: auto;');
		wrap_div.appendChild(main_fieldset);
		let headline_legend = document.createElement('legend');
		headline_legend.id = SETTING_VALUE.HEADLINE_LEGEND[0];
		let headline_link = document.createElement('a');
		headline_link.id = SETTING_VALUE.HEADLINE_LINK[0];
		headline_link.innerText = SETTING_VALUE.HEADLINE_LINK[1];
		headline_link.title = SETTING_VALUE.HEADLINE_LINK[2];
		headline_link.href = SETTING_VALUE.HEADLINE_LINK[3];
		headline_link.target = '_blank';
		let feedback_link = document.createElement('a');
		feedback_link.id = SETTING_VALUE.FEEDBACK_LINK[0];
		feedback_link.innerText = SETTING_VALUE.FEEDBACK_LINK[1];
		feedback_link.title = SETTING_VALUE.FEEDBACK_LINK[2];
		feedback_link.href = SETTING_VALUE.FEEDBACK_LINK[3];
		feedback_link.target = '_blank';
		feedback_link.style.marginLeft = '10px';
		feedback_link.style.color = 'blue';
		headline_legend.appendChild(headline_link);
		headline_legend.appendChild(feedback_link);
		main_fieldset.appendChild(headline_legend);
		let tag_ul = document.createElement('ul');
		tag_ul.id = SETTING_VALUE.TAG_UL[0];
		tag_ul.setAttribute('style', 'list-style: none; padding-left: 0;');
		main_fieldset.appendChild(tag_ul);
		insert_Checkbox(tag_ul, SETTING_VALUE.HIGHLIGHT_CHECKBOX, highlight_config.highlight_enable);
		insert_Input(tag_ul, SETTING_VALUE.AGREE_NUMBER_TEXT, SETTING_VALUE.AGREE_NUMBER_INPUT, highlight_config.agree_threshold);
		insert_Input(tag_ul, SETTING_VALUE.AGREE_COLOR_TEXT, SETTING_VALUE.AGREE_COLOR_INPUT, highlight_config.agree_color, SETTING_VALUE.AGREE_COLOR_EG);
		insert_Input(tag_ul, SETTING_VALUE.REPLY_NUMBER_TEXT, SETTING_VALUE.REPLY_NUMBER_INPUT, highlight_config.reply_threshold);
		insert_Input(tag_ul, SETTING_VALUE.REPLY_COLOR_TEXT, SETTING_VALUE.REPLY_COLOR_INPUT, highlight_config.reply_color, SETTING_VALUE.REPLY_COLOR_EG);
		let br = document.createElement('li');
		br.innerHTML = '------------------------------------------------------------------';
		br.style.textAlign = 'center';
		tag_ul.appendChild(br);
		insert_Checkbox(tag_ul, SETTING_VALUE.FLOAT_CHECKBOX, highlight_config.float_enable);
		insert_Checkbox(tag_ul, SETTING_VALUE.CLICK_CHECKBOX, highlight_config.click_enable);
		insert_Checkbox(tag_ul, SETTING_VALUE.EXTRACT_CHECKBOX, highlight_config.extract_enable);
		insert_Checkbox(tag_ul, SETTING_VALUE.COPY_CHECKBOX, highlight_config.copy_enable);
		insert_Checkbox(tag_ul, SETTING_VALUE.CHECK_CHECKBOX, highlight_config.check_enable);
		insert_Checkbox(tag_ul, SETTING_VALUE.QUERY_CHECKBOX, highlight_config.query_enable);
		insert_Checkbox(tag_ul, SETTING_VALUE.PANDOWNLOAD_CHECKBOX, highlight_config.pandownload_enable, true);
		let br_clone_1 = br.cloneNode(true);
		tag_ul.appendChild(br_clone_1);
		insert_Checkbox(tag_ul, SETTING_VALUE.NIGHT_CHECKBOX, highlight_config.night_btn_enable);
		insert_Checkbox(tag_ul, SETTING_VALUE.CODE_CHECKBOX, highlight_config.code_enable);
		insert_Checkbox(tag_ul, SETTING_VALUE.BT_CHECKBOX, highlight_config.bt_enable);
		let br_clone_2 = br.cloneNode(true);
		tag_ul.appendChild(br_clone_2);
		insert_Input(tag_ul, SETTING_VALUE.TEXT_COLOR_TEXT, SETTING_VALUE.TEXT_COLOR_INPUT, highlight_config.text_color, SETTING_VALUE.TEXT_COLOR_EG);
		insert_Input(tag_ul, SETTING_VALUE.LINK_COLOR_TEXT, SETTING_VALUE.LINK_COLOR_INPUT, highlight_config.link_color, SETTING_VALUE.LINK_COLOR_EG);
		let br_clone_3 = br.cloneNode(true);
		tag_ul.appendChild(br_clone_3);
		let save_button = create_Button(SETTING_VALUE.SAVE_BUTTON, 'position: relative; float: right; margin-right: 5px; margin-top: 5px; padding: 0 5px;', '', function() {
			highlight_config.highlight_enable = document.getElementById(SETTING_VALUE.HIGHLIGHT_CHECKBOX[0]).checked;
			highlight_config.agree_threshold = document.getElementById(SETTING_VALUE.AGREE_NUMBER_INPUT[0]).value;
			highlight_config.agree_color = document.getElementById(SETTING_VALUE.AGREE_COLOR_INPUT[0]).value;
			highlight_config.reply_threshold = document.getElementById(SETTING_VALUE.REPLY_NUMBER_INPUT[0]).value;
			highlight_config.reply_color = document.getElementById(SETTING_VALUE.REPLY_COLOR_INPUT[0]).value;
			highlight_config.copy_enable = document.getElementById(SETTING_VALUE.COPY_CHECKBOX[0]).checked;
			highlight_config.text_color = document.getElementById(SETTING_VALUE.TEXT_COLOR_INPUT[0]).value;
			highlight_config.link_color = document.getElementById(SETTING_VALUE.LINK_COLOR_INPUT[0]).value;
			highlight_config.float_enable = document.getElementById(SETTING_VALUE.FLOAT_CHECKBOX[0]).checked;
			highlight_config.extract_enable = document.getElementById(SETTING_VALUE.EXTRACT_CHECKBOX[0]).checked;
			highlight_config.pandownload_enable = document.getElementById(SETTING_VALUE.PANDOWNLOAD_CHECKBOX[0]).checked;
			highlight_config.query_enable = document.getElementById(SETTING_VALUE.QUERY_CHECKBOX[0]).checked;
			highlight_config.code_enable = document.getElementById(SETTING_VALUE.CODE_CHECKBOX[0]).checked;
			highlight_config.bt_enable = document.getElementById(SETTING_VALUE.BT_CHECKBOX[0]).checked;
			highlight_config.click_enable = document.getElementById(SETTING_VALUE.CLICK_CHECKBOX[0]).checked;
			highlight_config.check_enable = document.getElementById(SETTING_VALUE.CHECK_CHECKBOX[0]).checked;
			highlight_config.night_btn_enable = document.getElementById(SETTING_VALUE.NIGHT_CHECKBOX[0]).checked;
			GM_setValue('highlight_config', highlight_config);
			location.reload()
		});
		tag_ul.appendChild(save_button);
		let cancel_button = create_Button(SETTING_VALUE.CANCEL_BUTTON, 'position: relative; float: left; margin-left: 5px; margin-top:5px; padding: 0 5px;', SETTING_VALUE.WRAP_DIV[0]);
		tag_ul.appendChild(cancel_button);
		return wrap_div
	}
	function filter(selector, filter_function) {
		let elements = document.querySelectorAll(selector);
		let out = [];
		for (let i = 0; i < elements.length; i++) {
			if (filter_function(elements[i])) {
				out.push(elements[i])
			}
		}
		return out
	}
	function create_Switch_Span(key_value, dom_array) {
		let switch_span = document.createElement('span');
		switch_span.className = 'o';
		switch_span.style.float = 'right';
		switch_span.style.cursor = 'pointer';
		let switch_img = document.createElement('img');
		switch_img.id = key_value + '_user_img';
		switch_img.title = '收起/展开';
		switch_img.alt = '收起/展开';
		if (highlight_config[key_value]) {
			dom_array.forEach(function(item) {
				item.style.display = 'none'
			});
			switch_img.src = COLLAPSED_IMG.YES
		} else {
			switch_img.src = COLLAPSED_IMG.NO
		}
		switch_img.addEventListener('click', function() {
			if (highlight_config[key_value]) {
				dom_array.forEach(function(item) {
					item.style.display = ''
				});
				switch_img.src = COLLAPSED_IMG.NO;
				highlight_config[key_value] = false
			} else {
				dom_array.forEach(function(item) {
					item.style.display = 'none'
				});
				switch_img.src = COLLAPSED_IMG.YES;
				highlight_config[key_value] = true
			}
			GM_setValue('highlight_config', highlight_config)
		});
		switch_span.appendChild(switch_img);
		return switch_span
	}
	function init() {
		let old_url = location.href;
		if (check_Mobile_Page()) {
			GM_addStyle(CON_STYLE);
			if (highlight_config.highlight_enable) {
				if ((old_url.indexOf('mod=forumdisplay') !== -1) || (/forum-\d+-\d+\.html/i.test(old_url))) {
					let li_btn = document.querySelector('.threadlist').getElementsByTagName('li');
					for (let li_index = 0; li_index < li_btn.length; li_index++) {
						let reply_num = li_btn[li_index].querySelector('span.num.icon.iconfont').innerText;
						if (reply_num) {
							reply_num = Number(/\d+/.exec(reply_num)[0]);
							if (reply_num >= highlight_config.reply_threshold) {
								li_btn[li_index].querySelector('div.thread-item-sub').setAttribute('style', 'font-weight: bold; color: ' + highlight_config.reply_color + ';')
							}
						}
					}
				}
			}
			if ((old_url.indexOf('mod=viewthread') !== -1) || (/thread-\d+-\d+(?:-\d+)?\.html/i.test(old_url))) {
				let message_img = document.querySelectorAll('div.message img');
				for (let img_index = 0; img_index < message_img.length; img_index++) {
					if (message_img[img_index].width === 224) {
						message_img[img_index].removeAttribute('height')
					}
				}
				let message_btn = document.getElementsByClassName('message');
				for (let btn_index = 0; btn_index < message_btn.length; btn_index++) {
					create_Good_Boy_Button(message_btn[btn_index], btn_index, find_Link(message_btn[btn_index]), display_Text(message_btn[btn_index], highlight_config.text_color, '#efefef'), analysis_Text(message_btn[btn_index]))
				}
			}
			Promise.all([GM_getValue('check_date')]).then(function(data) {
				if (data[0] !== undefined) {
					check_date = data[0]
				}
				let now_date = get_Now_Date();
				if (now_date !== check_date) {
					GM_setValue('check_date', now_date);
					if (document.querySelectorAll('.bg > a').length !== 0) {
						let check_btn = document.querySelectorAll('.bg > a')[0];
						if (check_btn.text() === '签到领奖') {
							check_btn.click()
						}
					}
				}
			})
		} else {
			if (highlight_config.night_enable) {
				GM_addStyle(NIGHT_STYLE)
			} else {
				GM_addStyle(CON_STYLE)
			}
			let html_background_color = window.getComputedStyle(document.body).backgroundColor;
			if (highlight_config.night_btn_enable) {
				document.getElementById('sslct').after(create_Night_Icon())
			}
			if (highlight_config.code_enable) {
				document.getElementById('scrolltop').appendChild(create_Icon(TOOL_ICON, '30px', TOOL_VALUE.WRAP_DIV[0], BT_VALUE.WRAP_DIV[0], create_Tool_Tag))
			}
			let bt_top = '30px';
			if (document.getElementsByClassName('codeTool').length > 0) {
				bt_top = '60px'
			}
			if (highlight_config.bt_enable) {
				document.getElementById('scrolltop').appendChild(create_Icon(BT_ICON, bt_top, BT_VALUE.WRAP_DIV[0], TOOL_VALUE.WRAP_DIV[0], create_Bt_Tag))
			}
			if ((old_url.indexOf('mod=forumdisplay') !== -1) || (/forum-\d+-\d+\.html/i.test(old_url))) {
				try {
					if (document.querySelectorAll('div.bm.bml.pbn').length === 2) {
						let type_btn = document.querySelectorAll('div.bm.bml.pbn')[1];
						let main_type_div_btn = type_btn.getElementsByTagName('div');
						let type_array = [];
						for (let type_index = 1; type_index < main_type_div_btn.length; type_index++) {
							type_array.push(main_type_div_btn[type_index])
						}
						main_type_div_btn[0].appendChild(create_Switch_Span('collapsed_fxzm_enable', type_array))
					}
				} catch (e) {
					console.log(e)
				}
				try {
					if ((document.querySelectorAll('div.bm_h.cl').length === 2) && (document.querySelectorAll('span.o').length === 1)) {
						let theme_btn = document.querySelectorAll('div.bm_h.cl')[1];
						let theme_array = [];
						theme_array.push(document.querySelectorAll('div.bm_c.cl')[1]);
						theme_btn.insertBefore(create_Switch_Span('collapsed_gwwz_enable', theme_array), theme_btn.childNodes[0])
					}
				} catch (e) {
					console.log(e)
				}
				if (highlight_config.highlight_enable) {
					highlight_Post();
					try {
						let observer = new MutationObserver(function() {
							highlight_Post()
						});
						let listener_container = document.body;
						let option = {
							'childList': true,
							'subtree': true
						};
						observer.observe(listener_container, option)
					} catch (e) {
						console.log(e)
					}
				}
			}
			if ((old_url.indexOf('mod=viewthread') !== -1) || (/thread-\d+-\d+(?:-\d+)?\.html/i.test(old_url))) {
				let t_f_img = document.querySelectorAll('td.t_f img');
				for (let t_f_img_index = 0; t_f_img_index < t_f_img.length; t_f_img_index++) {
					let base_src = t_f_img[t_f_img_index].getAttribute('file');
					if (BASE_IMAGE_REG.test(base_src)) {
						base_src = base_src.replace(BASE_IMAGE_REG, '$1');
						t_f_img[t_f_img_index].setAttribute('file', base_src);
						t_f_img[t_f_img_index].src = base_src
					}
				}
				let t_f_zoom = document.querySelectorAll('.t_f img.zoom');
				for (let t_f_zoom_index = 0; t_f_zoom_index < t_f_zoom.length; t_f_zoom_index++) {
					t_f_zoom[t_f_zoom_index].removeAttribute('height')
				}
				let td_btn = document.querySelectorAll('td.t_f');
				if (highlight_config.float_enable) {
					let favatar_btn = filter('div.favatar', function(ele) {
						return ele.closest('tbody').querySelectorAll('td div.locked').length === 0
					});
					for (let j = 0; j < td_btn.length; j++) {
						create_Good_Boy_Button(favatar_btn[j], j, find_Link(td_btn[j]), display_Text(td_btn[j], highlight_config.text_color, html_background_color), analysis_Text(td_btn[j]), true)
					}
				} else {
					let main_btn = document.querySelectorAll('div.cm');
					for (let k = 0; k < td_btn.length; k++) {
						create_Good_Boy_Button(main_btn[k], k, find_Link(td_btn[k]), display_Text(td_btn[k], highlight_config.text_color, html_background_color), analysis_Text(td_btn[k]))
					}
				}
				if (highlight_config.click_enable) {
					document.querySelector('.cm').arrive('.buttona', {
						fireOnAttributesModification: true,
						onceOnly: true,
						existing: true
					}, function() {
						let click_status = true;
						let uid_href = document.querySelector('.vwmy a').href;
						let uid = /&uid=(\d+)/.exec(uid_href)[1];
						let ratl_l = document.querySelectorAll('.ratl_l tr');
						for (let ra = 0; ra < ratl_l.length; ra++) {
							let rate_id = ratl_l[ra].id.replace(/rate_\d+_/, '');
							if (rate_id === uid) {
								click_status = false;
								break
							}
						}
						if (click_status) {
							document.querySelector(".buttona").click();
							if (document.querySelectorAll('.ratl_l tr').length > ratl_l.length) {
								location.reload()
							} else {
								document.querySelector('#postlist > div').leave('.t_f', function() {
									location.reload()
								})
							}
						}
					})
				}
				let sign_a = document.querySelectorAll('div.sign a');
				for (let sign_index = 0; sign_index < sign_a.length; sign_index++) {
					if (/member\.php\?mod=logging&action=logout/i.test(sign_a[sign_index].href)) {
						sign_a[sign_index].style.display = 'none'
					}
				}
			}
			let check_btn = document.getElementById('fx_checkin_topb');
			if (check_btn.getElementsByTagName('img')[0].alt !== '已签到') {
				check_btn.click()
			}
		}
	}
	Promise.all([GM_getValue('highlight_config')]).then(function(data) {
		if (data[0] !== undefined) {
			highlight_config = data[0]
		}
		try {
			GM_registerMenuCommand('好孩子看得见 - 设置', function() {
				if (document.getElementById(SETTING_VALUE.WRAP_DIV[0])) {
					if (document.getElementById(SETTING_VALUE.WRAP_DIV[0]).style.display === 'none') {
						document.getElementById(SETTING_VALUE.WRAP_DIV[0]).style.display = 'block'
					} else {
						document.getElementById(SETTING_VALUE.WRAP_DIV[0]).style.display = 'none'
					}
				} else {
					let hd = document.getElementById('hd');
					if (hd) {
						hd.appendChild(create_Setting_Tag())
					} else {
						let header = document.getElementsByClassName('header')[0];
						if (header) {
							header.appendChild(create_Setting_Tag())
						}
					}
				}
			})
		} catch (e) {
			console.log(e)
		}
		init()
	}).
	catch (function(except) {
		console.log(except)
	})
})();