From c12d9ee045b84addeaa87d8d60b82d848d3e9aa8 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 29 Jun 2021 18:14:52 +0800 Subject: [PATCH 0001/2070] =?UTF-8?q?=E9=80=82=E9=85=8D=20[=E4=B8=8E?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=90=8C=E6=AD=A5]=20=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E6=B7=B1=E8=89=B2=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GithubEnhanced-High-Speed-Download.user.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index 7487bf8b2..ba808dc3b 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Github 增强 - 高速下载 -// @version 1.5.3 +// @version 1.5.4 // @author X.I.U // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) // @match *://github.com/* @@ -20,18 +20,27 @@ (function() { var backColor = '#ffffff'; var fontColor = '#888888'; - if (document.getElementsByTagName('html')[0].getAttribute('data-color-mode') == 'dark') { // 黑暗模式判断 - if (document.getElementsByTagName('html')[0].getAttribute('data-dark-theme') == 'dark_dimmed') { + if (document.getElementsByTagName('html')[0].getAttribute('data-color-mode') === 'dark') { // 黑暗模式判断 + if (document.getElementsByTagName('html')[0].getAttribute('data-dark-theme') === 'dark_dimmed') { backColor = '#272e37'; fontColor = '#768390'; } else { backColor = '#161a21'; fontColor = '#b2b8bf'; } + } else if (document.getElementsByTagName('html')[0].getAttribute('data-color-mode') === 'auto') { + console.log(window.getComputedStyle(document.body).backgroundColor) + if (window.getComputedStyle(document.body).backgroundColor === 'rgb(34, 39, 46)') { + backColor = '#272e37'; + fontColor = '#768390'; + } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(13, 17, 23)') { + backColor = '#161a21'; + fontColor = '#b2b8bf'; + } } -//['https://gh.66ccff.work', '美国'], -//['https://github.91chifun.workers.dev', '美国'], -//['https://github.rc1844.workers.dev', '美国'], + //['https://gh.66ccff.work', '美国'], + //['https://github.91chifun.workers.dev', '美国'], + //['https://github.rc1844.workers.dev', '美国'], var download_url = [ ['https://gh.api.99988866.xyz', '美国'], ['https://gh.msx.workers.dev', '美国'], From a878f90077a2530cac1e9560e6e7ce8a7e41efb3 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 1 Jul 2021 14:29:13 +0800 Subject: [PATCH 0002/2070] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=AD=BE=E5=88=B0=EF=BC=88=E8=AE=BF=E9=97=AE=E7=A9=BA?= =?UTF-8?q?=E9=97=B4=EF=BC=89]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 0f89b1486..f65a00bc8 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.2.5 +// @version 1.2.6 // @author X.I.U // @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 // @match *://hostloc.com/* @@ -187,17 +187,18 @@ // 自动签到(访问空间 10 次 = 20 积分) function autoSignIn() { if (!loginStatus) return - if (GM_getValue('menu_signingIn')) return + //if (GM_getValue('menu_signingIn')) return let timeNow = new Date().getFullYear() + "/" + (new Date().getMonth() + 1) + "/" + new Date().getDate(), timeOld = GM_getValue('menu_signInTime'); if (!timeOld || timeOld != timeNow) { // 是新的一天 + GM_setValue('menu_signInTime', timeNow); // 写入签到时间以供后续比较 GM_notification({text: '请不要关闭/刷新本页!耐心等待 60 秒~\n在此期间可以在 "其他标签页" 浏览论坛!', timeout: 10000}); let url_list = [], url = 0; // 随机生成 12 个空间地址(2 个冗余) for(let i = 0;i < 12;i++){url_list[i] = "https://" + location.host + "/space-uid-" + Math.floor(Math.random()*(50000-10000+1)+10000) + ".html";} // 每 5 秒访问一次(避免触发网站防御机制) - GM_setValue('menu_signingIn', true); + //GM_setValue('menu_signingIn', true); let signIn = setInterval(function(){ GM_xmlhttpRequest({ url: url_list[url++], @@ -206,11 +207,11 @@ }); console.log(`[全球主机交流论坛 增强] 金钱 +2 (${url_list[url]})`); if (url === 11) { // 次数够了就取消定时循环 + clearInterval(signIn); + //GM_setValue('menu_signingIn', false); + //GM_setValue('menu_signInTime', timeNow); // 写入签到时间以供后续比较 console.log('[全球主机交流论坛 增强] 签到完成!'); GM_notification({text: '签到完成!金钱 +20 ~', timeout: 3500}); - GM_setValue('menu_signingIn', false); - GM_setValue('menu_signInTime', timeNow); // 写入签到时间以供后续比较 - clearInterval(signIn); } }, 5000); }/* else { // 新旧签到时间一致 @@ -221,7 +222,7 @@ // 重新签到 function reAutoSignIn() { - GM_setValue('menu_signingIn', false); + //GM_setValue('menu_signingIn', false); GM_setValue('menu_signInTime', '1970/1/1'); location.reload(); // 刷新网页 } From f203a1a30c805f283b5661368ebd93db12840c0a Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 2 Jul 2021 23:01:32 +0800 Subject: [PATCH 0003/2070] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=9C=A8=20fast?= =?UTF-8?q?git=20=E9=95=9C=E5=83=8F=E7=AB=99=E6=97=B6=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E5=8A=A0=E9=80=9F=E6=BA=90=20URL=20=E6=9C=89=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GithubEnhanced-High-Speed-Download.user.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index ba808dc3b..280825532 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Github 增强 - 高速下载 -// @version 1.5.4 +// @version 1.5.5 // @author X.I.U // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) // @match *://github.com/* @@ -143,7 +143,7 @@ } Array.from(html).forEach(function (current) { current.querySelectorAll('.d-flex.Box-body > a').forEach(function (_this) { - let href = _this.href.split('github.com'), + let href = _this.href.split(location.host), url = [], _html = `
`; @@ -153,6 +153,7 @@ } else { url[i] = download_url[i][0] + '/' + _this.href } + if (location.host === 'hub.fastgit.org') url[i] = url[i].replace('hub.fastgit.org','github.com') } for (let i=0;i a').forEach(function (_this) { - let href = _this.href.split('github.com'), + let href = _this.href.split(location.host), url = [], _html = `
`; @@ -177,6 +178,7 @@ } else { url[i] = download_url[i][0] + '/' + _this.href } + if (location.host === 'hub.fastgit.org') url[i] = url[i].replace('hub.fastgit.org','github.com') } for (let i=0;i Date: Wed, 7 Jul 2021 21:33:04 +0800 Subject: [PATCH 0004/2070] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E7=94=A8=E6=88=B7=EF=BC=88=E9=BB=91=E5=90=8D=E5=8D=95?= =?UTF-8?q?=EF=BC=89]=20=E6=94=AF=E6=8C=81=E9=A2=84=E8=A7=88=E5=B8=96?= =?UTF-8?q?=E5=AD=90=E4=B8=AD=E7=9A=84=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index f65a00bc8..1bac3f6b1 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.2.6 +// @version 1.2.7 // @author X.I.U // @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 // @match *://hostloc.com/* @@ -99,7 +99,7 @@ thread: { SiteTypeID: 2, pager: { - nextLink: '//div[@id="pgt"]//a[contains(text(),"下一页")][@href]', + nextLink: '//a[@class="nxt"][@href]', pageElement: 'css;div#postlist > div[id^="post_"]', HT_insert: ['css;div#postlist', 2], replaceE: 'css;div.pg', @@ -108,7 +108,7 @@ guide: { SiteTypeID: 3, pager: { - nextLink: '//div[@id="pgt"]//a[contains(text(),"下一页")][@href]', + nextLink: '//a[@class="nxt"][@href]', pageElement: 'css;div#threadlist div.bm_c table > tbody[id^="normalthread_"]', HT_insert: ['css;div#threadlist div.bm_c table', 2], replaceE: 'css;div.pg', @@ -254,6 +254,7 @@ break; case 'forum': // 各版块帖子列表 blockUsers_('[id^="normalthread_"]', 'a[href^="space-uid"]'); + blockUsers_vfastpost(); // 预览帖子中的回复 break; case 'search': // 搜索结果 blockUsers_('.pbw', 'a[href^="space-uid"]'); @@ -279,6 +280,25 @@ }) }) } + + function blockUsers_vfastpost() { + let vfastpost = e => { + if (e.target.innerHTML && e.target.innerHTML.indexOf('id="vfastpost"') > -1) { + let listItem = e.target.querySelectorAll('[id^="post_"]'); + if (listItem.length < 1) return + listItem.forEach(function(item){ // 遍历所有回复 + menu_value('menu_customBlockUsers').forEach(function(item1){ // 遍历用户黑名单 + let itemName = item.querySelector('a.xi2'); // 寻找用户名 + if (itemName && itemName.innerText === item1) { + console.log(`屏蔽用户:${item1}`); + item.remove(); // 删除回复 + } + }) + }) + } + } + document.addEventListener('DOMNodeInserted', vfastpost); // 监听插入事件 + } } From 4eeed976cab6d6d5c98d611f0c3b03a79b0c3623 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 8 Jul 2021 22:09:02 +0800 Subject: [PATCH 0005/2070] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Beautification.user.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index 2c87cf87b..f044538a4 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎美化 -// @version 1.2.4 +// @version 1.2.5 // @author X.I.U // @description 宽屏显示、暗黑模式(4种)、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致、屏蔽登录提示 // @match *://www.zhihu.com/* @@ -281,13 +281,13 @@ html {filter: brightness(75%) sepia(30%) !important; background-image: url();} if (menu_value('menu_darkModeType') === 1) { if (getTheme() === 'light') { document.cookie="theme=dark; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/"; - document.getElementsByTagName('html')[0].setAttribute('data-theme', 'dark'); + document.lastChild.setAttribute('data-theme', 'dark'); location.reload(); // 刷新网页 } } else { if (getTheme() === 'dark') { document.cookie="theme=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"; - document.getElementsByTagName('html')[0].setAttribute('data-theme', 'light'); + document.lastChild.setAttribute('data-theme', 'light'); location.reload(); // 刷新网页 } if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { @@ -313,7 +313,7 @@ html {filter: brightness(75%) sepia(30%) !important; background-image: url();} } else { if (getTheme() === 'dark'){ document.cookie="theme=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"; - document.getElementsByTagName('html')[0].setAttribute('data-theme', 'light'); + document.lastChild.setAttribute('data-theme', 'light'); location.reload(); // 刷新网页 } } @@ -345,7 +345,7 @@ html {filter: brightness(75%) sepia(30%) !important; background-image: url();} } } - style_Add.innerHTML = style; + /*style_Add.innerHTML = style; if (document.head) { document.head.appendChild(style_Add); } else { @@ -355,6 +355,17 @@ html {filter: brightness(75%) sepia(30%) !important; background-image: url();} clearInterval(timer); } }, 1); + }*/ + + if (document.lastChild) { + document.lastChild.appendChild(style_Add).textContent = style; + } else { // 避免网站加载速度太慢的备用措施 + let timer1 = setInterval(function(){ // 每 5 毫秒检查一下 html 是否已存在 + if (document.lastChild) { + clearInterval(timer1); // 取消定时器 + document.lastChild.appendChild(style_Add).textContent = style; + } + }, 5); } } function getTheme() { From 10c35bc4610ce2eb093120d67666aa1e1c0a07fb Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 8 Jul 2021 23:22:09 +0800 Subject: [PATCH 0006/2070] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index bb4279e31..8f6a3bad0 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.1.2 +// @version 1.1.3 // @author X.I.U // @description 简单有效的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -26,7 +26,7 @@ ['menu_runDuringTheDay', '白天保持开启 (比晚上亮一点点)', '白天保持开启', true], ['menu_autoRecognition', '排除自带暗黑模式的网页 (beta)', '排除自带暗黑模式的网页 (beta)', true], ['menu_darkModeType', '点击切换模式', '点击切换模式', 1] - ], menu_ID = [], websiteList = ['rarbgprx.org','fitgirl-repacks.site','masquerade.site']; + ], menu_ID = [], websiteList = ['rarbgprx.org','fitgirl-repacks.site','masquerade.site','www.gamersky.com']; for (let i=0;i -1) { @@ -141,6 +141,7 @@ break; } style_Add.id = 'XIU2DarkMode'; + style_Add.type = 'text/css'; //console.log(document,document.lastChild,document.querySelector('html')) if (document.lastChild) { document.lastChild.appendChild(style_Add).textContent = style; @@ -212,6 +213,16 @@ } } }, 3000);*/ + + // 解决远景论坛会清理掉前面插入的 CSS 样式的问题 + if (location.hostname === 'bbs.pcbeta.com') { + let timer1 = setInterval(function(){ + if (!document.getElementById('XIU2DarkMode')) { + document.lastChild.appendChild(style_Add).textContent = style; + clearInterval(timer1); + } + }, 10); + } } // 获取背景颜色值 From 805657555234e8f3ce710f5b1ba7b0e75a83dbbb Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 10 Jul 2021 01:17:29 +0800 Subject: [PATCH 0007/2070] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=9B=9E?= =?UTF-8?q?=E5=B8=96=E5=B0=8F=E5=B0=BE=E5=B7=B4]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 66 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 1bac3f6b1..841ef4ba7 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.2.7 +// @version 1.2.8 // @author X.I.U -// @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 +// @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、回帖小尾巴、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 // @match *://hostloc.com/* // @match *://91ai.net/* // @icon https://www.hostloc.com/favicon.ico @@ -26,6 +26,7 @@ ['menu_customBlockUsers', '自定义屏蔽用户', '自定义屏蔽用户', []], ['menu_blockKeywords', '屏蔽关键词(帖子标题)', '屏蔽关键词(帖子标题)', false], ['menu_customBlockKeywords', '自定义屏蔽关键词', '自定义屏蔽关键词', []], + ['menu_customLittleTail', '自定义小尾巴内容', '自定义小尾巴内容', []], ['menu_pageLoading', '自动无缝翻页(总开关)', '自动无缝翻页', true], ['menu_thread_pageLoading', '帖子内自动翻页', '帖子内自动翻页', true], ['menu_backToTop', '快捷回到顶部(右键点击两侧空白处)', '快捷回到顶部', true], @@ -54,6 +55,8 @@ menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){customBlockUsers()}); } else if (menu_ALL[i][0] === 'menu_customBlockKeywords') { menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){customBlockKeywords()}); + } else if (menu_ALL[i][0] === 'menu_customLittleTail') { + menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){customLittleTail()}); } else { menu_ID[i] = GM_registerMenuCommand(`[ ${menu_ALL[i][3]?'√':'×'} ] ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)}); } @@ -156,6 +159,7 @@ showPosts(); // 自动显示帖子内被隐藏的回复 blockUsers('thread'); // 屏蔽用户(黑名单) if (menu_value('menu_onlineStatus')) onlineStatus(); // 显示是否在线 + littleTail('thread'); // 小尾巴 } else if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1) { // 各板块帖子列表 curSite = DBSite.forum; if (menu_value('menu_collapsedNowPost')) collapsedNowPost(); // 收起当前帖子预览(左键左右两侧空白处) @@ -163,6 +167,7 @@ blockUsers('forum'); // 屏蔽用户(黑名单) blockKeywords(); // 屏蔽关键词(帖子标题) vfastpostDOMNodeInserted(); // 监听插入事件(预览快速回复带签名) + littleTail('forum'); // 小尾巴 if (patt_forum.test(location.pathname)) blockDOMNodeInserted(); //监听插入事件(有新的回复主题,点击查看) }else if (patt_guide.test(location.search)) { // 导读帖子列表 curSite = DBSite.guide; @@ -171,10 +176,12 @@ blockUsers('search'); // 屏蔽用户(黑名单) } else if(location.pathname === '/home.php' && location.search.indexOf('mod=space&do=notice&view=mypost') > -1) { // 消息(帖子/点评/提到) blockUsers('notice'); // 屏蔽用户(黑名单) - } else if(location.pathname === '/home.php' && location.search === '?mod=space&do=pm') { // 消息(私人聊天) + } else if(location.pathname === '/home.php' && location.search.indexOf('mod=space&do=pm') > -1) { // 消息(私人聊天) blockUsers('pm'); // 屏蔽用户(黑名单) - } else if(location.pathname === '/forum.php' && location.search === '?mod=guide&view=my&type=reply') { // 我的帖子:回复 + } else if(location.pathname === '/forum.php' && location.search.indexOf('mod=guide&view=my&type=reply') > -1) { // 我的帖子:回复 curSite = DBSite.myreply; + } else if(location.pathname === '/forum.php' && location.search.indexOf('mod=post&action=reply') > -1) { // 回复:高级回复 + littleTail('reply'); // 小尾巴 } curSite.pageUrl = ""; // 下一页URL @@ -360,6 +367,57 @@ } + // 自定义小尾巴内容 + function customLittleTail() { + let newLittleTail = prompt('编辑 [自定义小尾巴内容],刷新网页后生效\n(换行请使用 \\n 例如:我是第一行~\\n我是第二行~', GM_getValue('menu_customLittleTail')); + if (newLittleTail === '') { + GM_setValue('menu_customLittleTail', []); + registerMenuCommand(); // 重新注册脚本菜单 + } else if (newLittleTail != null) { + GM_setValue('menu_customLittleTail', newLittleTail); + registerMenuCommand(); // 重新注册脚本菜单 + } + }; + + + // 小尾巴 + function littleTail(type) { + if (!menu_value('menu_customLittleTail')) return + switch(type) { + case 'forum': // 各版块帖子列表的预览帖子 + littleTail_1(); + break; + case 'thread': // 帖子内 + littleTail_1(); + littleTail_2(); + break; + case 'reply': // 高级回复 + littleTail_3(); + break; + } + + function littleTail_1() { + let floatlayout_reply = e => { + if (e.target.innerHTML && e.target.innerHTML.indexOf('id="floatlayout_reply"') > -1) { + document.getElementById('postsubmit').onclick = function(){document.getElementById('postmessage').value += GM_getValue('menu_customLittleTail').replaceAll('\\n', '\n');} + } + } + document.addEventListener('DOMNodeInserted', floatlayout_reply); // 监听插入事件 + } + + function littleTail_2() { // 帖子底部的回复框 + document.getElementById('fastpostsubmit').onclick = function(){document.getElementById('fastpostmessage').value += GM_getValue('menu_customLittleTail').replaceAll('\\n', '\n');} + } + + function littleTail_3() { + let postsubmit = document.getElementById('postsubmit'); + if (postsubmit && postsubmit.innerText === '\n参与/回复主题\n') { + postsubmit.onclick = function(){document.getElementById('e_textarea').value += GM_getValue('menu_customLittleTail').replaceAll('\\n', '\n');} + } + } + } + + // 监听插入事件(回帖间隔) /*function replyIntervalDOMNodeInserted() { let replyInterval = e => { From 05057585689173c9b88140d566ac25496c1061d6 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 10 Jul 2021 01:25:11 +0800 Subject: [PATCH 0008/2070] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=9B=9E?= =?UTF-8?q?=E5=B8=96=E5=B0=8F=E5=B0=BE=E5=B7=B4]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 841ef4ba7..6bf07a489 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -180,7 +180,7 @@ blockUsers('pm'); // 屏蔽用户(黑名单) } else if(location.pathname === '/forum.php' && location.search.indexOf('mod=guide&view=my&type=reply') > -1) { // 我的帖子:回复 curSite = DBSite.myreply; - } else if(location.pathname === '/forum.php' && location.search.indexOf('mod=post&action=reply') > -1) { // 回复:高级回复 + } else if(location.pathname === '/forum.php' && location.search.indexOf('mod=post&action=reply') > -1 || location.pathname === '/forum.php' && location.search.indexOf('mod=post&action=newthread') > -1) { // 回复:高级回复 littleTail('reply'); // 小尾巴 } @@ -411,7 +411,7 @@ function littleTail_3() { let postsubmit = document.getElementById('postsubmit'); - if (postsubmit && postsubmit.innerText === '\n参与/回复主题\n') { + if (postsubmit && postsubmit.innerText === '\n参与/回复主题\n' || postsubmit && postsubmit.innerText === '\n发表帖子\n') { postsubmit.onclick = function(){document.getElementById('e_textarea').value += GM_getValue('menu_customLittleTail').replaceAll('\\n', '\n');} } } From 9d68b6576c42108cb93370c1a013f399d678a9cb Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 10 Jul 2021 10:00:56 +0800 Subject: [PATCH 0009/2070] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=9B=9E?= =?UTF-8?q?=E5=B8=96=E5=B0=8F=E5=B0=BE=E5=B7=B4]=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E5=B8=96=E5=AD=90=E5=BA=95=E9=83=A8=E7=9A=84?= =?UTF-8?q?=E5=BF=AB=E9=80=9F=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 6bf07a489..d3d9cf03c 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.2.8 +// @version 1.2.9 // @author X.I.U // @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、回帖小尾巴、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 // @match *://hostloc.com/* @@ -369,7 +369,7 @@ // 自定义小尾巴内容 function customLittleTail() { - let newLittleTail = prompt('编辑 [自定义小尾巴内容],刷新网页后生效\n(换行请使用 \\n 例如:我是第一行~\\n我是第二行~', GM_getValue('menu_customLittleTail')); + let newLittleTail = prompt('编辑 [自定义小尾巴内容],刷新网页后生效(换行请使用 \\n\n提示①:记得在小尾巴前面加上几个 \\n 换行,用来分隔开回帖内容~\n提示②:建议使用 [align=right] 标签来使小尾巴居右~\n提示③:支持论坛富文本标签(建议先找个回复编辑预览好~\n示例:\\n\\n\\n\\n[align=right]第一行内容~\\n第二行内容~[/align]', GM_getValue('menu_customLittleTail')); if (newLittleTail === '') { GM_setValue('menu_customLittleTail', []); registerMenuCommand(); // 重新注册脚本菜单 @@ -385,17 +385,29 @@ if (!menu_value('menu_customLittleTail')) return switch(type) { case 'forum': // 各版块帖子列表的预览帖子 - littleTail_1(); + littleTail_0(); // 预览帖子 快速回复(底部) + littleTail_1(); // 预览帖子 回复(悬浮) break; case 'thread': // 帖子内 - littleTail_1(); - littleTail_2(); + littleTail_1(); // 快速回复(悬浮) + littleTail_2(); // 回复框(底部) break; case 'reply': // 高级回复 littleTail_3(); break; } + function littleTail_0() { + let vfastpost = e => { + if (e.target.innerHTML && e.target.innerHTML.indexOf('id="vfastpost"') > -1) { + let message = e.target.querySelector('input[name="message"]'), id = message.id.match(/\d+/g)[0]; + message.parentNode.innerHTML = `` + document.getElementById(`vreplysubmit_${id}`).onclick = function(){document.getElementById(`vmessage_${id}`).value += GM_getValue('menu_customLittleTail').replaceAll('\\n', '\n');} + } + } + document.addEventListener('DOMNodeInserted', vfastpost); // 监听插入事件 + } + function littleTail_1() { let floatlayout_reply = e => { if (e.target.innerHTML && e.target.innerHTML.indexOf('id="floatlayout_reply"') > -1) { From 660d7b2fc65d031d8f83c6778f097a4a4fbeca20 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 11 Jul 2021 13:41:39 +0800 Subject: [PATCH 0010/2070] README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2eabc4b0f..a7163ce06 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ | | 脚本名称 | 脚本功能 | 安装 \| 备用 | | :----: | :---- | :---- | :----: | -| [](https://github.com/XIU2) | **护眼模式** | 简单有效的全网通用护眼模式、夜间模式、暗黑模式 | **[安装](https://greasyfork.org/zh-CN/scripts/426377)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/DarkMode.user.js)** | +| [](https://github.com/XIU2) | **护眼模式** | 简单有效的全网通用护眼模式、夜间模式、暗黑模式~ | **[安装](https://greasyfork.org/zh-CN/scripts/426377)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/DarkMode.user.js)** | | [](https://www.zhihu.com/people/xiu2) | **知乎 美化** | 宽屏显示、**暗黑模式**、隐藏文章开头大图、调整图片最大高... | **[安装](https://greasyfork.org/zh-CN/scripts/412212)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Zhihu-Beautification.user.js)** | -| [](https://www.zhihu.com/people/xiu2) | **知乎 增强** | **移除登录弹窗**、一键收起回答、屏蔽指定用户、屏蔽盐选内... | **[安装](https://greasyfork.org/zh-CN/scripts/419081)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Zhihu-Enhanced.user.js)** | +| [](https://www.zhihu.com/people/xiu2) | **知乎 增强** | **移除登录弹窗**、一键收起回答、屏蔽用户、屏蔽关键词(标题)... | **[安装](https://greasyfork.org/zh-CN/scripts/419081)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Zhihu-Enhanced.user.js)** | | [](https://www.v2ex.com/) | **V2ex 增强** | **自动签到**、链接转图片、自动无缝翻页、新标签页打开链接... | **[安装](https://greasyfork.org/zh-CN/scripts/424246)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/V2ex-Enhanced.user.js)** | | [](https://github.com/XIU2) | **Github 增强** | **高速下载** Git Clone/SSH、Release、Raw、Code(ZIP) 文件... | **[安装](https://greasyfork.org/zh-CN/scripts/412245)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/GithubEnhanced-High-Speed-Download.user.js)** | | [](https://github.com/XIU2) | **自动无缝翻页 \*** | 423Down、Apphot、不死鸟、小众软件、异次元软件... | **[安装](https://greasyfork.org/zh-CN/scripts/419215)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Autopage.user.js)** | @@ -27,11 +27,11 @@ | [](https://bbs.3dmgame.com) | **3DM论坛 增强** | **自动回复**、自动无缝翻页、清理置顶帖子、自动滚动至隐藏... | **[安装](https://greasyfork.org/zh-CN/scripts/412890)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/3dm-Enhanced.user.js)** | | [](http://bbs.zhiyoo.net/forum.php?mod=forumdisplay&fid=42&filter=author&orderby=dateline) | **智友邦论坛 美化** | 精简多余内容、样式优化、宽屏显示 | **[安装](https://greasyfork.org/zh-CN/scripts/412361)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Zhiyoo-Beautification.user.js)** | | [](http://bbs.zhiyoo.net/forum.php?mod=forumdisplay&fid=42&filter=author&orderby=dateline) | **智友邦论坛 增强** | 自动签到、**自动回复**、自动无缝翻页、快捷回到顶部、附件... | **[安装](https://greasyfork.org/zh-CN/scripts/412362)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Zhiyoo-Enhanced.user.js)** | -| [](https://www.lanzou.com) | **蓝奏云网盘 增强 \*** | 刷新不回根目录、后退返回上一级、**右键显示菜单**、自动显... | **[安装](https://greasyfork.org/zh-CN/scripts/419224)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Lanzou-Enhanced.user.js)** | +| [](https://www.lanzou.com) | **蓝奏云网盘 增强 \*** | 刷新不回根目录、**右键显示菜单**、自动显示更多文件、自动... | **[安装](https://greasyfork.org/zh-CN/scripts/419224)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Lanzou-Enhanced.user.js)** | | [](https://translate.google.cn) | ~~_**Google 翻译 美化**_~~ | ~~_精简多余内容、修复翻译结果溢出屏幕问题_~~ | ~~_**[安装](https://zhuanlan.zhihu.com/p/286815739)** \| **[备用](https://zhuanlan.zhihu.com/p/286815739)**_~~ | | [](https://www.52pojie.cn) | **吾爱破解论坛 美化** | 精简多余内容、样式优化 | **[安装](https://greasyfork.org/zh-CN/scripts/412681)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/52pojie-Beautification.user.js)** | | [](https://www.52pojie.cn) | **吾爱破解论坛 增强** | **自动签到**、自动无缝翻页、屏蔽导读悬赏贴 (最新发表页)... | **[安装](https://greasyfork.org/zh-CN/scripts/412680)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/52pojie-Enhanced.user.js)** | -| [](https://hostloc.com) | **全球主机交流论坛 增强 \*** | **自动签到 (访问空间)、屏蔽指定用户**、自动无缝翻页等... | **[安装](https://greasyfork.org/zh-CN/scripts/414005)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Hostloc-Enhanced.user.js)** | +| [](https://hostloc.com) | **全球主机交流论坛 增强 \*** | **自动访问空间、屏蔽用户**、屏蔽关键词、自动无缝翻页等... | **[安装](https://greasyfork.org/zh-CN/scripts/414005)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Hostloc-Enhanced.user.js)** | | [](https://store.steampowered.com) | **Steam 创意工坊大图 修复** | 修复 Steam 创意工坊预览大图无法显示的问题 | **[安装](https://greasyfork.org/zh-CN/scripts/397666)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/SteamWorkshopImageRepair.user.js)** | > _脚本名称末尾 **`*`** 代表该脚本为**网友主动提出需求**而写的。如果你也有需求,可以[告诉我](https://github.com/XIU2/UserScript/issues/new/choose)!_ From 9ca2977d15b1bb0002f4375e3652e6a3f90c25e0 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 15 Jul 2021 09:09:45 +0800 Subject: [PATCH 0011/2070] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=A8=A1=E5=BC=8F=E9=A2=9C=E8=89=B2]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 66 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 12 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 8f6a3bad0..3f63a4baa 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.1.3 +// @version 1.1.4 // @author X.I.U // @description 简单有效的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -25,7 +25,10 @@ var menu_ALL = [ ['menu_runDuringTheDay', '白天保持开启 (比晚上亮一点点)', '白天保持开启', true], ['menu_autoRecognition', '排除自带暗黑模式的网页 (beta)', '排除自带暗黑模式的网页 (beta)', true], - ['menu_darkModeType', '点击切换模式', '点击切换模式', 1] + ['menu_darkModeType', '点击切换模式', '点击切换模式', 1], + ['menu_customMode1', '自定义模式 1', '自定义模式 1', '80|70'], + ['menu_customMode2', '自定义模式 2', '自定义模式 2', '80|20|70|30'], + ['menu_customMode3', '自定义模式 3', '自定义模式 3', '80'] ], menu_ID = [], websiteList = ['rarbgprx.org','fitgirl-repacks.site','masquerade.site','www.gamersky.com']; for (let i=0;i -1) { From a9cccc58b6098c1918ea6860bfb5951c64cde8ee Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 15 Jul 2021 16:32:02 +0800 Subject: [PATCH 0012/2070] =?UTF-8?q?=E5=90=88=E5=B9=B6=203=E4=B8=AA=20[?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=A8=A1=E5=BC=8F]=20=E4=B8=BA=20[?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=BD=93=E5=89=8D=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?]=20=E5=8A=9F=E8=83=BD;=20=E4=BC=98=E5=8C=96=20[=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=BD=93=E5=89=8D=E6=A8=A1=E5=BC=8F]=20?= =?UTF-8?q?=E5=90=8E=E7=AB=8B=E5=8D=B3=E7=94=9F=E6=95=88~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 51 +++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 3f63a4baa..8d80d555a 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.1.4 +// @version 1.1.5 // @author X.I.U // @description 简单有效的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -26,6 +26,7 @@ ['menu_runDuringTheDay', '白天保持开启 (比晚上亮一点点)', '白天保持开启', true], ['menu_autoRecognition', '排除自带暗黑模式的网页 (beta)', '排除自带暗黑模式的网页 (beta)', true], ['menu_darkModeType', '点击切换模式', '点击切换模式', 1], + ['menu_customMode', '自定义当前模式', '自定义当前模式', '80|70'], ['menu_customMode1', '自定义模式 1', '自定义模式 1', '80|70'], ['menu_customMode2', '自定义模式 2', '自定义模式 2', '80|20|70|30'], ['menu_customMode3', '自定义模式 3', '自定义模式 3', '80'] @@ -52,15 +53,15 @@ GM_setValue('menu_darkModeType', menu_ALL[i][3]); } menu_ID[i] = GM_registerMenuCommand(`🔄 [ ${menu_ALL[i][3]} ] ${menu_ALL[i][1]}`, function(){menu_toggle(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`)}); + } else if (menu_ALL[i][0] === 'menu_customMode') { + GM_setValue('menu_customMode', menu_ALL[i][3]); + menu_ID[i] = GM_registerMenuCommand(`✅ ${menu_ALL[i][1]}`, function(){menu_customMode()}); } else if (menu_ALL[i][0] === 'menu_customMode1') { GM_setValue('menu_customMode1', menu_ALL[i][3]); - menu_ID[i] = GM_registerMenuCommand(`1️⃣ ${menu_ALL[i][1]}`, function(){menu_customMode(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`)}); } else if (menu_ALL[i][0] === 'menu_customMode2') { GM_setValue('menu_customMode2', menu_ALL[i][3]); - menu_ID[i] = GM_registerMenuCommand(`2️⃣ ${menu_ALL[i][1]}`, function(){menu_customMode(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`)}); } else if (menu_ALL[i][0] === 'menu_customMode3') { GM_setValue('menu_customMode3', menu_ALL[i][3]); - menu_ID[i] = GM_registerMenuCommand(`3️⃣ ${menu_ALL[i][1]}`, function(){menu_customMode(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`)}); } else { menu_ID[i] = GM_registerMenuCommand(`🌝 [ ${menu_ALL[i][3]?'√':'×'} ] ${menu_ALL[i][1]}`, function(){menu_switch(`${menu_ALL[i][3]}`,`${menu_ALL[i][0]}`,`${menu_ALL[i][2]}`)}); } @@ -69,30 +70,36 @@ } - function menu_customMode(menu_status, Name) { - let newMods, tip, defaults; - switch(Name) { - case 'menu_customMode1': - tip = '自定义 [模式 1],刷新网页后生效~\n格式:亮度 (白天)|亮度 (晚上)\n默认:80|70(均为百分比 1~100,不需要 % 符号)' - defaults = '80|70' + // 自定义当前模式 + function menu_customMode() { + let newMods, tip, defaults, name; + switch(menu_value('menu_darkModeType')) { + case 1: + tip = '自定义 [模式 1],修改后立即生效~\n格式:亮度 (白天)|亮度 (晚上)\n默认:80|70(均为百分比 1~100,不需要 % 符号)'; + defaults = '80|70'; + name = 'menu_customMode1'; break; - case 'menu_customMode2': - tip = '自定义 [模式 2],刷新网页后生效~\n格式:亮度 (白天)|暖色 (白天)|亮度 (晚上)|暖色 (晚上)\n默认:80|20|70|30(均为百分比 1~100,不需要 % 符号)' - defaults = '80|20|70|30' + case 2: + tip = '自定义 [模式 2],修改后立即生效~\n格式:亮度 (白天)|暖色 (白天)|亮度 (晚上)|暖色 (晚上)\n默认:80|20|70|30(均为百分比 1~100,不需要 % 符号)'; + defaults = '80|20|70|30'; + name = 'menu_customMode2'; break; - case 'menu_customMode3': - tip = '自定义 [模式 3],刷新网页后生效~\n格式:反色\n默认:80(均为百分比 50~100,不需要 % 符号)' - defaults = '80' + case 3: + tip = '自定义 [模式 3],修改后立即生效~\n格式:反色\n默认:80(均为百分比 50~100,不需要 % 符号)'; + defaults = '80'; + name = 'menu_customMode3'; break; } - newMods = prompt(tip, GM_getValue(`${Name}`)); + newMods = prompt(tip, GM_getValue(`${name}`)); if (newMods === '') { - GM_setValue(`${Name}`, defaults); + GM_setValue(`${name}`, defaults); registerMenuCommand(); // 重新注册脚本菜单 } else if (newMods != null) { - GM_setValue(`${Name}`, newMods); + GM_setValue(`${name}`, newMods); registerMenuCommand(); // 重新注册脚本菜单 } + document.getElementById('XIU2DarkMode').remove(); // 即时修改样式 + addStyle(); } @@ -136,9 +143,9 @@ function addStyle() { let remove = false, style_Add = document.createElement('style'), hours = new Date().getHours(), - style_10 = GM_getValue('menu_customMode1').split('|'), - style_20 = GM_getValue('menu_customMode2').split('|'), - style_30 = GM_getValue('menu_customMode3').split('|'), + style_10 = menu_value('menu_customMode1').split('|'), + style_20 = menu_value('menu_customMode2').split('|'), + style_30 = menu_value('menu_customMode3').split('|'), style = ``, style_00 = `html, body {background-color: #ffffff;}`, style_11 = `html {filter: brightness(${style_10[0]}%) !important;}`, From 34961430e2e166f5670a060999a9a2413185f658 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 15 Jul 2021 16:45:57 +0800 Subject: [PATCH 0013/2070] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=BD=93=E5=89=8D=E6=A8=A1=E5=BC=8F]=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 8d80d555a..212c5d96b 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.1.5 +// @version 1.1.6 // @author X.I.U // @description 简单有效的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -75,17 +75,17 @@ let newMods, tip, defaults, name; switch(menu_value('menu_darkModeType')) { case 1: - tip = '自定义 [模式 1],修改后立即生效~\n格式:亮度 (白天)|亮度 (晚上)\n默认:80|70(均为百分比 1~100,不需要 % 符号)'; + tip = '自定义 [模式 1],修改后立即生效 (部分网页可能需要刷新)~\n格式:亮度 (白天)|亮度 (晚上)\n默认:80|70(均为百分比 1~100,不需要 % 符号)'; defaults = '80|70'; name = 'menu_customMode1'; break; case 2: - tip = '自定义 [模式 2],修改后立即生效~\n格式:亮度 (白天)|暖色 (白天)|亮度 (晚上)|暖色 (晚上)\n默认:80|20|70|30(均为百分比 1~100,不需要 % 符号)'; + tip = '自定义 [模式 2],修改后立即生效 (部分网页可能需要刷新)~\n格式:亮度 (白天)|暖色 (白天)|亮度 (晚上)|暖色 (晚上)\n默认:80|20|70|30(均为百分比 1~100,不需要 % 符号)'; defaults = '80|20|70|30'; name = 'menu_customMode2'; break; case 3: - tip = '自定义 [模式 3],修改后立即生效~\n格式:反色\n默认:80(均为百分比 50~100,不需要 % 符号)'; + tip = '自定义 [模式 3],修改后立即生效 (部分网页可能需要刷新)~\n格式:反色\n默认:80(均为百分比 50~100,不需要 % 符号)'; defaults = '80'; name = 'menu_customMode3'; break; @@ -98,8 +98,10 @@ GM_setValue(`${name}`, newMods); registerMenuCommand(); // 重新注册脚本菜单 } - document.getElementById('XIU2DarkMode').remove(); // 即时修改样式 - addStyle(); + if (document.getElementById('XIU2DarkMode')) { + document.getElementById('XIU2DarkMode').remove(); // 即时修改样式 + addStyle(); + } } From 43084d1a7684e7bda4a61dc4a03ded8abe8d566d Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 16 Jul 2021 15:02:26 +0800 Subject: [PATCH 0014/2070] README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a7163ce06..4bdb4f06b 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ | [](https://www.52pojie.cn) | **吾爱破解论坛 美化** | 精简多余内容、样式优化 | **[安装](https://greasyfork.org/zh-CN/scripts/412681)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/52pojie-Beautification.user.js)** | | [](https://www.52pojie.cn) | **吾爱破解论坛 增强** | **自动签到**、自动无缝翻页、屏蔽导读悬赏贴 (最新发表页)... | **[安装](https://greasyfork.org/zh-CN/scripts/412680)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/52pojie-Enhanced.user.js)** | | [](https://hostloc.com) | **全球主机交流论坛 增强 \*** | **自动访问空间、屏蔽用户**、屏蔽关键词、自动无缝翻页等... | **[安装](https://greasyfork.org/zh-CN/scripts/414005)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Hostloc-Enhanced.user.js)** | -| [](https://store.steampowered.com) | **Steam 创意工坊大图 修复** | 修复 Steam 创意工坊预览大图无法显示的问题 | **[安装](https://greasyfork.org/zh-CN/scripts/397666)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/SteamWorkshopImageRepair.user.js)** | +| [](https://store.steampowered.com) | **Steam 创意工坊大图 修复** | 修复 Steam 创意工坊预览大图无法显示的问题 | **[安装](https://github.com/XIU2/UserScript/raw/master/SteamWorkshopImageRepair.user.js)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/SteamWorkshopImageRepair.user.js)** | > _脚本名称末尾 **`*`** 代表该脚本为**网友主动提出需求**而写的。如果你也有需求,可以[告诉我](https://github.com/XIU2/UserScript/issues/new/choose)!_ > _所有脚本均在 **Chrome、Firefox、Edge 浏览器 + Tampermonkey 扩展** 环境下测试通过!_ From 35fc4232ff8afaa0f7fbdadfa846cb037efd2cad Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 17 Jul 2021 06:32:47 +0800 Subject: [PATCH 0015/2070] Update --- SteamWorkshopImageRepair.user.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/SteamWorkshopImageRepair.user.js b/SteamWorkshopImageRepair.user.js index 949acfa4b..5188fa9aa 100644 --- a/SteamWorkshopImageRepair.user.js +++ b/SteamWorkshopImageRepair.user.js @@ -1,16 +1,14 @@ // ==UserScript== -// @name Steam Workshop Image Repair -// @name:zh-CN Steam 创意工坊大图修复 -// @version 1.0.0 -// @author X.I.U -// @description Fixed Steam Workshop image not showing -// @description:zh-CN 修复 Steam 创意工坊预览大图无法显示的问题(Steam 不改的话,长期可用) -// @match *://steamcommunity.com/sharedfiles/filedetails/* -// @match *://steamcommunity.com/workshop/filedetails/* -// @icon https://store.steampowered.com/favicon.ico -// @license GPL-3.0 License -// @run-at document-end -// @namespace https://greasyfork.org/scripts/397666 +// @name Steam 创意工坊大图修复 +// @version 1.0.0 +// @author X.I.U +// @description 修复 Steam 创意工坊预览大图无法显示的问题(Steam 不改的话,长期可用) +// @match *://steamcommunity.com/sharedfiles/filedetails/* +// @match *://steamcommunity.com/workshop/filedetails/* +// @icon https://store.steampowered.com/favicon.ico +// @license GPL-3.0 License +// @run-at document-end +// @namespace https://github.com/XIU2/UserScript // ==/UserScript== if(typeof onYouTubeIframeAPIReady == 'function') { From 2fe4267aa6a95dfa41736b19865ff4b79189ea17 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 17 Jul 2021 07:09:11 +0800 Subject: [PATCH 0016/2070] =?UTF-8?q?=E8=A1=A5=E5=85=85=20=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E5=A4=B4=E9=83=A8=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3dm-Beautification.user.js | 2 ++ 3dm-Enhanced.user.js | 2 ++ 52pojie-Beautification.user.js | 2 ++ 52pojie-Enhanced.user.js | 2 ++ Autopage.user.js | 2 ++ DarkMode.user.js | 2 ++ GithubEnhanced-High-Speed-Download.user.js | 2 ++ GoogleTranslate-Beautification.user.js | 2 ++ Hostloc-Enhanced.user.js | 2 ++ Lanzou-Enhanced.user.js | 2 ++ SteamWorkshopImageRepair.user.js | 2 ++ V2ex-Enhanced.user.js | 2 ++ Zhihu-Beautification.user.js | 2 ++ Zhihu-Enhanced.user.js | 2 ++ Zhiyoo-Beautification.user.js | 2 ++ Zhiyoo-Enhanced.user.js | 2 ++ 16 files changed, 32 insertions(+) diff --git a/3dm-Beautification.user.js b/3dm-Beautification.user.js index fc451aa0b..b61ba0d08 100644 --- a/3dm-Beautification.user.js +++ b/3dm-Beautification.user.js @@ -8,6 +8,8 @@ // @license GPL-3.0 License // @run-at document-start // @namespace https://greasyfork.org/scripts/413593 +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/3dm-Enhanced.user.js b/3dm-Enhanced.user.js index c1f5ad0da..f76651817 100644 --- a/3dm-Enhanced.user.js +++ b/3dm-Enhanced.user.js @@ -15,6 +15,8 @@ // @license GPL-3.0 License // @run-at document-end // @namespace https://greasyfork.org/scripts/412890 +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/52pojie-Beautification.user.js b/52pojie-Beautification.user.js index 2962f6a9b..e474782ab 100644 --- a/52pojie-Beautification.user.js +++ b/52pojie-Beautification.user.js @@ -14,6 +14,8 @@ // @license GPL-3.0 License // @run-at document-start // @namespace https://greasyfork.org/scripts/412681 +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/52pojie-Enhanced.user.js b/52pojie-Enhanced.user.js index 2d1afc50a..f6481eaff 100644 --- a/52pojie-Enhanced.user.js +++ b/52pojie-Enhanced.user.js @@ -15,6 +15,8 @@ // @license GPL-3.0 License // @run-at document-end // @namespace https://greasyfork.org/scripts/412680 +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/Autopage.user.js b/Autopage.user.js index bfb05dac1..d29e3f10a 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -32,6 +32,8 @@ // @license GPL-3.0 License // @run-at document-end // @namespace https://github.com/XIU2/UserScript +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/DarkMode.user.js b/DarkMode.user.js index 212c5d96b..51749f44c 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -19,6 +19,8 @@ // @license GPL-3.0 License // @run-at document-start // @namespace https://github.com/XIU2/UserScript +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index 280825532..6a59cd7af 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -15,6 +15,8 @@ // @license GPL-3.0 License // @run-at document-end // @namespace https://greasyfork.org/scripts/412245 +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/GoogleTranslate-Beautification.user.js b/GoogleTranslate-Beautification.user.js index 9fec41fe3..bcf84f370 100644 --- a/GoogleTranslate-Beautification.user.js +++ b/GoogleTranslate-Beautification.user.js @@ -15,6 +15,8 @@ // @license GPL-3.0 License // @run-at document-start // @namespace https://greasyfork.org/scripts/413721 +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index d3d9cf03c..f73a824ab 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -16,6 +16,8 @@ // @license GPL-3.0 License // @run-at document-end // @namespace https://greasyfork.org/scripts/414005 +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/Lanzou-Enhanced.user.js b/Lanzou-Enhanced.user.js index c95f5d8ab..f18cb8db8 100644 --- a/Lanzou-Enhanced.user.js +++ b/Lanzou-Enhanced.user.js @@ -27,6 +27,8 @@ // @license GPL-3.0 License // @run-at document-end // @namespace https://github.com/XIU2/UserScript +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { var menu_ALL = [ diff --git a/SteamWorkshopImageRepair.user.js b/SteamWorkshopImageRepair.user.js index 5188fa9aa..34498abdd 100644 --- a/SteamWorkshopImageRepair.user.js +++ b/SteamWorkshopImageRepair.user.js @@ -9,6 +9,8 @@ // @license GPL-3.0 License // @run-at document-end // @namespace https://github.com/XIU2/UserScript +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== if(typeof onYouTubeIframeAPIReady == 'function') { diff --git a/V2ex-Enhanced.user.js b/V2ex-Enhanced.user.js index d0a691178..e5d3ae5ee 100644 --- a/V2ex-Enhanced.user.js +++ b/V2ex-Enhanced.user.js @@ -16,6 +16,8 @@ // @license GPL-3.0 License // @run-at document-end // @namespace https://github.com/XIU2/UserScript +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index f044538a4..25ee455f7 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -15,6 +15,8 @@ // @license GPL-3.0 License // @run-at document-start // @namespace https://greasyfork.org/scripts/412212 +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index 2358aeeaf..03fb456cc 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -15,6 +15,8 @@ // @license GPL-3.0 License // @run-at document-end // @namespace https://greasyfork.org/scripts/412205 +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== var menu_ALL = [ diff --git a/Zhiyoo-Beautification.user.js b/Zhiyoo-Beautification.user.js index e1bb66d9d..7d4c2100f 100644 --- a/Zhiyoo-Beautification.user.js +++ b/Zhiyoo-Beautification.user.js @@ -8,6 +8,8 @@ // @license GPL-3.0 License // @run-at document-start // @namespace https://greasyfork.org/scripts/412361 +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { diff --git a/Zhiyoo-Enhanced.user.js b/Zhiyoo-Enhanced.user.js index db22ec92f..39c37201a 100644 --- a/Zhiyoo-Enhanced.user.js +++ b/Zhiyoo-Enhanced.user.js @@ -16,6 +16,8 @@ // @license GPL-3.0 License // @run-at document-end // @namespace https://greasyfork.org/scripts/412362 +// @supportURL https://github.com/XIU2/UserScript +// @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== (function() { From ae84aee3d3c345d21a6d84e3daeefa938ddd7305 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 17 Jul 2021 09:20:07 +0800 Subject: [PATCH 0017/2070] =?UTF-8?q?=E5=90=AF=E7=94=A8=20JS=20=E4=B8=A5?= =?UTF-8?q?=E6=A0=BC=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3dm-Beautification.user.js | 1 + 3dm-Enhanced.user.js | 1 + 52pojie-Beautification.user.js | 1 + 52pojie-Enhanced.user.js | 1 + Autopage.user.js | 1 + DarkMode.user.js | 1 + GithubEnhanced-High-Speed-Download.user.js | 1 + GoogleTranslate-Beautification.user.js | 1 + Hostloc-Enhanced.user.js | 1 + Lanzou-Enhanced.user.js | 2 ++ V2ex-Enhanced.user.js | 1 + Zhihu-Beautification.user.js | 1 + Zhihu-Enhanced.user.js | 1 + Zhiyoo-Beautification.user.js | 1 + Zhiyoo-Enhanced.user.js | 1 + 15 files changed, 16 insertions(+) diff --git a/3dm-Beautification.user.js b/3dm-Beautification.user.js index b61ba0d08..0a0f450c4 100644 --- a/3dm-Beautification.user.js +++ b/3dm-Beautification.user.js @@ -12,6 +12,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { let style_Add = document.createElement('style'); style_Add.innerHTML = ` diff --git a/3dm-Enhanced.user.js b/3dm-Enhanced.user.js index f76651817..0a45baa35 100644 --- a/3dm-Enhanced.user.js +++ b/3dm-Enhanced.user.js @@ -19,6 +19,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { var menu_ALL = [ ['menu_autoReply', '自动回复', '自动回复', true], diff --git a/52pojie-Beautification.user.js b/52pojie-Beautification.user.js index e474782ab..f18860480 100644 --- a/52pojie-Beautification.user.js +++ b/52pojie-Beautification.user.js @@ -18,6 +18,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { var menu_ALL = [ ['menu_rule', '隐藏版规', '隐藏版规', false] diff --git a/52pojie-Enhanced.user.js b/52pojie-Enhanced.user.js index f6481eaff..3991fd76c 100644 --- a/52pojie-Enhanced.user.js +++ b/52pojie-Enhanced.user.js @@ -19,6 +19,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { var menu_ALL = [ ['menu_autoClockIn', '自动签到', '自动签到', true], diff --git a/Autopage.user.js b/Autopage.user.js index d29e3f10a..8e68dae4e 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -36,6 +36,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { // 注册脚本菜单 GM_registerMenuCommand('反馈 & 欢迎申请支持', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419215/feedback', {active: true,insert: true,setParent: true});}); diff --git a/DarkMode.user.js b/DarkMode.user.js index 51749f44c..eac1c0858 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -23,6 +23,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { var menu_ALL = [ ['menu_runDuringTheDay', '白天保持开启 (比晚上亮一点点)', '白天保持开启', true], diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index 6a59cd7af..58fff9269 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -19,6 +19,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { var backColor = '#ffffff'; var fontColor = '#888888'; diff --git a/GoogleTranslate-Beautification.user.js b/GoogleTranslate-Beautification.user.js index bcf84f370..6c6904a28 100644 --- a/GoogleTranslate-Beautification.user.js +++ b/GoogleTranslate-Beautification.user.js @@ -19,6 +19,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { var menu_streamline = GM_getValue('xiu2_menu_streamline'); var menu_streamline_ID, menu_feedBack_ID; diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index f73a824ab..491458b30 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -20,6 +20,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { var menu_ALL = [ ['menu_autoSignIn', '自动签到', '自动签到', true], diff --git a/Lanzou-Enhanced.user.js b/Lanzou-Enhanced.user.js index f18cb8db8..abdf128e5 100644 --- a/Lanzou-Enhanced.user.js +++ b/Lanzou-Enhanced.user.js @@ -30,6 +30,8 @@ // @supportURL https://github.com/XIU2/UserScript // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== + +'use strict'; (function() { var menu_ALL = [ ['menu_open_fileSha', '自动打开分享链接', '自动打开分享链接', true], diff --git a/V2ex-Enhanced.user.js b/V2ex-Enhanced.user.js index e5d3ae5ee..eeb2d403a 100644 --- a/V2ex-Enhanced.user.js +++ b/V2ex-Enhanced.user.js @@ -20,6 +20,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { var menu_ALL = [ ['menu_autoClockIn', '自动签到', '自动签到', true], diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index 25ee455f7..e65c37990 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -19,6 +19,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { var menu_ALL = [ ['menu_widescreenDisplay', '宽屏显示', '宽屏显示', true], diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index 03fb456cc..58088e49c 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -19,6 +19,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; var menu_ALL = [ ['menu_collapsedAnswer', '一键收起回答', '一键收起回答', true], ['menu_collapsedNowAnswer', '收起当前回答/评论(点击两侧空白处)', '收起当前回答/评论', true], diff --git a/Zhiyoo-Beautification.user.js b/Zhiyoo-Beautification.user.js index 7d4c2100f..43569b53f 100644 --- a/Zhiyoo-Beautification.user.js +++ b/Zhiyoo-Beautification.user.js @@ -12,6 +12,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { let style_Add = document.createElement('style'); style_Add.innerHTML = ` diff --git a/Zhiyoo-Enhanced.user.js b/Zhiyoo-Enhanced.user.js index 39c37201a..0a271d61f 100644 --- a/Zhiyoo-Enhanced.user.js +++ b/Zhiyoo-Enhanced.user.js @@ -20,6 +20,7 @@ // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== +'use strict'; (function() { var menu_ALL = [ ['menu_autoReply', '自动回复', '自动回复', true], From 283b5724674b2177405c935e83b9066c92994077 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 17 Jul 2021 20:51:07 +0800 Subject: [PATCH 0018/2070] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=97=A0=E7=BC=9D=E7=BF=BB=E9=A1=B5]=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=88=AB=E4=BA=BA=E7=9A=84=E5=9B=9E=E5=A4=8D=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 491458b30..2248b96bd 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.2.9 +// @version 1.3.0 // @author X.I.U // @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、回帖小尾巴、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 // @match *://hostloc.com/* @@ -137,6 +137,15 @@ HT_insert: ['css;div#threadlist div.bm_c table', 2], replaceE: 'css;div.pg', } + }, + youreply: { + SiteTypeID: 5, + pager: { + nextLink: '//a[@class="nxt"][@href]', + pageElement: 'css;tbody > tr', + HT_insert: ['css;tbody', 2], + replaceE: 'css;div.pg', + } } }; @@ -183,6 +192,8 @@ blockUsers('pm'); // 屏蔽用户(黑名单) } else if(location.pathname === '/forum.php' && location.search.indexOf('mod=guide&view=my&type=reply') > -1) { // 我的帖子:回复 curSite = DBSite.myreply; + } else if(location.pathname === '/home.php' && location.search.indexOf('&do=thread&view=me') > -1) { // 别人的帖子:回复 + curSite = DBSite.youreply; } else if(location.pathname === '/forum.php' && location.search.indexOf('mod=post&action=reply') > -1 || location.pathname === '/forum.php' && location.search.indexOf('mod=post&action=newthread') > -1) { // 回复:高级回复 littleTail('reply'); // 小尾巴 } From 8c29d632c9edb963d0189efd6a932263621196c7 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 19 Jul 2021 15:35:49 +0800 Subject: [PATCH 0019/2070] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E7=94=A8=E6=88=B7]=20=E6=8C=89=E9=92=AE=E5=88=B0?= =?UTF-8?q?=E7=BD=91=E9=A1=B5=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Enhanced.user.js | 66 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index 58088e49c..c550db2a8 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎增强 -// @version 1.4.6 +// @version 1.4.7 // @author X.I.U // @description 移除登录弹窗、一键收起回答、收起当前回答/评论(点击两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽指定用户、屏蔽指定关键词(标题)、屏蔽盐选内容、置顶显示时间、显示问题时间、区分问题文章、默认高清原图、默认站外直链 // @match *://www.zhihu.com/* @@ -14,7 +14,7 @@ // @grant GM_notification // @license GPL-3.0 License // @run-at document-end -// @namespace https://greasyfork.org/scripts/412205 +// @namespace https://greasyfork.org/scripts/4122051 // @supportURL https://github.com/XIU2/UserScript // @homepageURL https://github.com/XIU2/UserScript // ==/UserScript== @@ -244,8 +244,12 @@ function blockUsers(type) { case 'search': blockUsers_search(); break; + case 'people': + blockUsers_button_people(); // 添加屏蔽用户按钮(用户主页) + break; } - blockUsers_comment(); // 评论区 + blockUsers_comment(); // 评论区 + blockUsers_button(); // 加入黑名单按钮 function blockUsers_index() { let blockUsers = e => { @@ -346,11 +350,65 @@ function blockUsers(type) { } } }) + + // 添加屏蔽用户按钮(点赞、回复等按钮后面) + if (item1) { + let footer = item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector('.CommentItemV2-metaSibling > .CommentItemV2-footer'); + if (footer && !footer.lastElementChild.dataset.name) { + footer.insertAdjacentHTML('beforeend',``); + footer.lastElementChild.onclick = function(){blockUsers_button_add(this.dataset.name)} + } + } }) } } document.addEventListener('DOMNodeInserted', blockUsers); // 监听插入事件 } + + // 添加屏蔽用户按钮(用户信息悬浮框中) + function blockUsers_button() { + let blockUsers = e => { + if (e.target.innerHTML && e.target.querySelector('.MemberButtonGroup.ProfileButtonGroup.HoverCard-buttons')) { + let item = e.target.querySelector('.MemberButtonGroup.ProfileButtonGroup.HoverCard-buttons'), + name = item.parentNode.parentNode.querySelector('a.UserLink-link').innerText; + item.insertAdjacentHTML('beforeend', ``); + item.lastElementChild.onclick = function(){blockUsers_button_add(this.dataset.name)} + } + } + document.addEventListener('DOMNodeInserted', blockUsers); // 监听插入事件 + } + + // 添加屏蔽用户按钮(用户主页) + function blockUsers_button_people() { + let item = document.querySelector('.MemberButtonGroup.ProfileButtonGroup.ProfileHeader-buttons'), // 获取按钮元素位置 + name = document.querySelector('.ProfileHeader-name').firstChild.textContent, // 获取用户名 + users = menu_value('menu_customBlockUsers'); // 读取屏蔽列表 + for (let num = 0;num