From aaf0be8967e10ea61efa768ec88c3a4c725cecf6 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 2 Jun 2021 13:30:42 +0800 Subject: [PATCH 0001/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20Release=20?= =?UTF-8?q?=E5=8A=A0=E9=80=9F=E6=8C=89=E9=92=AE=E5=9C=A8=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=EF=BC=88=E5=B0=8F=E5=B1=8F=E5=B9=95=EF=BC=89=E4=B8=8A=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GithubEnhanced-High-Speed-Download.user.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index 66686ff99..f3bf7c92f 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.1 +// @version 1.5.2 // @author X.I.U // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) // @match *://github.com/* @@ -123,11 +123,17 @@ // Release function addRelease() { let html = document.getElementsByClassName('Box Box--condensed');if (!html) return + let divDisplay; + if (document.documentElement.clientWidth > 1000) { + divDisplay = 'display: flex;'; + } else { + divDisplay = 'display: block;'; + } Array.from(html).forEach(function (current) { current.querySelectorAll('.d-flex.Box-body > a').forEach(function (_this) { let href = _this.href.split('github.com'), url = [], - _html = `
`; + _html = `
`; for (let i=0;i a').forEach(function (_this) { let href = _this.href.split('github.com'), url = [], - _html = `
`; + _html = `
`; for (let i=0;i Date: Fri, 4 Jun 2021 11:35:11 +0800 Subject: [PATCH 0002/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=94=B6?= =?UTF-8?q?=E8=B5=B7=E9=A2=84=E8=A7=88=E5=B8=96=E5=AD=90]=20=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=88=E6=94=B6=E8=B5=B7=E6=97=B6=E4=BC=9A=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E8=87=B3=E5=B8=96=E5=AD=90=E5=A4=84=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 301919c7e..b0e263653 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.1.8 +// @version 1.1.9 // @author X.I.U // @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处) // @match *://hostloc.com/* @@ -378,7 +378,12 @@ document.body.onclick = function(event){ if (event.target==this) { document.querySelectorAll('[id^="threadPreviewTR_"] .showhide').forEach(function (el) { - el.click() + if (el.parentNode.querySelector('[name="message"]').value === '') { // 避免快速回复过程中误点收起了 + let parentElement = el.parentNode.parentNode.parentNode.parentNode.parentNode, + top = parentElement.offsetTop + parentElement.offsetParent.offsetTop + parentElement.offsetParent.offsetParent.offsetTop; // 元素距离顶部的高度 + if (top < document.documentElement.scrollTop) window.scrollTo(0,top) // 帖子标题在上面时才会滚动到该帖子处 + el.click() + } }); } } From 665124b60881e605b7dd35c09c38826d405b85bc Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 4 Jun 2021 11:38:29 +0800 Subject: [PATCH 0003/2110] Update --- SteamWorkshopImageRepair.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SteamWorkshopImageRepair.user.js b/SteamWorkshopImageRepair.user.js index 7acb5b900..949acfa4b 100644 --- a/SteamWorkshopImageRepair.user.js +++ b/SteamWorkshopImageRepair.user.js @@ -4,7 +4,7 @@ // @version 1.0.0 // @author X.I.U // @description Fixed Steam Workshop image not showing -// @description:zh-CN 修复 Steam 创意工坊预览大图无法显示的问题 +// @description:zh-CN 修复 Steam 创意工坊预览大图无法显示的问题(Steam 不改的话,长期可用) // @match *://steamcommunity.com/sharedfiles/filedetails/* // @match *://steamcommunity.com/workshop/filedetails/* // @icon https://store.steampowered.com/favicon.ico @@ -15,4 +15,4 @@ if(typeof onYouTubeIframeAPIReady == 'function') { onYouTubeIframeAPIReady(); -} +} \ No newline at end of file From 9864d6e5f516dc65e2773d0b5c270454c6f2087a Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 4 Jun 2021 13:01:36 +0800 Subject: [PATCH 0004/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2=E4=B8=8E=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E6=96=87=E7=AB=A0=E5=AE=BD=E5=BA=A6=E4=B8=80=E8=87=B4?= =?UTF-8?q?]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Beautification.user.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index 12309edc4..2c87cf87b 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎美化 -// @version 1.2.3 +// @version 1.2.4 // @author X.I.U // @description 宽屏显示、暗黑模式(4种)、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致、屏蔽登录提示 // @match *://www.zhihu.com/* @@ -143,8 +143,11 @@ `, style_3 = `/* 调整文章编辑页面与实际文章宽度一致 */ .PostEditor .RichText {min-width: 690px !important;} +.InputLike.PostEditor.Editable {min-width: 710px !important;border: none !important;padding: 0 10px !important;background-color: #22272e !important;} /* 及标题输入框内的文字大小 */ .WriteIndex-titleInput .Input {min-width: 690px !important;font-size: 24px;} +label.WriteIndex-titleInput.Input-wrapper.Input-wrapper--multiline {min-width: 710px !important;padding: 0 10px !important;background-color: #22272e !important;} + `, style_4 = `/* 向下翻时自动隐藏顶栏*/ header.is-hidden {display: none;} From 1ccef301c9b6240b674321d4eca27ab079362fd4 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 6 Jun 2021 11:49:19 +0800 Subject: [PATCH 0005/2110] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E5=B8=96=E5=AD=90=E5=BF=AB=E9=80=9F=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E5=B8=A6=E7=AD=BE=E5=90=8D]=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 | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index b0e263653..c224ea7d0 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.1.9 +// @version 1.2.0 // @author X.I.U -// @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处) +// @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名 // @match *://hostloc.com/* // @icon https://www.hostloc.com/favicon.ico // @grant GM_xmlhttpRequest @@ -151,7 +151,8 @@ if (menu_value('menu_delate255')) delate255(); // 自动隐藏阅读权限 255 的帖子 blockUsers('forum'); // 屏蔽用户(黑名单) blockKeywords(); // 屏蔽关键词(帖子标题) - if (patt_forum.test(location.pathname)) blockDOMNodeInserted(); // 监听插入事件(针对的是:有新的回复主题,点击查看) + vfastpostDOMNodeInserted(); // 监听插入事件(预览快速回复带签名) + if (patt_forum.test(location.pathname)) blockDOMNodeInserted(); //监听插入事件(有新的回复主题,点击查看) }else if (patt_guide.test(location.search)) { // 导读帖子列表 curSite = DBSite.guide; } else if(location.pathname === '/search.php') { // 搜索结果列表 @@ -299,7 +300,7 @@ } - // 监听插入事件(针对的是:有新的回复主题,点击查看) + // 监听插入事件(有新的回复主题,点击查看) function blockDOMNodeInserted() { let block = e => { if (e.target.innerText && e.target.innerText.indexOf('newthread') > -1) { @@ -313,6 +314,17 @@ } + // 监听插入事件(预览快速回复带签名) + function vfastpostDOMNodeInserted() { + let vfastpost = e => { + if (e.target.innerHTML && e.target.innerHTML.indexOf('id="vfastpost"') > -1) { + e.target.getElementsByTagName('form')[0].insertAdjacentHTML('afterbegin', ``); + } + } + document.addEventListener('DOMNodeInserted', vfastpost); // 监听插入事件 + } + + // 自动翻页 function pageLoading() { if (curSite.SiteTypeID > 0){ From 011ba71da7519dc730f9f505aeec34fc50e75c59 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 6 Jun 2021 11:52:48 +0800 Subject: [PATCH 0006/2110] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E5=B8=96=E5=AD=90=E5=BF=AB=E9=80=9F=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E5=B8=A6=E7=AD=BE=E5=90=8D]=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 c224ea7d0..b8ccab8b8 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -2,7 +2,7 @@ // @name 全球主机交流论坛增强 // @version 1.2.0 // @author X.I.U -// @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名 +// @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 // @match *://hostloc.com/* // @icon https://www.hostloc.com/favicon.ico // @grant GM_xmlhttpRequest @@ -26,10 +26,10 @@ ['menu_blockKeywords', '屏蔽关键词(帖子标题)', '屏蔽关键词(帖子标题)', false], ['menu_customBlockKeywords', '自定义屏蔽关键词', '自定义屏蔽关键词', []], ['menu_thread_pageLoading', '帖子内自动翻页', '帖子内自动翻页', true], - ['menu_showhide', '显示隐藏回复', '显示隐藏回复', true], ['menu_backToTop', '快捷回到顶部(右键点击两侧空白处)', '快捷回到顶部', true], ['menu_collapsedNowPost', '收起预览帖子(左键点击两侧空白处)', '收起预览帖子', true], ['menu_onlineStatus', '显示是否在线', '显示是否在线', true], + ['menu_showhide', '显示帖子内隐藏回复', '显示帖子内隐藏回复', true], ['menu_delate255', '屏蔽阅读权限 255 帖子', '屏蔽阅读权限 255 帖子', true] ], menu_ID = []; for (let i=0;i Date: Sun, 6 Jun 2021 21:10:36 +0800 Subject: [PATCH 0007/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E6=8C=87=E5=AE=9A=E7=94=A8=E6=88=B7]=20=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=88=E6=94=AF=E6=8C=81=E8=AF=84=E8=AE=BA=E5=8C=BA?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Enhanced.user.js | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index 60c616bc2..bf5341b90 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎增强 -// @version 1.4.2 +// @version 1.4.3 // @author X.I.U // @description 移除登录弹窗、一键收起回答、收起当前回答/评论(点击两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽指定用户、屏蔽盐选内容、置顶显示时间、显示问题时间、区分问题文章、默认高清原图、默认站外直链 // @match *://www.zhihu.com/* @@ -238,6 +238,7 @@ function blockUsers(type) { blockUsers_search(); break; } + blockUsers_comment(); // 评论区 function blockUsers_index() { let blockUsers = e => { @@ -315,6 +316,34 @@ function blockUsers(type) { } document.addEventListener('DOMNodeInserted', blockUsers); // 监听插入事件 } + + function blockUsers_comment() { + let blockUsers = e => { + if (e.target.innerHTML && e.target.querySelector('img.Avatar.UserLink-avatar[width="24"]')) { + let item = e.target.querySelectorAll('img.Avatar.UserLink-avatar[width="24"]') + item.forEach(function(item1){ // 遍历用户名 + menu_value('menu_customBlockUsers').forEach(function(item2){ // 遍历用户黑名单 + if (item1.alt === item2) { // 找到就删除该搜索结果 + if (item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className === 'NestComment--rootCommentNoChild' || item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className === 'NestComment--rootComment') { + item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } else if (item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className === 'NestComment--rootCommentNoChild' || item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className === 'NestComment--rootComment') { + item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } else if (item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className === 'NestComment--child') { + item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } else if (item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className === 'NestComment--child') { + item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } else if (item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className === 'NestComment') { + item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } else if (item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.className === 'CommentItemV2') { + item1.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } + } + }) + }) + } + } + document.addEventListener('DOMNodeInserted', blockUsers); // 监听插入事件 + } } @@ -697,20 +726,24 @@ function questionInvitation(){ collapsedNowAnswer(".ContentLayout"); // 收起当前回答 + 快捷返回顶部 setInterval(topTime_people, 300); // 置顶显示时间 EventXMLHttpRequest(); // 区分问题文章 + blockUsers(); // 屏蔽指定用户 } } else if (window.location.href.indexOf("zhuanlan") > -1){ // 文章 // backToTop("article.Post-Main.Post-NormalMain"); // 快捷返回顶部 backToTop("div.Post-Sub.Post-NormalSub"); // 快捷返回顶部 setInterval(topTime_zhuanlan, 300); // 置顶显示时间 + blockUsers(); // 屏蔽指定用户 } else if (window.location.href.indexOf("column") > -1) { // 专栏 // collapsedAnswer(); // 一键收起回答 collapsedNowAnswer("main div"); // 收起当前回答 + 快捷返回顶部 setInterval(topTime_zhuanlan, 300); // 置顶显示时间 + blockUsers(); // 屏蔽指定用户 } else if (window.location.href.indexOf("people") > -1 || window.location.href.indexOf("org") > -1) { // 用户主页 // collapsedAnswer(); // 一键收起回答 collapsedNowAnswer("main div"); // 收起当前回答 + 快捷返回顶部 collapsedNowAnswer(".Profile-main"); // 收起当前回答 + 快捷返回顶部 setInterval(topTime_people, 300); // 置顶显示时间 + blockUsers(); // 屏蔽指定用户 } else { // 首页 // collapsedAnswer(); // 一键收起回答 collapsedNowAnswer("main div"); // 收起当前回答 + 快捷返回顶部 From 55481fd8cf070e0064c9613fc645ed88d064ad83 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 16 Jun 2021 18:55:14 +0800 Subject: [PATCH 0008/2110] =?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=E6=94=B6=E8=97=8F=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 52pojie-Enhanced.user.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/52pojie-Enhanced.user.js b/52pojie-Enhanced.user.js index d12b4c43d..3ce779915 100644 --- a/52pojie-Enhanced.user.js +++ b/52pojie-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 吾爱破解论坛增强 - 自动签到、翻页 -// @version 1.2.7 +// @version 1.2.8 // @author X.I.U // @description 自动签到、自动无缝翻页、屏蔽导读悬赏贴(最新发表页) // @match *://www.52pojie.cn/* @@ -116,8 +116,19 @@ scrollDelta: 899 } }, - search: { + favorite: { SiteTypeID: 5, + pager: { + type: 1, + nextLink: '//a[@class="nxt"][@href]', + pageElement: 'css;ul#favorite_ul > li', + HT_insert: ['css;ul#favorite_ul', 2], + replaceE: 'css;div.pg', + scrollDelta: 899 + } + }, + search: { + SiteTypeID: 6, pager: { type: 1, nextLink: '//a[@class="nxt"][@href]', @@ -147,6 +158,8 @@ delateReward(); // 屏蔽导读悬赏贴(最新发表) } else if (location.search.indexOf('mod=collection') > -1) { curSite = DBSite.collection; // 淘贴列表 + } else if (location.search.indexOf('do=favorite') > -1) { + curSite = DBSite.favorite; // 收藏列表 } else if (location.pathname === '/search.php') { curSite = DBSite.search; // 搜索结果列表 } From eec1aceea7bcf6a6f279f2533d7af5c16524ea3f Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 16 Jun 2021 19:35:15 +0800 Subject: [PATCH 0009/2110] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[3DM=E3=80=81?= =?UTF-8?q?=E6=B8=B8=E6=B0=91=E6=98=9F=E7=A9=BA]=20=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 55 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 505ee21d0..2c4179191 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 1.2.2 +// @version 1.2.3 // @author X.I.U -// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、豆瓣、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛 +// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、豆瓣电影、3DM、游民星空、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛 // @match *://www.423down.com/* // @exclude *://www.423down.com/*.html // @match *://apphot.cc/* @@ -19,6 +19,9 @@ // @match *://www.centbrowser.net/* // @match *://pubmed.ncbi.nlm.nih.gov/?term=* // @match *://movie.douban.com/* +// @match *://search.douban.com/* +// @match *://www.3dmgame.com/bagua/*.html +// @match *://www.gamersky.com/ent/*/*.shtml // @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png // @grant GM_xmlhttpRequest // @grant GM_registerMenuCommand @@ -252,6 +255,39 @@ replaceE: 'css;.paginator', scrollDelta: 700 } + }, + douban_search: { + SiteTypeID: 18, + pager: { + type: 1, + nextLink: '//a[@class="next"][@href]', + pageElement: 'css;#root [class^="_"] [class^="sc-"]', + HT_insert: ['css;.paginator', 1], + replaceE: 'css;.paginator', + scrollDelta: 700 + } + }, + _3dmgame: { + SiteTypeID: 19, + pager: { + type: 1, + nextLink: '//li[@class="next"]/a[@href]', + pageElement: 'css;.news_warp_center > p', + HT_insert: ['css;.news_warp_center', 3], + replaceE: 'css;.pagewrap', + scrollDelta: 1000 + } + }, + gamersky: { + SiteTypeID: 20, + pager: { + type: 1, + nextLink: '//div[@class="page_css"]/a[text()="下一页"][@href]', + pageElement: 'css;.Mid2L_con > p', + HT_insert: ['css;.page_css', 1], + replaceE: 'css;.page_css', + scrollDelta: 1000 + } } }; @@ -331,6 +367,17 @@ curSite = DBSite.douban_subject_episode; } break; + case "search.douban.com": + curSite = DBSite.douban_search; + break; + case "www.3dmgame.com": + curSite = DBSite._3dmgame; + document.lastChild.appendChild(document.createElement('style')).textContent = `#Comments_wrap {display: none !important;}` // 隐藏评论区 + break; + case "www.gamersky.com": + curSite = DBSite.gamersky; + document.lastElementChild.appendChild(document.createElement('style')).textContent = `.Comment {display: none !important;}` // 隐藏评论区 + break; } curSite.pageUrl = ""; // 下一页URL pageLoading(); // 自动无缝翻页 @@ -473,7 +520,7 @@ if (curSite.pager) { let curPageEle = getElementByXpath(curSite.pager.nextLink); var url = this.getFullHref(curPageEle); - //console.log(`${url} ${curPageEle} ${curSite.pageUrl}`); + console.log(`${url} ${curPageEle} ${curSite.pageUrl}`); if(url === '') return; if(curSite.pageUrl === url) return;// 避免重复加载相同的页面 curSite.pageUrl = url; @@ -485,7 +532,7 @@ timeout: 5000, onload: function (response) { try { - //console.log(`${response.responseText}`) + console.log(`${response.responseText}`) var newBody = ShowPager.createDocumentByString(response.responseText); let pageElems = getAllElements(curSite.pager.pageElement, newBody, newBody); let toElement = getAllElements(curSite.pager.HT_insert[0])[0]; From 0bf478f787d96a1131e9ba26daff855d215e64c3 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 16 Jun 2021 20:30:29 +0800 Subject: [PATCH 0010/2110] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E6=8C=87=E5=AE=9A=E5=85=B3=E9=94=AE=E8=AF=8D=EF=BC=88?= =?UTF-8?q?=E6=A0=87=E9=A2=98=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 --- Zhihu-Enhanced.user.js | 135 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 133 insertions(+), 2 deletions(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index bf5341b90..934b92c48 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 知乎增强 -// @version 1.4.3 +// @version 1.4.4 // @author X.I.U -// @description 移除登录弹窗、一键收起回答、收起当前回答/评论(点击两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽指定用户、屏蔽盐选内容、置顶显示时间、显示问题时间、区分问题文章、默认高清原图、默认站外直链 +// @description 移除登录弹窗、一键收起回答、收起当前回答/评论(点击两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽指定用户、屏蔽指定关键词(标题)、屏蔽盐选内容、置顶显示时间、显示问题时间、区分问题文章、默认高清原图、默认站外直链 // @match *://www.zhihu.com/* // @match *://zhuanlan.zhihu.com/* // @icon https://static.zhihu.com/heifetz/favicon.ico @@ -23,6 +23,8 @@ var menu_ALL = [ ['menu_backToTop', '快捷回到顶部(右键两侧空白处)', '快捷回到顶部', true], ['menu_blockUsers', '屏蔽指定用户', '屏蔽指定用户', false], ['menu_customBlockUsers', '自定义屏蔽用户', '自定义屏蔽用户', ['故事档案局', '盐选推荐', '盐选科普', '盐选成长计划', '知乎盐选会员', '知乎盐选创作者', '盐选心理', '盐选健康必修课', '盐选奇妙物语', '盐选生活馆', '盐选职场', '盐选文学甄选', '盐选作者小管家', '盐选博物馆', '盐选点金', '盐选测评室', '盐选科技前沿', '盐选会员精品']], + ['menu_blockKeywords', '屏蔽指定关键词', '屏蔽指定关键词', false], + ['menu_customBlockKeywords', '自定义屏蔽关键词', '自定义屏蔽关键词', []], ['menu_blockYanXuan', '屏蔽盐选内容', '屏蔽盐选内容', false], ['menu_publishTop', '置顶显示时间', '置顶显示时间', true], ['menu_allTime', '完整显示时间', '完整显示时间', true], @@ -45,6 +47,8 @@ function registerMenuCommand() { menu_ALL[i][3] = GM_getValue(menu_ALL[i][0]); if (menu_ALL[i][0] === 'menu_customBlockUsers') { 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 { 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]}`)}); } @@ -347,6 +351,130 @@ function blockUsers(type) { } +// 自定义屏蔽关键词(标题) +function customBlockKeywords() { + let nowBlockKeywords = ''; + menu_value('menu_customBlockKeywords').forEach(function(item){nowBlockKeywords = nowBlockKeywords + '|' + item}) + let newBlockKeywords = prompt('编辑 [自定义屏蔽关键词]\n(不同关键词之间使用 "|" 分隔,例如:关键词A|关键词B|关键词C )', nowBlockKeywords.replace('|','')); + if (newBlockKeywords === '') { + GM_setValue('menu_customBlockKeywords', []); + registerMenuCommand(); // 重新注册脚本菜单 + } else if (newBlockKeywords != null) { + GM_setValue('menu_customBlockKeywords', newBlockKeywords.split('|')); + registerMenuCommand(); // 重新注册脚本菜单 + } +}; + + +// 屏蔽指定关键词(标题) +function blockKeywords(type) { + if (!menu_value('menu_blockKeywords')) return + if (!menu_value('menu_customBlockKeywords') || menu_value('menu_customBlockKeywords').length < 1) return + switch(type) { + case 'index': + blockKeywords_index(); + break; + case 'people': + blockKeywords_people(); + break; + case 'search': + blockKeywords_search(); + break; + } + + function blockKeywords_index() { + let blockKeywords = e => { + if (e.target.innerHTML && e.target.getElementsByClassName('ContentItem-title').length > 0) { + let item = e.target.querySelector('h2.ContentItem-title meta[itemprop="name"]'); // 标题所在元素 + if (item) { + //console.log(item) + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 + if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 + console.log(item.content); + item.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } + }) + } else { // 如果是文章标题 + item = e.target.querySelector('.ContentItem.ArticleItem meta[itemprop="headline"]'); // 标题所在元素 + if (item) { + //console.log(item) + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 + if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 + console.log('aaaaaaaa',item.content); + item.parentNode.parentNode.parentNode.remove(); + } + }) + } + } + } + } + document.addEventListener('DOMNodeInserted', blockKeywords); // 监听插入事件 + } + + + function blockKeywords_people() { + let blockKeywords = e => { + if (e.target.innerHTML && e.target.getElementsByClassName('ContentItem-title').length > 0) { + let item = e.target.querySelector('h2.ContentItem-title meta[itemprop="name"]'); // 标题所在元素 + if (item) { + //console.log(item) + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 + if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 + console.log(item.content); + item.parentNode.parentNode.parentNode.parentNode.remove(); + } + }) + } else { // 如果是文章标题 + item = e.target.querySelector('.ContentItem.ArticleItem meta[itemprop="headline"]'); // 标题所在元素 + if (item) { + //console.log(item) + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 + if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 + console.log('aaaaaaaa',item.content); + item.parentNode.parentNode.remove(); + } + }) + } + } + } + } + document.addEventListener('DOMNodeInserted', blockKeywords); // 监听插入事件 + } + + + function blockKeywords_search() { + let blockKeywords = e => { + //if (e.target.innerHTML) console.log(e.target.innerHTML) + if (e.target.innerHTML && e.target.getElementsByClassName('ContentItem-title').length > 0) { + //console.log(e.target.innerHTML) + let item = e.target.querySelector('h2.ContentItem-title meta[itemprop="name"]'); // 标题所在元素 + if (item) { + //console.log(item) + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 + if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 + console.log(item.content); + item.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } + }) + } else { // 如果是文章标题 + item = e.target.querySelector('h2.ContentItem-title a[data-za-detail-view-id]'); // 标题所在元素 + if (item) { + //console.log(item) + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 + if (item.innerText.indexOf(item1) > -1) { // 找到就删除该信息流 + console.log('aaaaaaaa',item.content); + item.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } + }) + } + } + } + } + document.addEventListener('DOMNodeInserted', blockKeywords); // 监听插入事件 + } +} + + // 屏蔽盐选内容 function blockYanXuan() { if (!menu_value('menu_blockYanXuan')) return @@ -719,6 +847,7 @@ function questionInvitation(){ setInterval(topTime_search, 300); // 置顶显示时间 EventXMLHttpRequest(); // 区分问题文章 blockUsers('search'); // 屏蔽指定用户 + blockKeywords('search'); // 屏蔽指定关键词 } else if (window.location.href.indexOf("topic") > -1) { // 话题页 // if (window.location.href.indexOf("hot") > -1 || window.location.href.indexOf("top-answers") > -1) { // 仅限 [讨论] [精华] collapsedAnswer(); // 一键收起回答 @@ -744,6 +873,7 @@ function questionInvitation(){ collapsedNowAnswer(".Profile-main"); // 收起当前回答 + 快捷返回顶部 setInterval(topTime_people, 300); // 置顶显示时间 blockUsers(); // 屏蔽指定用户 + blockKeywords('people'); // 屏蔽指定关键词 } else { // 首页 // collapsedAnswer(); // 一键收起回答 collapsedNowAnswer("main div"); // 收起当前回答 + 快捷返回顶部 @@ -751,5 +881,6 @@ function questionInvitation(){ setInterval(topTime_index, 300); // 置顶显示时间 EventXMLHttpRequest(); // 区分问题文章 blockUsers('index'); // 屏蔽指定用户 + blockKeywords('index'); // 屏蔽指定关键词 } })(); \ No newline at end of file From 272a964ab8e56aff0235d12a730feb1a2f89db8c Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 16 Jun 2021 20:47:06 +0800 Subject: [PATCH 0011/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E6=8C=87=E5=AE=9A=E5=85=B3=E9=94=AE=E8=AF=8D=EF=BC=88?= =?UTF-8?q?=E6=A0=87=E9=A2=98=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 --- Zhihu-Enhanced.user.js | 45 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index 934b92c48..fb6143aa1 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -374,6 +374,10 @@ function blockKeywords(type) { case 'index': blockKeywords_index(); break; + case 'topic': + blockKeywords_topic(); + blockKeywords_people(); + break; case 'people': blockKeywords_people(); break; @@ -400,7 +404,7 @@ function blockKeywords(type) { //console.log(item) menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 - console.log('aaaaaaaa',item.content); + console.log('文章',item.content); item.parentNode.parentNode.parentNode.remove(); } }) @@ -412,12 +416,41 @@ function blockKeywords(type) { } + function blockKeywords_topic() { + let item = document.querySelectorAll('h2.ContentItem-title meta[itemprop="name"]'); // 标题所在元素 + if (item.length > 0) { + //console.log(item) + item.forEach(function(item2){ + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 + if (item2.content.indexOf(item1) > -1) { // 找到就删除该信息流 + console.log(item2.content); + item2.parentNode.parentNode.parentNode.parentNode.remove(); + } + }) + }) + } else { // 如果是文章标题 + item = document.querySelectorAll('.ContentItem.ArticleItem meta[itemprop="headline"]'); // 标题所在元素 + if (item.length > 0) { + //console.log(item) + item.forEach(function(item2){ + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 + if (item2.content.indexOf(item1) > -1) { // 找到就删除该信息流 + console.log('文章',item2.content); + item2.parentNode.parentNode.remove(); + } + }) + }) + } + } + } + + function blockKeywords_people() { let blockKeywords = e => { if (e.target.innerHTML && e.target.getElementsByClassName('ContentItem-title').length > 0) { let item = e.target.querySelector('h2.ContentItem-title meta[itemprop="name"]'); // 标题所在元素 if (item) { - //console.log(item) + console.log(item) menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 console.log(item.content); @@ -427,10 +460,10 @@ function blockKeywords(type) { } else { // 如果是文章标题 item = e.target.querySelector('.ContentItem.ArticleItem meta[itemprop="headline"]'); // 标题所在元素 if (item) { - //console.log(item) + console.log(item) menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 - console.log('aaaaaaaa',item.content); + console.log('文章',item.content); item.parentNode.parentNode.remove(); } }) @@ -444,6 +477,7 @@ function blockKeywords(type) { function blockKeywords_search() { let blockKeywords = e => { + if (location.search.indexOf('&type=content') === -1) return //if (e.target.innerHTML) console.log(e.target.innerHTML) if (e.target.innerHTML && e.target.getElementsByClassName('ContentItem-title').length > 0) { //console.log(e.target.innerHTML) @@ -462,7 +496,7 @@ function blockKeywords(type) { //console.log(item) menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 if (item.innerText.indexOf(item1) > -1) { // 找到就删除该信息流 - console.log('aaaaaaaa',item.content); + console.log('文章',item.content); item.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); } }) @@ -856,6 +890,7 @@ function questionInvitation(){ setInterval(topTime_people, 300); // 置顶显示时间 EventXMLHttpRequest(); // 区分问题文章 blockUsers(); // 屏蔽指定用户 + blockKeywords('topic'); // 屏蔽指定关键词 } } else if (window.location.href.indexOf("zhuanlan") > -1){ // 文章 // backToTop("article.Post-Main.Post-NormalMain"); // 快捷返回顶部 From ae63aea475d86085330545483421db3583258c42 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 16 Jun 2021 21:03:52 +0800 Subject: [PATCH 0012/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E6=8C=87=E5=AE=9A=E5=85=B3=E9=94=AE=E8=AF=8D=EF=BC=88?= =?UTF-8?q?=E6=A0=87=E9=A2=98=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 --- Zhihu-Enhanced.user.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index fb6143aa1..f504315f7 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎增强 -// @version 1.4.4 +// @version 1.4.5 // @author X.I.U // @description 移除登录弹窗、一键收起回答、收起当前回答/评论(点击两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽指定用户、屏蔽指定关键词(标题)、屏蔽盐选内容、置顶显示时间、显示问题时间、区分问题文章、默认高清原图、默认站外直链 // @match *://www.zhihu.com/* @@ -393,7 +393,7 @@ function blockKeywords(type) { if (item) { //console.log(item) menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 - if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 + if (item.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 console.log(item.content); item.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); } @@ -403,7 +403,7 @@ function blockKeywords(type) { if (item) { //console.log(item) menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 - if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 + if (item.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 console.log('文章',item.content); item.parentNode.parentNode.parentNode.remove(); } @@ -422,7 +422,7 @@ function blockKeywords(type) { //console.log(item) item.forEach(function(item2){ menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 - if (item2.content.indexOf(item1) > -1) { // 找到就删除该信息流 + if (item2.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 console.log(item2.content); item2.parentNode.parentNode.parentNode.parentNode.remove(); } @@ -434,7 +434,7 @@ function blockKeywords(type) { //console.log(item) item.forEach(function(item2){ menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 - if (item2.content.indexOf(item1) > -1) { // 找到就删除该信息流 + if (item2.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 console.log('文章',item2.content); item2.parentNode.parentNode.remove(); } @@ -452,7 +452,7 @@ function blockKeywords(type) { if (item) { console.log(item) menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 - if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 + if (item.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 console.log(item.content); item.parentNode.parentNode.parentNode.parentNode.remove(); } @@ -462,7 +462,7 @@ function blockKeywords(type) { if (item) { console.log(item) menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 - if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 + if (item.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 console.log('文章',item.content); item.parentNode.parentNode.remove(); } @@ -485,7 +485,7 @@ function blockKeywords(type) { if (item) { //console.log(item) menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 - if (item.content.indexOf(item1) > -1) { // 找到就删除该信息流 + if (item.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 console.log(item.content); item.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); } @@ -495,7 +495,7 @@ function blockKeywords(type) { if (item) { //console.log(item) menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 - if (item.innerText.indexOf(item1) > -1) { // 找到就删除该信息流 + if (item.innerText.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 console.log('文章',item.content); item.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); } From 97d91cb7f7e1a58f5ecb5a546803ae6bceb5f80c Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 16 Jun 2021 21:05:53 +0800 Subject: [PATCH 0013/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E6=8C=87=E5=AE=9A=E5=85=B3=E9=94=AE=E8=AF=8D=EF=BC=88?= =?UTF-8?q?=E6=A0=87=E9=A2=98=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 --- Zhihu-Enhanced.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index f504315f7..1aa02f842 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -355,7 +355,7 @@ function blockUsers(type) { function customBlockKeywords() { let nowBlockKeywords = ''; menu_value('menu_customBlockKeywords').forEach(function(item){nowBlockKeywords = nowBlockKeywords + '|' + item}) - let newBlockKeywords = prompt('编辑 [自定义屏蔽关键词]\n(不同关键词之间使用 "|" 分隔,例如:关键词A|关键词B|关键词C )', nowBlockKeywords.replace('|','')); + let newBlockKeywords = prompt('编辑 [自定义屏蔽关键词]\n(不同关键词之间使用 "|" 分隔,例如:关键词A|关键词B|关键词C \n(关键词不区分大小写', nowBlockKeywords.replace('|','')); if (newBlockKeywords === '') { GM_setValue('menu_customBlockKeywords', []); registerMenuCommand(); // 重新注册脚本菜单 From bf3d934ed8cfb29ee6fca921cb2ddfe8531cd306 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 17 Jun 2021 11:51:06 +0800 Subject: [PATCH 0014/2110] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=8D=83?= =?UTF-8?q?=E5=9B=BE=E7=BD=91]=20=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 61 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 2c4179191..6f1bb9032 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 1.2.3 +// @version 1.2.4 // @author X.I.U -// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、豆瓣电影、3DM、游民星空、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛 +// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、豆瓣电影、3DM、游民星空、千图网、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛 // @match *://www.423down.com/* // @exclude *://www.423down.com/*.html // @match *://apphot.cc/* @@ -22,6 +22,7 @@ // @match *://search.douban.com/* // @match *://www.3dmgame.com/bagua/*.html // @match *://www.gamersky.com/ent/*/*.shtml +// @match *://www.58pic.com/* // @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png // @grant GM_xmlhttpRequest // @grant GM_registerMenuCommand @@ -288,6 +289,34 @@ replaceE: 'css;.page_css', scrollDelta: 1000 } + }, + _58pic: { + SiteTypeID: 21, + pager: { + type: 1, + nextLink: '//div[contains(@class,"page-box")]//a[text()="下一页"][@href]', + pageElement: 'css;.pic-box > .qtw-card', + HT_insert: ['css;.pic-box', 3], + replaceE: 'css;.page-box', + scrollDelta: 2000 + }, + function: { + before: _58pic_beforeFunction + } + }, + _58pic_c: { + SiteTypeID: 22, + pager: { + type: 1, + nextLink: '//div[contains(@class,"page-box")]//a[text()="下一页"][@href]', + pageElement: 'css;.list-box > .qtw-card', + HT_insert: ['css;.list-box', 3], + replaceE: 'css;.page-box', + scrollDelta: 4000 + }, + function: { + before: _58pic_beforeFunction + } } }; @@ -378,6 +407,13 @@ curSite = DBSite.gamersky; document.lastElementChild.appendChild(document.createElement('style')).textContent = `.Comment {display: none !important;}` // 隐藏评论区 break; + case "www.58pic.com": + if (location.pathname.indexOf("/tupian/") > -1) { + curSite = DBSite._58pic; + } else if (location.pathname.indexOf("/c/") > -1) { + curSite = DBSite._58pic_c; + } + break; } curSite.pageUrl = ""; // 下一页URL pageLoading(); // 自动无缝翻页 @@ -463,6 +499,23 @@ } + // iplaysoft 的插入前函数 + function _58pic_beforeFunction(pageElems) { + let is_one = document.querySelector(".qtw-card.place-box.is-one"); + if (is_one && is_one.style.display != "none") { + is_one.setAttribute("style", "display: none;") + } + pageElems.forEach(function (one) { + let now = one.querySelector("img.lazy") + if (now && now.getAttribute('src') === "//icon.qiantucdn.com/static/images/qtw-card/card-place.png") { + now.setAttribute("src", now.dataset.original) + now.setAttribute("style", "display: block;") + } + }); + return pageElems + } + + // 滚动条事件 function windowScroll(fn1) { var beforeScrollTop = document.documentElement.scrollTop, @@ -520,7 +573,7 @@ if (curSite.pager) { let curPageEle = getElementByXpath(curSite.pager.nextLink); var url = this.getFullHref(curPageEle); - console.log(`${url} ${curPageEle} ${curSite.pageUrl}`); + //console.log(`${url} ${curPageEle} ${curSite.pageUrl}`); if(url === '') return; if(curSite.pageUrl === url) return;// 避免重复加载相同的页面 curSite.pageUrl = url; @@ -532,7 +585,7 @@ timeout: 5000, onload: function (response) { try { - console.log(`${response.responseText}`) + //console.log(`${response.responseText}`) var newBody = ShowPager.createDocumentByString(response.responseText); let pageElems = getAllElements(curSite.pager.pageElement, newBody, newBody); let toElement = getAllElements(curSite.pager.HT_insert[0])[0]; From 4709280af33f5cc33fb873dced86eb5fa541671c Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 17 Jun 2021 17:00:08 +0800 Subject: [PATCH 0015/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E6=8C=87=E5=AE=9A=E5=85=B3=E9=94=AE=E8=AF=8D]=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=88=E9=A6=96=E9=A1=B5=E5=92=8C=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E7=BB=93=E6=9E=9C=E9=81=97=E6=BC=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Enhanced.user.js | 82 +++++++++++++++++++++++++++--------------- 1 file changed, 54 insertions(+), 28 deletions(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index 1aa02f842..2358aeeaf 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎增强 -// @version 1.4.5 +// @version 1.4.6 // @author X.I.U // @description 移除登录弹窗、一键收起回答、收起当前回答/评论(点击两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽指定用户、屏蔽指定关键词(标题)、屏蔽盐选内容、置顶显示时间、显示问题时间、区分问题文章、默认高清原图、默认站外直链 // @match *://www.zhihu.com/* @@ -372,6 +372,7 @@ function blockKeywords(type) { if (!menu_value('menu_customBlockKeywords') || menu_value('menu_customBlockKeywords').length < 1) return switch(type) { case 'index': + blockKeywords_index_(); blockKeywords_index(); break; case 'topic': @@ -386,6 +387,38 @@ function blockKeywords(type) { break; } + function blockKeywords_index_() { + let item = document.querySelectorAll('h2.ContentItem-title meta[itemprop="name"]'); // 标题所在元素 + if (item.length > 0) { + item.forEach(function(item2){ + //console.log(item2) + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 + if (item2.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 + console.log(item2.content); + if (item2.parentNode.parentNode.parentNode.parentNode.parentNode.className === 'Feed') { + item2.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } else { + item2.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } + } + }) + }) + } + // 如果是文章标题 + item = document.querySelectorAll('.ContentItem.ArticleItem meta[itemprop="headline"]'); // 标题所在元素 + if (item.length > 0) { + item.forEach(function(item2){ + //console.log(item2) + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 + if (item2.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 + console.log('文章',item2.content); + item2.parentNode.parentNode.parentNode.remove(); + } + }) + }) + } + } + function blockKeywords_index() { let blockKeywords = e => { if (e.target.innerHTML && e.target.getElementsByClassName('ContentItem-title').length > 0) { @@ -395,7 +428,11 @@ function blockKeywords(type) { menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 if (item.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 console.log(item.content); - item.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + if (item.parentNode.parentNode.parentNode.parentNode.parentNode.className === 'Feed') { + item.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } else { + item.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); + } } }) } else { // 如果是文章标题 @@ -428,19 +465,19 @@ function blockKeywords(type) { } }) }) - } else { // 如果是文章标题 - item = document.querySelectorAll('.ContentItem.ArticleItem meta[itemprop="headline"]'); // 标题所在元素 - if (item.length > 0) { - //console.log(item) - item.forEach(function(item2){ - menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 - if (item2.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 - console.log('文章',item2.content); - item2.parentNode.parentNode.remove(); - } - }) + } + // 如果是文章标题 + item = document.querySelectorAll('.ContentItem.ArticleItem meta[itemprop="headline"]'); // 标题所在元素 + if (item.length > 0) { + //console.log(item) + item.forEach(function(item2){ + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 + if (item2.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 + console.log('文章',item2.content); + item2.parentNode.parentNode.remove(); + } }) - } + }) } } @@ -481,26 +518,15 @@ function blockKeywords(type) { //if (e.target.innerHTML) console.log(e.target.innerHTML) if (e.target.innerHTML && e.target.getElementsByClassName('ContentItem-title').length > 0) { //console.log(e.target.innerHTML) - let item = e.target.querySelector('h2.ContentItem-title meta[itemprop="name"]'); // 标题所在元素 + let item = e.target.querySelector('h2.ContentItem-title a[data-za-detail-view-id]'); // 标题所在元素 if (item) { //console.log(item) menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 - if (item.content.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 - console.log(item.content); + if (item.innerText.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 + console.log(item.innerText); item.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); } }) - } else { // 如果是文章标题 - item = e.target.querySelector('h2.ContentItem-title a[data-za-detail-view-id]'); // 标题所在元素 - if (item) { - //console.log(item) - menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词黑名单 - if (item.innerText.toLowerCase().indexOf(item1.toLowerCase()) > -1) { // 找到就删除该信息流 - console.log('文章',item.content); - item.parentNode.parentNode.parentNode.parentNode.parentNode.remove(); - } - }) - } } } } From 3f8c2c7f5e78c721a588543476b4d4ab562af5d0 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 17 Jun 2021 17:05:16 +0800 Subject: [PATCH 0016/2110] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20HostLoc=20?= =?UTF-8?q?=E5=8F=A6=E4=B8=80=E4=B8=AA=E5=9F=9F=E5=90=8D=E7=9A=84=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index b8ccab8b8..f57de417c 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,9 +1,10 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.2.0 +// @version 1.2.1 // @author X.I.U // @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 // @match *://hostloc.com/* +// @match *://91ai.net/* // @icon https://www.hostloc.com/favicon.ico // @grant GM_xmlhttpRequest // @grant GM_registerMenuCommand @@ -181,7 +182,7 @@ let url_list = [], url = 0; // 随机生成 12 个空间地址(2 个冗余) - for(let i = 0;i < 12;i++){url_list[i] = "https://hostloc.com/space-uid-" + Math.floor(Math.random()*(50000-10000+1)+10000) + ".html";} + 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); let signIn = setInterval(function(){ From 73f6fd762cba5949f6efa534df0ef29410f9f807 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 18 Jun 2021 15:54:26 +0800 Subject: [PATCH 0017/2110] =?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 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index df46649e0..87eb96feb 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.0.1 +// @version 1.0.2 // @author X.I.U // @description 最简单的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -17,7 +17,7 @@ (function() { var menu_ALL = [ - ['menu_runDuringTheDay', '白天保持开启 (比晚上更亮一点)', '白天保持开启', true], + ['menu_runDuringTheDay', '白天保持开启 (比晚上亮一点点)', '白天保持开启', true], ['menu_darkModeType', '点击切换模式', '点击切换模式', 1] ], menu_ID = []; for (let i=0;i Date: Fri, 18 Jun 2021 18:01:51 +0800 Subject: [PATCH 0018/2110] =?UTF-8?q?=E6=8E=92=E9=99=A4=20=E9=83=A8?= =?UTF-8?q?=E5=88=86=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E8=A7=86=E9=A2=91=E7=BD=91=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 87eb96feb..6fc7ecaea 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,9 +1,14 @@ // ==UserScript== // @name 护眼模式 -// @version 1.0.2 +// @version 1.0.3 // @author X.I.U // @description 最简单的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* +// @exclude *://v.qq.com/* +// @exclude *://*.iqiyi.com/* +// @exclude *://*.youku.com/* +// @exclude *://*.mgtv.com/* +// @exclude *://tv.cctv.com/* // @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png // @grant GM_registerMenuCommand // @grant GM_unregisterMenuCommand From 4a27ef430df54e7e6a978f5ca633984d93a89d18 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 19 Jun 2021 13:34:37 +0800 Subject: [PATCH 0019/2110] =?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 | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 6fc7ecaea..2355f031f 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.0.3 +// @version 1.0.4 // @author X.I.U // @description 最简单的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -98,7 +98,7 @@ style_Add = document.createElement('style'), hours = new Date().getHours(), style = ``, - style_00 = `body {background-color: #ffffff;}`, + style_00 = `html {background-color: #ffffff;}`, style_11 = `html {filter: brightness(80%) !important;}`, style_11_firefox = `html {filter: brightness(80%) !important; background-image: url();}`, style_12 = `html {filter: brightness(70%) !important;}`, @@ -111,11 +111,12 @@ style_31_firefox = `html {filter: invert(80%) !important;} img, video {filter: invert(1) !important; background-image: url();}`; // 判断网页是否没有设置背景颜色(没有背景颜色会导致滤镜对背景颜色无效) - if (document.body) { + /*if (document.body) { + console.log(window.getComputedStyle(document.body).backgroundColor) rgbValueArry = window.getComputedStyle(document.body).backgroundColor.replace ('rgb(', '').replace ('rgba(', '').replace (')', '').split (', '); grayLevel = rgbValueArry [0] + rgbValueArry [1] + rgbValueArry [2]; if (grayLevel === "000") style += style_00 - } + }*/ // Firefox 浏览器需要特殊对待 if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { @@ -161,18 +162,18 @@ } // 为了避免 body 还没加载导致无法检查是否设置背景颜色的备用措施 - if (!grayLevel) { - let timer2 = setInterval(function(){ - if (document.body) { - let rgbValueArry = window.getComputedStyle(document.body).backgroundColor.replace ('rgb(', '').replace ('rgba(', '').replace (')', '').split (', '), - style_Add1 = document.createElement('style'); - if (rgbValueArry [0] + rgbValueArry [1] + rgbValueArry [2] === "000") { - style_Add1.innerHTML = style_00; - document.head.appendChild(style_Add1); - } - clearInterval(timer2); + //if (!grayLevel) { + setTimeout(function(){ + if (document.body) { + console.log(window.getComputedStyle(document.body).backgroundColor) + let rgbValueArry = window.getComputedStyle(document.body).backgroundColor.replace ('rgb(', '').replace ('rgba(', '').replace (')', '').split (', '), + style_Add1 = document.createElement('style'); + if (rgbValueArry [0] + rgbValueArry [1] + rgbValueArry [2] === "000") { + style_Add1.innerHTML = style_00; + document.head.appendChild(style_Add1); } - }, 1); - } + } + }, 100); + //} } })(); \ No newline at end of file From abf33612120c44328e16c51cee9ee2e3008b0955 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 20 Jun 2021 16:37:31 +0800 Subject: [PATCH 0020/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E6=B3=A8=E5=85=A5=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 2355f031f..47397fbbd 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.0.4 +// @version 1.0.5 // @author X.I.U // @description 最简单的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -148,9 +148,9 @@ style += style_31; break; } - style_Add.innerHTML = style; - //document.lastChild.appendChild(document.createElement("style")).textContent = style; - if (document.head) { + //style_Add.innerHTML = style; + document.lastChild.appendChild(document.createElement("style")).textContent = style; + /*if (document.head) { document.head.appendChild(style_Add); } else { // 为了避免脚本运行的时候 head 还没加载导致报错 let timer = setInterval(function(){ @@ -159,18 +159,19 @@ clearInterval(timer); } }, 1); - } + }*/ // 为了避免 body 还没加载导致无法检查是否设置背景颜色的备用措施 //if (!grayLevel) { setTimeout(function(){ if (document.body) { console.log(window.getComputedStyle(document.body).backgroundColor) - let rgbValueArry = window.getComputedStyle(document.body).backgroundColor.replace ('rgb(', '').replace ('rgba(', '').replace (')', '').split (', '), - style_Add1 = document.createElement('style'); + let rgbValueArry = window.getComputedStyle(document.body).backgroundColor.replace ('rgb(', '').replace ('rgba(', '').replace (')', '').split (', '); + //style_Add1 = document.createElement('style'); if (rgbValueArry [0] + rgbValueArry [1] + rgbValueArry [2] === "000") { - style_Add1.innerHTML = style_00; - document.head.appendChild(style_Add1); + //style_Add1.innerHTML = style_00; + //document.head.appendChild(style_Add1); + document.lastChild.appendChild(document.createElement("style")).textContent = style_00; } } }, 100); From 0f09597bb73b8ca9548f268cdd40c776bff6959e Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 21 Jun 2021 10:45:21 +0800 Subject: [PATCH 0021/2110] =?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=80=BB?= =?UTF-8?q?=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index f57de417c..621ad4844 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.2.1 +// @version 1.2.2 // @author X.I.U // @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 // @match *://hostloc.com/* @@ -26,6 +26,7 @@ ['menu_customBlockUsers', '自定义屏蔽用户', '自定义屏蔽用户', []], ['menu_blockKeywords', '屏蔽关键词(帖子标题)', '屏蔽关键词(帖子标题)', false], ['menu_customBlockKeywords', '自定义屏蔽关键词', '自定义屏蔽关键词', []], + ['menu_pageLoading', '自动无缝翻页(总开关)', '自动无缝翻页', true], ['menu_thread_pageLoading', '帖子内自动翻页', '帖子内自动翻页', true], ['menu_backToTop', '快捷回到顶部(右键点击两侧空白处)', '快捷回到顶部', true], ['menu_collapsedNowPost', '收起预览帖子(左键点击两侧空白处)', '收起预览帖子', true], @@ -328,6 +329,7 @@ // 自动翻页 function pageLoading() { + if (!menu_value('menu_pageLoading')) return if (curSite.SiteTypeID > 0){ windowScroll(function (direction, e) { if (direction === "down") { // 下滑才准备翻页 From 57d844641bc463b9094f652d05536481553a8575 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 21 Jun 2021 22:28:10 +0800 Subject: [PATCH 0022/2110] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=BD=91=E9=A1=B5=20(beta)]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 47397fbbd..ee259760e 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.0.5 +// @version 1.0.6 // @author X.I.U // @description 最简单的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -14,6 +14,7 @@ // @grant GM_unregisterMenuCommand // @grant GM_getValue // @grant GM_setValue +// @grant GM_notification // @noframes // @license GPL-3.0 License // @run-at document-start @@ -23,6 +24,7 @@ (function() { var menu_ALL = [ ['menu_runDuringTheDay', '白天保持开启 (比晚上亮一点点)', '白天保持开启', true], + ['menu_autoRecognition', '排除自带暗黑模式的网页 (beta)', '排除自带暗黑模式的网页 (beta)', true], ['menu_darkModeType', '点击切换模式', '点击切换模式', 1] ], menu_ID = []; for (let i=0;i -1) { style_11 = style_11_firefox @@ -148,33 +140,26 @@ style += style_31; break; } - //style_Add.innerHTML = style; - document.lastChild.appendChild(document.createElement("style")).textContent = style; - /*if (document.head) { - document.head.appendChild(style_Add); - } else { // 为了避免脚本运行的时候 head 还没加载导致报错 - let timer = setInterval(function(){ - if (document.head) { - document.head.appendChild(style_Add); - clearInterval(timer); - } - }, 1); - }*/ + style_Add.id = 'XIU2DarkMode'; + document.lastChild.appendChild(style_Add).textContent = style; // 为了避免 body 还没加载导致无法检查是否设置背景颜色的备用措施 - //if (!grayLevel) { setTimeout(function(){ if (document.body) { - console.log(window.getComputedStyle(document.body).backgroundColor) let rgbValueArry = window.getComputedStyle(document.body).backgroundColor.replace ('rgb(', '').replace ('rgba(', '').replace (')', '').split (', '); - //style_Add1 = document.createElement('style'); + let grayLevel = rgbValueArry [0] + rgbValueArry [1] + rgbValueArry [2]; + console.log(grayLevel) + console.log(window.getComputedStyle(document.body).backgroundColor) + if (rgbValueArry [0] + rgbValueArry [1] + rgbValueArry [2] === "000") { - //style_Add1.innerHTML = style_00; - //document.head.appendChild(style_Add1); document.lastChild.appendChild(document.createElement("style")).textContent = style_00; + } else if (grayLevel < 898989) { + if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) + console.log('检测到当前网页自带暗黑模式,停用本脚本ing...') + document.getElementById('XIU2DarkMode').remove(); + } } } }, 100); - //} } })(); \ No newline at end of file From e1e908301dd5dfda147ac76d4fff144a09a01b60 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 22 Jun 2021 13:03:41 +0800 Subject: [PATCH 0023/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=BD=91=E9=A1=B5=20(beta)]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index ee259760e..2590e3811 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.0.6 +// @version 1.0.7 // @author X.I.U // @description 最简单的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -143,23 +143,24 @@ style_Add.id = 'XIU2DarkMode'; document.lastChild.appendChild(style_Add).textContent = style; - // 为了避免 body 还没加载导致无法检查是否设置背景颜色的备用措施 - setTimeout(function(){ + // 为了避免 body 还没加载导致无法检查是否设置背景颜色 + let timer = setInterval(function(){ if (document.body) { - let rgbValueArry = window.getComputedStyle(document.body).backgroundColor.replace ('rgb(', '').replace ('rgba(', '').replace (')', '').split (', '); + let rgbValueArry = window.getComputedStyle(document.body).backgroundColor.replace('rgb(', '').replace('rgba(', '').replace(')', '').split(', '); let grayLevel = rgbValueArry [0] + rgbValueArry [1] + rgbValueArry [2]; console.log(grayLevel) console.log(window.getComputedStyle(document.body).backgroundColor) - if (rgbValueArry [0] + rgbValueArry [1] + rgbValueArry [2] === "000") { + if (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)') { // 如果 body 没有 CSS 背景颜色,那就需要添加一个,否则影响滤镜 document.lastChild.appendChild(document.createElement("style")).textContent = style_00; - } else if (grayLevel < 898989) { + } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || grayLevel < 898989) { if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) console.log('检测到当前网页自带暗黑模式,停用本脚本ing...') document.getElementById('XIU2DarkMode').remove(); } } + clearInterval(timer); } - }, 100); + }, 10); } })(); \ No newline at end of file From 460436a2259de5955b208b0768a1208b3b7ccfdb Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 22 Jun 2021 13:18:33 +0800 Subject: [PATCH 0024/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=BD=91=E9=A1=B5=20(beta)]=20=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, 6 insertions(+), 8 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 2590e3811..c01ff504c 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -146,16 +146,14 @@ // 为了避免 body 还没加载导致无法检查是否设置背景颜色 let timer = setInterval(function(){ if (document.body) { - let rgbValueArry = window.getComputedStyle(document.body).backgroundColor.replace('rgb(', '').replace('rgba(', '').replace(')', '').split(', '); - let grayLevel = rgbValueArry [0] + rgbValueArry [1] + rgbValueArry [2]; - console.log(grayLevel) console.log(window.getComputedStyle(document.body).backgroundColor) - - if (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)') { // 如果 body 没有 CSS 背景颜色,那就需要添加一个,否则影响滤镜 - document.lastChild.appendChild(document.createElement("style")).textContent = style_00; - } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || grayLevel < 898989) { + if (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)') { + // 如果 body 没有 CSS 背景颜色,那就需要添加一个背景颜色,否则影响滤镜效果 + document.lastChild.appendChild(document.createElement('style')).textContent = style_00; + } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || window.getComputedStyle(document.body).backgroundColor.replace(/rgb|rgba|\(|\)|,| /g, '') < 898989) { + // 如果是黑色 (等于0,0,0) 或深色 (小于 88,88,88),就停用本脚本滤镜 if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) - console.log('检测到当前网页自带暗黑模式,停用本脚本ing...') + console.log('检测到当前网页自带暗黑模式,停用本脚本滤镜...') document.getElementById('XIU2DarkMode').remove(); } } From 1c64703b618cdd72bfc344e20fd5327b964ecf21 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 22 Jun 2021 14:20:14 +0800 Subject: [PATCH 0025/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=BD=91=E9=A1=B5=20(beta)]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index c01ff504c..28c87b947 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.0.7 +// @version 1.0.8 // @author X.I.U // @description 最简单的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -144,20 +144,22 @@ document.lastChild.appendChild(style_Add).textContent = style; // 为了避免 body 还没加载导致无法检查是否设置背景颜色 - let timer = setInterval(function(){ + let timer = setInterval(function(){ // 每 10 毫秒检查一下 body 是否已存在(onload 太晚了,只能这么干) if (document.body) { - console.log(window.getComputedStyle(document.body).backgroundColor) - if (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)') { - // 如果 body 没有 CSS 背景颜色,那就需要添加一个背景颜色,否则影响滤镜效果 - document.lastChild.appendChild(document.createElement('style')).textContent = style_00; - } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || window.getComputedStyle(document.body).backgroundColor.replace(/rgb|rgba|\(|\)|,| /g, '') < 898989) { - // 如果是黑色 (等于0,0,0) 或深色 (小于 88,88,88),就停用本脚本滤镜 - if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) - console.log('检测到当前网页自带暗黑模式,停用本脚本滤镜...') - document.getElementById('XIU2DarkMode').remove(); + setTimeout(function(){ // 为了避免太快 body 的 CSS 还没加载上,先延迟 100 毫秒(缺点就是可能会出现短暂一闪而过的暗黑滤镜) + console.log(window.getComputedStyle(document.lastChild).backgroundColor, window.getComputedStyle(document.body).backgroundColor) + if (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastChild).backgroundColor === 'rgba(0, 0, 0, 0)') { + // 如果 body 没有 CSS 背景颜色,那就需要添加一个背景颜色,否则影响滤镜效果 + document.lastChild.appendChild(document.createElement('style')).textContent = style_00; + } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' || window.getComputedStyle(document.body).backgroundColor.replace(/rgb|rgba|\(|\)|,| /g, '') < 898989) { + // 如果是黑色 (等于0,0,0) 或深色 (小于 88,88,88),就停用本脚本滤镜 + if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) + console.log('检测到当前网页自带暗黑模式,停用本脚本滤镜...') + document.getElementById('XIU2DarkMode').remove(); + } } - } - clearInterval(timer); + clearInterval(timer); + }, 100); } }, 10); } From 7d91824a774d42d438534a56d798e6fae767822c Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 22 Jun 2021 14:34:00 +0800 Subject: [PATCH 0026/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=BD=91=E9=A1=B5=20(beta)]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 28c87b947..e597b2c5a 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -146,6 +146,7 @@ // 为了避免 body 还没加载导致无法检查是否设置背景颜色 let timer = setInterval(function(){ // 每 10 毫秒检查一下 body 是否已存在(onload 太晚了,只能这么干) if (document.body) { + clearInterval(timer); // 取消定时器(每 10 毫秒一次的) setTimeout(function(){ // 为了避免太快 body 的 CSS 还没加载上,先延迟 100 毫秒(缺点就是可能会出现短暂一闪而过的暗黑滤镜) console.log(window.getComputedStyle(document.lastChild).backgroundColor, window.getComputedStyle(document.body).backgroundColor) if (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastChild).backgroundColor === 'rgba(0, 0, 0, 0)') { @@ -158,7 +159,6 @@ document.getElementById('XIU2DarkMode').remove(); } } - clearInterval(timer); }, 100); } }, 10); From 82801bb63e61c85bd49c15db40abc5039a85d83f Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 22 Jun 2021 15:00:12 +0800 Subject: [PATCH 0027/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=BD=91=E9=A1=B5=20(beta)]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index e597b2c5a..b3c11a35e 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.0.8 +// @version 1.0.9 // @author X.I.U // @description 最简单的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -144,15 +144,15 @@ document.lastChild.appendChild(style_Add).textContent = style; // 为了避免 body 还没加载导致无法检查是否设置背景颜色 - let timer = setInterval(function(){ // 每 10 毫秒检查一下 body 是否已存在(onload 太晚了,只能这么干) + let timer = setInterval(function(){ // 每 10 毫秒检查一下 body 是否已存在 if (document.body) { clearInterval(timer); // 取消定时器(每 10 毫秒一次的) setTimeout(function(){ // 为了避免太快 body 的 CSS 还没加载上,先延迟 100 毫秒(缺点就是可能会出现短暂一闪而过的暗黑滤镜) - console.log(window.getComputedStyle(document.lastChild).backgroundColor, window.getComputedStyle(document.body).backgroundColor) + console.log('html:', window.getComputedStyle(document.lastChild).backgroundColor, 'body:', window.getComputedStyle(document.body).backgroundColor) if (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastChild).backgroundColor === 'rgba(0, 0, 0, 0)') { // 如果 body 没有 CSS 背景颜色,那就需要添加一个背景颜色,否则影响滤镜效果 document.lastChild.appendChild(document.createElement('style')).textContent = style_00; - } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' || window.getComputedStyle(document.body).backgroundColor.replace(/rgb|rgba|\(|\)|,| /g, '') < 898989) { + } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || window.getComputedStyle(document.body).backgroundColor.replace(/rgb|rgba|\(|\)|,| /g, '') < 898989 || window.getComputedStyle(document.lastChild).backgroundColor.replace(/rgb|rgba|\(|\)|,| /g, '') < 898989) { // 如果是黑色 (等于0,0,0) 或深色 (小于 88,88,88),就停用本脚本滤镜 if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) console.log('检测到当前网页自带暗黑模式,停用本脚本滤镜...') From 12599b7605efe2da40eed11081e3904c464a14c3 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 22 Jun 2021 17:21:43 +0800 Subject: [PATCH 0028/2110] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E6=9F=90BT]=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 6f1bb9032..5279bf50f 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 1.2.4 +// @version 1.2.5 // @author X.I.U -// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、豆瓣电影、3DM、游民星空、千图网、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛 +// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、豆瓣电影、3DM、游民星空、千图网、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛... // @match *://www.423down.com/* // @exclude *://www.423down.com/*.html // @match *://apphot.cc/* @@ -23,6 +23,7 @@ // @match *://www.3dmgame.com/bagua/*.html // @match *://www.gamersky.com/ent/*/*.shtml // @match *://www.58pic.com/* +// @match *://rarbgprx.org/torrents.php* // @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png // @grant GM_xmlhttpRequest // @grant GM_registerMenuCommand @@ -317,6 +318,17 @@ function: { before: _58pic_beforeFunction } + }, + rarbgprx: { + SiteTypeID: 23, + pager: { + type: 1, + nextLink: '(//a[@title="next page"])[1][@href]', + pageElement: 'css;table.lista2t tr.lista2', + HT_insert: ['css;table.lista2t > tbody', 3], + replaceE: 'css;#pager_links', + scrollDelta: 900 + } } }; @@ -414,6 +426,9 @@ curSite = DBSite._58pic_c; } break; + case "rarbgprx.org": + curSite = DBSite.rarbgprx; + break; } curSite.pageUrl = ""; // 下一页URL pageLoading(); // 自动无缝翻页 From 40f678c3410039966c640784a407c7c7c9233d55 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 22 Jun 2021 17:23:33 +0800 Subject: [PATCH 0029/2110] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[RARBG]=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Autopage.user.js b/Autopage.user.js index 5279bf50f..f17ebfd2e 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -2,7 +2,7 @@ // @name 自动无缝翻页 // @version 1.2.5 // @author X.I.U -// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、豆瓣电影、3DM、游民星空、千图网、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛... +// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、豆瓣电影、3DM、游民星空、千图网、RARBG、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛... // @match *://www.423down.com/* // @exclude *://www.423down.com/*.html // @match *://apphot.cc/* From 97242c8a49a1e6596812cb517bacddc970590ac4 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 22 Jun 2021 18:07:33 +0800 Subject: [PATCH 0030/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=BD=91=E9=A1=B5=20(beta)]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index b3c11a35e..6295a79af 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.0.9 +// @version 1.0.10 // @author X.I.U // @description 最简单的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -149,17 +149,23 @@ clearInterval(timer); // 取消定时器(每 10 毫秒一次的) setTimeout(function(){ // 为了避免太快 body 的 CSS 还没加载上,先延迟 100 毫秒(缺点就是可能会出现短暂一闪而过的暗黑滤镜) console.log('html:', window.getComputedStyle(document.lastChild).backgroundColor, 'body:', window.getComputedStyle(document.body).backgroundColor) + /*let rgbValueArry1 = window.getComputedStyle(document.body).backgroundColor.replace(/rgba|rgb|\(|\)| /g, '').split (','), + rgbValueArry2 = window.getComputedStyle(document.lastChild).backgroundColor.replace(/rgba|rgb|\(|\)| /g, '').split (','), + grayLevelBody = parseInt(rgbValueArry1[0]) + parseInt(rgbValueArry1[1]) + parseInt(rgbValueArry1[2]), + grayLevelHTML = parseInt(rgbValueArry2[0]) + parseInt(rgbValueArry2[1]) + parseInt(rgbValueArry2[2]); + console.log('html:', window.getComputedStyle(document.lastChild).backgroundColor, rgbValueArry2, grayLevelHTML, 'body:', window.getComputedStyle(document.body).backgroundColor, grayLevelBody)*/ + if (window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastChild).backgroundColor === 'rgba(0, 0, 0, 0)') { // 如果 body 没有 CSS 背景颜色,那就需要添加一个背景颜色,否则影响滤镜效果 document.lastChild.appendChild(document.createElement('style')).textContent = style_00; - } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || window.getComputedStyle(document.body).backgroundColor.replace(/rgb|rgba|\(|\)|,| /g, '') < 898989 || window.getComputedStyle(document.lastChild).backgroundColor.replace(/rgb|rgba|\(|\)|,| /g, '') < 898989) { + } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || window.getComputedStyle(document.body).backgroundColor != 'rgba(0, 0, 0, 0)' && parseInt(window.getComputedStyle(document.body).backgroundColor.replace(/rgba|rgb|\(|\)|,| /g, '')) < 898989 || window.getComputedStyle(document.lastChild).backgroundColor != 'rgba(0, 0, 0, 0)' && parseInt(window.getComputedStyle(document.lastChild).backgroundColor.replace(/rgba|rgb|\(|\)|,| /g, '')) < 898989) { // 如果是黑色 (等于0,0,0) 或深色 (小于 88,88,88),就停用本脚本滤镜 if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) console.log('检测到当前网页自带暗黑模式,停用本脚本滤镜...') document.getElementById('XIU2DarkMode').remove(); } } - }, 100); + }, 150); } }, 10); } From 58f3765961ca06ab05a5904df214a56e6ce2cad2 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 22 Jun 2021 18:10:23 +0800 Subject: [PATCH 0031/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=BD=91=E9=A1=B5=20(beta)]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 6295a79af..d1ea347a7 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -2,7 +2,7 @@ // @name 护眼模式 // @version 1.0.10 // @author X.I.U -// @description 最简单的全网通用护眼模式、夜间模式、暗黑模式 +// @description 简单有效的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* // @exclude *://v.qq.com/* // @exclude *://*.iqiyi.com/* diff --git a/README.md b/README.md index ab5e4c69b..2eabc4b0f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ | | 脚本名称 | 脚本功能 | 安装 \| 备用 | | :----: | :---- | :---- | :----: | -| [](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.v2ex.com/) | **V2ex 增强** | **自动签到**、链接转图片、自动无缝翻页、新标签页打开链接... | **[安装](https://greasyfork.org/zh-CN/scripts/424246)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/V2ex-Enhanced.user.js)** | From 3ab2ad892825e5182a4d02182c7559e3dfe33227 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 22 Jun 2021 21:56:36 +0800 Subject: [PATCH 0032/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=BD=91=E9=A1=B5=20(beta)]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 49 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index d1ea347a7..6d1ca54c2 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.0.10 +// @version 1.1.0 // @author X.I.U // @description 简单有效的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -26,7 +26,7 @@ ['menu_runDuringTheDay', '白天保持开启 (比晚上亮一点点)', '白天保持开启', true], ['menu_autoRecognition', '排除自带暗黑模式的网页 (beta)', '排除自带暗黑模式的网页 (beta)', true], ['menu_darkModeType', '点击切换模式', '点击切换模式', 1] - ], menu_ID = []; + ], menu_ID = [], websiteList = ['rarbgprx.org','fitgirl-repacks.site','masquerade.site']; for (let i=0;i 0 && getColorValue(document.body) < 898989 || getColorValue(document.lastChild) > 0 && getColorValue(document.lastChild) < 898989) { + // 如果是黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) + for (let i=0;i 0 && getColorValue(document.body) < 898989 || getColorValue(document.lastChild) > 0 && getColorValue(document.lastChild) < 898989) { + // 如果是黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 + if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) + for (let i=0;i Date: Wed, 23 Jun 2021 09:14:22 +0800 Subject: [PATCH 0033/2110] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E6=97=A5?= =?UTF-8?q?=E6=9C=AC=E4=B8=9C=E4=BA=AC]=20Raw=20=E5=8A=A0=E9=80=9F?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GithubEnhanced-High-Speed-Download.user.js | 53 +++++++++++++--------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index f3bf7c92f..7487bf8b2 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.2 +// @version 1.5.3 // @author X.I.U // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) // @match *://github.com/* @@ -29,31 +29,34 @@ fontColor = '#b2b8bf'; } } -//['https://github.91chifun.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','美国'], - ['https://gh.xiu2.xyz','美国'], - ['https://gh.argv.cc','美国费利蒙'], - ['https://git.yumenaka.net','美国洛杉矶'], - ['https://download.fastgit.org','日本东京'], - ['https://ghproxy.com','韩国首尔'], - ['https://pd.zwc365.com/seturl','中国香港'] + ['https://gh.api.99988866.xyz', '美国'], + ['https://gh.msx.workers.dev', '美国'], + ['https://gh.xiu2.xyz', '美国'], + ['https://gh.argv.cc', '美国费利蒙'], + ['https://git.yumenaka.net', '美国洛杉矶'], + ['https://download.fastgit.org', '日本东京'], + ['https://ghproxy.com', '韩国首尔'], + ['https://pd.zwc365.com/seturl', '中国香港'] ], clone_url = [ - ['https://hub.fastgit.org','中国香港'], - ['https://gitclone.com','中国浙江'], - ['https://github.com.cnpmjs.org','新加坡'] + ['https://hub.fastgit.org', '中国香港'], + ['https://gitclone.com', '中国浙江'], + ['https://github.com.cnpmjs.org', '新加坡'] ], clone_ssh_url = [ - ['git@git.zhlh6.cn','中国北京'], - ['git@hub.fastgit.org','中国香港'] + ['git@git.zhlh6.cn', '中国北京'], + ['git@hub.fastgit.org', '中国香港'] ], raw_url = [ - ['https://raw.githubusercontent.com','Github 原生',''], - ['https://cdn.jsdelivr.net','中国国内','注意:该加速源存在缓存机制(24小时),所以文件可能不是最新。 注意:当前分支所有文件总文件大小超过 50MB 时,该加速源不可用。 注意:当前分支名为版本号格式时(如 v1.2.3),该高速下载链接因格式限制不可用。'], - ['https://raw.fastgit.org','中国香港','注意:单个文件太大时可能会提示超时(实时获取中),请重试。'], - ['https://ghproxy.com','韩国首尔',''] + ['https://raw.githubusercontent.com', 'Github 原生',''], + ['https://cdn.jsdelivr.net','中国国内', '注意:该加速源存在缓存机制(24小时),所以文件可能不是最新。 注意:当前分支所有文件总文件大小超过 50MB 时,该加速源不可用。 注意:当前分支名为版本号格式时(如 v1.2.3),该高速下载链接因格式限制不可用。'], + ['https://raw.fastgit.org','中国香港', '注意:单个文件太大时可能会提示超时(实时获取中),请重试。'], + ['https://cdn.staticaly.com','日本东京', '注意:该加速是全球 Anycast CDN,国内一般分配到日本节点。'], + ['https://ghproxy.com','韩国首尔', ''] ], svg = [ '', @@ -251,11 +254,12 @@ url = [ raw_url[1][0] + "/gh" + href.replace('/blob/','@'), raw_url[2][0] + href2, - raw_url[3][0] + "/" + raw_url[0][0] + href2 + raw_url[3][0] + "/gh" + href.replace('/blob/','/'), + raw_url[4][0] + "/" + raw_url[0][0] + href2 ], _html = ``; for (let i=0;i${raw_url[i+1][1]}` + _html += `${raw_url[i+1][1]}` } html.insertAdjacentHTML('afterend', _html); } @@ -300,10 +304,15 @@ url_tip = raw_url[1][2]; break; case 3: - url = raw_url[3][0] + "/" + raw_url[0][0] + href2; + url = raw_url[3][0] + '/gh' + href.replace('/blob/','/'); url_name = raw_url[3][1]; url_tip = raw_url[3][2]; break; + case 4: + url = raw_url[4][0] + "/" + raw_url[0][0] + href2; + url_name = raw_url[4][1]; + url_tip = raw_url[4][2]; + break; default: url = raw_url[menu_raw_fast][0] + href2; url_name = raw_url[menu_raw_fast][1]; From 4d2bf9a7cdb421556c33edb95a1175261598bb55 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 23 Jun 2021 09:43:07 +0800 Subject: [PATCH 0034/2110] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E4=B8=AA?= =?UTF-8?q?=E5=88=AB=E5=8A=A0=E8=BD=BD=E9=80=9F=E5=BA=A6=E5=A4=AA=E6=85=A2?= =?UTF-8?q?=E7=9A=84=E7=BD=91=E7=AB=99=E6=B2=A1=E6=9C=89=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E6=BB=A4=E9=95=9C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 6d1ca54c2..e28dc9a09 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.1.0 +// @version 1.1.1 // @author X.I.U // @description 简单有效的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -141,7 +141,17 @@ break; } style_Add.id = 'XIU2DarkMode'; - document.lastChild.appendChild(style_Add).textContent = style; + //console.log(document,document.lastChild,document.querySelector('html')) + if (document.lastChild) { + document.lastChild.appendChild(style_Add).textContent = style; + } else { // 发现个别网站速度太慢的话,就会出现脚本运行太早,连 html 标签都还没加载。。。 + let timer1 = setInterval(function(){ // 每 5 毫秒检查一下 html 是否已存在 + if (document.lastChild) { + clearInterval(timer1); // 取消定时器 + document.lastChild.appendChild(style_Add).textContent = style; + } + }, 5); + } // 为了避免 body 还没加载导致无法检查是否设置背景颜色 let timer = setInterval(function(){ // 每 10 毫秒检查一下 body 是否已存在 From 97e3883c01a002b1d3ada5f6f0005deb568e761f Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 23 Jun 2021 09:54:46 +0800 Subject: [PATCH 0035/2110] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=BC=82?= =?UTF-8?q?=E6=98=9F=E8=BD=AF=E4=BB=B6=E7=A9=BA=E9=97=B4]=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index f17ebfd2e..bfb05dac1 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 1.2.5 +// @version 1.2.6 // @author X.I.U -// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、豆瓣电影、3DM、游民星空、千图网、RARBG、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛... +// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、异星软件空间、豆瓣电影、3DM、游民星空、千图网、RARBG、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛... // @match *://www.423down.com/* // @exclude *://www.423down.com/*.html // @match *://apphot.cc/* @@ -24,6 +24,7 @@ // @match *://www.gamersky.com/ent/*/*.shtml // @match *://www.58pic.com/* // @match *://rarbgprx.org/torrents.php* +// @match *://www.yxssp.com/* // @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png // @grant GM_xmlhttpRequest // @grant GM_registerMenuCommand @@ -329,6 +330,17 @@ replaceE: 'css;#pager_links', scrollDelta: 900 } + }, + yxssp: { + SiteTypeID: 24, + pager: { + type: 1, + nextLink: '//div[@class="page-nav td-pb-padding-side"]/a[last()][@href]', + pageElement: 'css;.td-modules-container.td-module-number4 > div', + HT_insert: ['css;.td-modules-container.td-module-number4', 3], + replaceE: 'css;.page-nav.td-pb-padding-side', + scrollDelta: 900 + } } }; @@ -362,6 +374,9 @@ curSite = DBSite.weidown; } break; + case "www.yxssp.com": + curSite = DBSite.yxssp; + break; case "fitgirl-repacks.site": curSite = DBSite.fitgirl; break; From b5423340b01b9051823ef89147ca143162473dc7 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 23 Jun 2021 13:55:57 +0800 Subject: [PATCH 0036/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=94=B6?= =?UTF-8?q?=E8=B5=B7=E9=A2=84=E8=A7=88=E5=B8=96=E5=AD=90=EF=BC=88=E5=B7=A6?= =?UTF-8?q?=E9=94=AE=E7=82=B9=E5=87=BB=E4=B8=A4=E4=BE=A7=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E5=A4=84=EF=BC=89]=20=E5=8A=9F=E8=83=BD=EF=BC=88=E6=AD=A3?= =?UTF-8?q?=E5=9C=A8=E6=A5=BC=E5=B1=82=E5=9B=9E=E5=A4=8D=E6=97=B6=E5=B0=86?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E6=94=B6=E8=B5=B7=EF=BC=89?= 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 621ad4844..5ef6e02d6 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.2.2 +// @version 1.2.3 // @author X.I.U // @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 // @match *://hostloc.com/* @@ -393,7 +393,7 @@ document.body.onclick = function(event){ if (event.target==this) { document.querySelectorAll('[id^="threadPreviewTR_"] .showhide').forEach(function (el) { - if (el.parentNode.querySelector('[name="message"]').value === '') { // 避免快速回复过程中误点收起了 + if (el.parentNode.querySelector('[name="message"]').value === '' && !document.getElementById('fwin_reply')) { // 避免快速回复过程中误点收起了 let parentElement = el.parentNode.parentNode.parentNode.parentNode.parentNode, top = parentElement.offsetTop + parentElement.offsetParent.offsetTop + parentElement.offsetParent.offsetParent.offsetTop; // 元素距离顶部的高度 if (top < document.documentElement.scrollTop) window.scrollTo(0,top) // 帖子标题在上面时才会滚动到该帖子处 From 711f0586d5bce74556f04eba805e839403767599 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 25 Jun 2021 13:01:09 +0800 Subject: [PATCH 0037/2110] =?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]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 52pojie-Enhanced.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/52pojie-Enhanced.user.js b/52pojie-Enhanced.user.js index 3ce779915..2d1afc50a 100644 --- a/52pojie-Enhanced.user.js +++ b/52pojie-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 吾爱破解论坛增强 - 自动签到、翻页 -// @version 1.2.8 +// @version 1.2.9 // @author X.I.U // @description 自动签到、自动无缝翻页、屏蔽导读悬赏贴(最新发表页) // @match *://www.52pojie.cn/* @@ -205,7 +205,7 @@ onload: function (response) { let html = ShowPager.createDocumentByString(response.responseText); html = html.querySelector('#messagetext p') - if (html && html.innerText.indexOf("任务已完成") > -1) { + if (html && html.innerText.indexOf('任务已完成') > -1 || html && html.innerText.indexOf('已申请过此任务') > -1) { qiandao.querySelector('.qq_bind').setAttribute('src','https://www.52pojie.cn/static/image/common/wbs.png') // 修改 [打卡签到] 图标为 [签到完毕] qiandao.href = "#" // 修改 URL 为 # } else { From 367da1c439cfdd0185d094b4cd848de444607b11 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 25 Jun 2021 19:45:56 +0800 Subject: [PATCH 0038/2110] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=8E=92?= =?UTF-8?q?=E9=99=A4=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=BD=91=E9=A1=B5=20(beta)]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index e28dc9a09..bb4279e31 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.1.1 +// @version 1.1.2 // @author X.I.U // @description 简单有效的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -164,7 +164,7 @@ let style_Add2 = document.createElement('style'); style_Add2.id = 'XIU2DarkMode2'; document.lastChild.appendChild(style_Add2).textContent = style_00; - } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || getColorValue(document.body) > 0 && getColorValue(document.body) < 898989 || getColorValue(document.lastChild) > 0 && getColorValue(document.lastChild) < 898989) { + } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || getColorValue(document.body) > 0 && getColorValue(document.body) < 898989 || getColorValue(document.lastChild) > 0 && getColorValue(document.lastChild) < 898989 || window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastChild).backgroundColor === 'rgb(0, 0, 0)') { // 如果是黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) for (let i=0;i 0 && getColorValue(document.body) < 898989 || getColorValue(document.lastChild) > 0 && getColorValue(document.lastChild) < 898989 || window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastChild).backgroundColor === 'rgb(0, 0, 0)') { + // 如果是黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 + if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) + for (let i=0;i 0 && getColorValue(document.body) < 898989 || getColorValue(document.lastChild) > 0 && getColorValue(document.lastChild) < 898989) { // 如果是黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 @@ -194,7 +211,7 @@ if (document.getElementById('XIU2DarkMode2')) document.getElementById('XIU2DarkMode2').remove(); } } - }, 3000); + }, 3000);*/ } // 获取背景颜色值 From d6374e16fd1c66b8ee7d3a40ff587c8d4d69682b Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 26 Jun 2021 13:13:18 +0800 Subject: [PATCH 0039/2110] =?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=88=91?= =?UTF-8?q?=E7=9A=84=E5=9B=9E=E5=A4=8D=E9=A1=B5=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 5ef6e02d6..411fb9e35 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.2.3 +// @version 1.2.4 // @author X.I.U // @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 // @match *://hostloc.com/* @@ -122,6 +122,15 @@ HT_insert: ['css;div#threadlist', 2], replaceE: 'css;div.pg' } + }, + myreply: { + SiteTypeID: 4, + pager: { + nextLink: '(//a[@class="nxt"])[1][@href]', + pageElement: 'css;div#threadlist div.bm_c table > tbody', + HT_insert: ['css;div#threadlist div.bm_c table', 2], + replaceE: 'css;div.pg', + } } }; @@ -164,12 +173,15 @@ blockUsers('notice'); // 屏蔽用户(黑名单) } else if(location.pathname === '/home.php' && location.search === '?mod=space&do=pm') { // 消息(私人聊天) blockUsers('pm'); // 屏蔽用户(黑名单) + } else if(location.pathname === '/forum.php' && location.search === '?mod=guide&view=my&type=reply') { // 我的帖子:回复 + curSite = DBSite.myreply; } curSite.pageUrl = ""; // 下一页URL pageLoading(); // 自动翻页 if(menu_value('menu_backToTop'))backToTop(); // 回到顶部(右键点击左右两侧空白处) if(menu_value('menu_autoSignIn'))autoSignIn(); // 自动签到(访问空间 10 次 = 20 积分) + //replyIntervalDOMNodeInserted(); // 监听插入事件(回帖间隔) // 自动签到(访问空间 10 次 = 20 积分) @@ -327,6 +339,17 @@ } + // 监听插入事件(回帖间隔) + /*function replyIntervalDOMNodeInserted() { + let replyInterval = e => { + if (e.target.innerHTML && e.target.innerText.indexOf('发表回复 金钱+1') > -1) { + setTimeout(function () {GM_notification({text: '过去 60 秒了,可以回帖了~', timeout: 3500});}, 60000) + } + } + document.addEventListener('DOMNodeInserted', replyInterval); // 监听插入事件 + }*/ + + // 自动翻页 function pageLoading() { if (!menu_value('menu_pageLoading')) return From 046b80e17387245312cefe906d94163236788dee Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 27 Jun 2021 07:35:37 +0800 Subject: [PATCH 0040/2110] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20[=E6=94=B6?= =?UTF-8?q?=E8=B5=B7=E9=A2=84=E8=A7=88=E5=B8=96=E5=AD=90=EF=BC=88=E5=B7=A6?= =?UTF-8?q?=E9=94=AE=E7=82=B9=E5=87=BB=E4=B8=A4=E4=BE=A7=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E5=A4=84=EF=BC=89]=20=E5=AF=B9=E5=B7=B2=E9=94=81=E5=AE=9A?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= 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 411fb9e35..0f89b1486 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.2.4 +// @version 1.2.5 // @author X.I.U // @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处)、预览帖子快速回复带签名、显示是否在线、显示帖子内隐藏回复、屏蔽阅读权限 255 帖子 // @match *://hostloc.com/* @@ -416,7 +416,7 @@ document.body.onclick = function(event){ if (event.target==this) { document.querySelectorAll('[id^="threadPreviewTR_"] .showhide').forEach(function (el) { - if (el.parentNode.querySelector('[name="message"]').value === '' && !document.getElementById('fwin_reply')) { // 避免快速回复过程中误点收起了 + if (!el.parentNode.querySelector('[name="message"]') || el.parentNode.querySelector('[name="message"]').value === '' && !document.getElementById('fwin_reply')) { // 避免快速回复过程中误点收起了 let parentElement = el.parentNode.parentNode.parentNode.parentNode.parentNode, top = parentElement.offsetTop + parentElement.offsetParent.offsetTop + parentElement.offsetParent.offsetParent.offsetTop; // 元素距离顶部的高度 if (top < document.documentElement.scrollTop) window.scrollTo(0,top) // 帖子标题在上面时才会滚动到该帖子处 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 0041/2110] =?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 0042/2110] =?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 0043/2110] =?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 0044/2110] =?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 0045/2110] =?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 0046/2110] =?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 0047/2110] =?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 0048/2110] =?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 0049/2110] =?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 0050/2110] 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 0051/2110] =?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 0052/2110] =?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 0053/2110] =?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 0054/2110] 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 0055/2110] 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 0056/2110] =?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 0057/2110] =?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 0058/2110] =?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 0059/2110] =?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