From 597b5469cac104f6c0c17f2bf7b4a305d7d2f389 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 13 May 2021 18:05:42 +0800 Subject: [PATCH 0001/2159] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=BE=AE?= =?UTF-8?q?=E5=BD=93=E4=B8=8B=E8=BD=BD]=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 | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 6b9072045..bd01ccb25 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 1.2.0 +// @version 1.2.1 // @author X.I.U -// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛 +// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛 // @match *://www.423down.com/* // @exclude *://www.423down.com/*.html // @match *://apphot.cc/* @@ -12,6 +12,7 @@ // @match *://www.appinn.com/*/*/ // @match *://www.appinn.com/?s=* // @match *://www.iplaysoft.com/* +// @match *://www.weidown.com/* // @match *://fitgirl-repacks.site/* // @match *://*.alphacoders.com/* // @match *://club.sanguosha.com/* @@ -184,6 +185,39 @@ replaceE: 'css;nav.navigation.paging-navigation', scrollDelta: 2000 } + }, + weidown: { + SiteTypeID: 14, + pager: { + type: 1, + nextLink: '//a[@class="nextpage"][@href]', + pageElement: 'css;.articleWrapper > .itemArticle, .articleWrapper > .richTextItem.search', + HT_insert: ['css;.articleWrapper', 3], + replaceE: 'css;#pageGroup', + scrollDelta: 1500 + } + }, + weidown_search: { + SiteTypeID: 14, + pager: { + type: 1, + nextLink: '//a[@class="nextpage"][@href]', + pageElement: 'css;.articleListWrapper > .richTextItem.search', + HT_insert: ['css;#pageGroup', 1], + replaceE: 'css;#pageGroup', + scrollDelta: 700 + } + }, + weidown_special: { + SiteTypeID: 14, + pager: { + type: 1, + nextLink: '//a[@class="nextpage"][@href]', + pageElement: 'css;.special > .item', + HT_insert: ['css;.special', 3], + replaceE: 'css;#pageGroup', + scrollDelta: 700 + } } }; @@ -208,6 +242,15 @@ curSite = DBSite.iplaysoft_postslist; } break; + case "www.weidown.com": + if (location.pathname.indexOf("/search/") > -1) { + curSite = DBSite.weidown_search; + } else if (location.pathname.indexOf("/special/") > -1) { + curSite = DBSite.weidown_special; + } else { + curSite = DBSite.weidown; + } + break; case "fitgirl-repacks.site": curSite = DBSite.fitgirl; break; From 288455893eb89337b7844bd119a826f398e272ba Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Thu, 13 May 2021 19:57:39 +0800 Subject: [PATCH 0002/2159] =?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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index fb4f073f9..df46649e0 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.0.0 +// @version 1.0.1 // @author X.I.U // @description 最简单的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -121,7 +121,7 @@ } // 白天(7点到19点) - if (hours > 6 || hours < 19) { + if (hours > 6 && hours < 19) { if (menu_value('menu_runDuringTheDay')) { style_12 = style_11 style_22 = style_21 From 09e44e66b7a6681098c74c4dbb944ee1048f0e34 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 14 May 2021 07:36:56 +0800 Subject: [PATCH 0003/2159] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=9A=97?= =?UTF-8?q?=E9=BB=91=E6=A8=A1=E5=BC=8F]=20=E6=A0=B7=E5=BC=8F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Beautification.user.js | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index f292605e6..b4f4ed31b 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎美化 -// @version 1.2.0 +// @version 1.2.1 // @author X.I.U // @description 宽屏显示、暗黑模式(4种)、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致、屏蔽登录提示 // @match *://www.zhihu.com/* @@ -154,23 +154,27 @@ header.is-hidden {display: none;} `, style_darkMode_1 = `/* 暗黑模式(方案 1) */ /* 文字颜色 */ -html[data-theme=dark] body, html[data-theme=dark] .ContentItem-title, html[data-theme=dark] .QuestionHeader-title, html[data-theme=dark] .Tabs-link, html[data-theme=dark] .CreatorEntrance-title, html[data-theme=dark] .Search-container, html[data-theme=dark] .HotItem-excerpt, html[data-theme=dark] .PushNotifications-item, html[data-theme=dark] .Notifications-Main>header h1, html[data-theme=dark] .Notifications-Section-header h2, html[data-theme=dark] .NotificationList-Item-content, html[data-theme=dark] .Reward {color: #adbac7 !important;} +html[data-theme=dark] body, html[data-theme=dark] .ContentItem-title, html[data-theme=dark] .QuestionHeader-title, html[data-theme=dark] .Tabs-link, html[data-theme=dark] .CreatorEntrance-title, html[data-theme=dark] .Search-container, html[data-theme=dark] .HotItem-excerpt, html[data-theme=dark] .PushNotifications-item, html[data-theme=dark] .Notifications-Main>header h1, html[data-theme=dark] .Notifications-Section-header h2, html[data-theme=dark] .NotificationList-Item-content, html[data-theme=dark] .Reward, html[data-theme=dark] .ChatSideBar-Search-Input input, html[data-theme=dark] input.Input {color: #adbac7 !important;} /* 热榜标题 */ html[data-theme=dark] .HotItem-title {color: #c4cfda !important;} /* 首页信息流标题 */ html[data-theme=dark] .ContentItem-title a:hover, html[data-theme=dark] .RichContent.is-collapsed .RichContent-inner:hover, html[data-theme=dark] .ContentItem-more:hover {color: #c6d7ea !important;} - +/* 搜索高亮红字 */ +html[data-theme=dark] .Highlight em {color: #c33c39 !important;} /* 背景颜色 - 网页 */ -html[data-theme=dark] body {background: #22272E !important;} +html[data-theme=dark] body, html[data-theme=dark] .Select-option:focus {background: #22272E !important;} /* 背景颜色 - 问题 */ -html[data-theme=dark] .AppHeader, html[data-theme=dark] .QuestionHeader, html[data-theme=dark] .QuestionHeader-footer, html[data-theme=dark] .Input-wrapper.Input-wrapper--grey, html[data-theme=dark] .EmoticonsFooter-item--selected, html[data-theme=dark] .Card, html[data-theme=dark] .ContentItem-actions, html[data-theme=dark] .MoreAnswers .List-headerText, html[data-theme=dark] .CommentsV2-withPagination, html[data-theme=dark] .Topbar, html[data-theme=dark] .CommentsV2-footer, html[data-theme=dark] .CommentEditorV2-inputWrap--active, html[data-theme=dark] .InputLike, html[data-theme=dark] .Popover-content, html[data-theme=dark] .Notifications-footer, html[data-theme=dark] .Messages-footer, html[data-theme=dark] .Modal-inner, html[data-theme=dark] .Emoticons, html[data-theme=dark] .EmoticonsFooter, html[data-theme=dark] .SearchTabs, html[data-theme=dark] .Popover-arrow:after, html[data-theme=dark] .CommentEditorV2-inputWrap, html[data-theme=dark] .ProfileHeader-wrapper, html[data-theme=dark] .UserCover, html[data-theme=dark] .AnswerForm-footer, html[data-theme=dark] .Editable-toolbar, html[data-theme=dark] .AnswerForm-fullscreenContent .Editable-toolbar, html[data-theme=dark] .KfeCollection-PcCollegeCard-wrapper, html[data-theme=dark] .KfeCollection-PcCollegeCard-root, html[data-theme=dark] .HotItem, html[data-theme=dark] .HotList, html[data-theme=dark] .HotListNavEditPad, html[data-theme=dark] .QuestionWaiting-typesTopper, html[data-theme=dark] .QuestionWaiting-types, html[data-theme=dark] .PostItem, html[data-theme=dark] .ClubSideBar section, html[data-theme=dark] .SearchSubTabs, html[data-theme=dark] .Club-SearchPosts-Content, html[data-theme=dark] .Club-content, html[data-theme=dark] .ClubJoinOrCheckinButton, html[data-theme=dark] .ClubEdit, html[data-theme=dark] .CornerButton, html[data-theme=dark] .Notifications-Section-header, html[data-theme=dark] .NotificationList, .NotificationList-Item.NotificationList-Item:after, .NotificationList-DateSplit.NotificationList-DateSplit:after, html[data-theme=dark] .Chat, .ChatUserListItem:after, .ChatListGroup-SectionTitle--bottomBorder:after, html[data-theme=dark] .ActionMenu, .ChatSideBar-Search--active, html[data-theme=dark] .ChatSideBar-Search-ResultListWrap, html[data-theme=dark] .QuestionMainDivider-inner, html[data-theme=dark] .Topic-bar, html[data-theme=dark] .AnnotationTag, html[data-theme=dark] .HoverCard, html[data-theme=dark] .HoverCard-loading {background: #2D333B !important;} -html[data-theme=dark] .CommentListV2-header-divider, html[data-theme=dark] .CommentsV2-openComment-divider, html[data-theme=dark] .AnswerForm-fullscreenScroller, html[data-theme=dark] .HotListNav-item {background-color: #222933 !important;} +html[data-theme=dark] .AppHeader, html[data-theme=dark] .QuestionHeader, html[data-theme=dark] .QuestionHeader-footer, html[data-theme=dark] .EmoticonsFooter-item--selected, html[data-theme=dark] .Card, html[data-theme=dark] .ContentItem-actions, html[data-theme=dark] .MoreAnswers .List-headerText, html[data-theme=dark] .CommentsV2-withPagination, html[data-theme=dark] .Topbar, html[data-theme=dark] .CommentsV2-footer, html[data-theme=dark] .CommentEditorV2-inputWrap--active, html[data-theme=dark] .InputLike, html[data-theme=dark] .Popover-content, html[data-theme=dark] .Notifications-footer, html[data-theme=dark] .Messages-footer, html[data-theme=dark] .Modal-inner, html[data-theme=dark] .Emoticons, html[data-theme=dark] .EmoticonsFooter, html[data-theme=dark] .SearchTabs, html[data-theme=dark] .Popover-arrow:after, html[data-theme=dark] .CommentEditorV2-inputWrap, html[data-theme=dark] .ProfileHeader-wrapper, html[data-theme=dark] .UserCover, html[data-theme=dark] .AnswerForm-footer, html[data-theme=dark] .Editable-toolbar, html[data-theme=dark] .AnswerForm-fullscreenContent .Editable-toolbar, html[data-theme=dark] .KfeCollection-PcCollegeCard-wrapper, html[data-theme=dark] .KfeCollection-PcCollegeCard-root, html[data-theme=dark] .HotItem, html[data-theme=dark] .HotList, html[data-theme=dark] .HotListNavEditPad, html[data-theme=dark] .QuestionWaiting-typesTopper, html[data-theme=dark] .QuestionWaiting-types, html[data-theme=dark] .PostItem, html[data-theme=dark] .ClubSideBar section, html[data-theme=dark] .SearchSubTabs, html[data-theme=dark] .Club-SearchPosts-Content, html[data-theme=dark] .Club-content, html[data-theme=dark] .ClubJoinOrCheckinButton, html[data-theme=dark] .ClubEdit, html[data-theme=dark] .CornerButton, html[data-theme=dark] .Notifications-Section-header, html[data-theme=dark] .NotificationList, .NotificationList-Item.NotificationList-Item:after, .NotificationList-DateSplit.NotificationList-DateSplit:after, html[data-theme=dark] .Chat, .ChatUserListItem:after, .ChatListGroup-SectionTitle--bottomBorder:after, html[data-theme=dark] .ActionMenu, .ChatSideBar-Search--active, html[data-theme=dark] .ChatSideBar-Search-ResultListWrap, html[data-theme=dark] .QuestionMainDivider-inner, html[data-theme=dark] .Topic-bar, html[data-theme=dark] .AnnotationTag, html[data-theme=dark] .HoverCard, html[data-theme=dark] .HoverCard-loading, html[data-theme=dark] .ExploreSpecialCard, html[data-theme=dark] .ExploreHomePage-ContentSection-moreButton a, html[data-theme=dark] .ExploreRoundtableCard, html[data-theme=dark] .ExploreCollectionCard, html[data-theme=dark] .ExploreColumnCard {background: #2D333B !important;} +html[data-theme=dark] .CommentListV2-header-divider, html[data-theme=dark] .CommentsV2-openComment-divider, html[data-theme=dark] .AnswerForm-fullscreenScroller, html[data-theme=dark] .HotListNav-item, html[data-theme=dark] .AutoInviteItem-wrapper--desktop, html[data-theme=dark] .ExploreSpecialCard-contentTag, html[data-theme=dark] .ExploreCollectionCard-contentTypeTag {background-color: #222933 !important;} html[data-theme=dark] .CornerButton:hover {background: #3f4752 !important;} /* 右下角按钮 */ /* 背景颜色 - 引用 */ html[data-theme=dark] .ztext blockquote {color: #768390 !important;border-left: 3px solid #3b3b3b !important;} +/* 搜索框 */ +html[data-theme=dark] .Input-wrapper.Input-wrapper--grey, html[data-theme=dark] .ChatSideBar-Search-Input input {background: #333a44 !important;} + /* 加载动画 */ html[data-theme=dark] .PlaceHolder-bg {background: -webkit-gradient(linear,left top,right top,from(#22272e),color-stop(20%,#2d333b),color-stop(40%,#22272e),to(#22272e)) !important;background: linear-gradient(90deg,#22272e 0,#2d333b 20%,#22272e 40%,#22272e) !important;} html[data-theme=dark] .PlaceHolder-inner {background: #22272e !important;color: #2d333b !important;} @@ -182,13 +186,14 @@ html[data-theme=dark] .TextMessage-receiver, html[data-theme="dark"] .TextMessag html[data-theme=dark] .TextMessage-sender, html[data-theme=dark] .TextMessage-receiver {color: #dcdcdc !important;} /*html[data-theme=dark] .MessagesBox::-webkit-scrollbar {width: 0px !important;height: 0px !important;}*/ -html[data-theme=dark] .ToolBar, html[data-theme=dark] .Input-wrapper, html[data-theme=dark] .ClubTopPosts {border: none !important;} +html[data-theme=dark] .ToolBar, html[data-theme=dark] .Input-wrapper, html[data-theme=dark] .ClubTopPosts, html[data-theme=dark] .ChatSideBar-Search-Input input {border: none !important;} /* 私信网页 */ html[data-theme=dark] .ChatUserListItem .Chat-ActionMenuPopover-Button {background: -webkit-gradient(linear,left top,right top,from(rgba(18,18,18,0)),color-stop(20%,#22272e)) !important;background: linear-gradient(90deg,rgba(18,18,18,0),#22272e 20%) !important;} +html[data-theme=dark] .css-1j6tmrz {border: 2px solid #2d333b !important;} /* 选项鼠标指向时背景颜色 */ -html[data-theme=dark] .Messages-item:hover, html[data-theme=dark] .GlobalSideBar-navLink:hover, html[data-theme=dark] .Menu-item.is-active, html[data-theme=dark] .ActionMenu-item:hover, html[data-theme=dark] .ChatUserListItem--active {background-color: #272c33 !important;} +html[data-theme=dark] .Messages-item:hover, html[data-theme=dark] .GlobalSideBar-navLink:hover, html[data-theme=dark] .Menu-item.is-active, html[data-theme=dark] .ActionMenu-item:hover, html[data-theme=dark] .ChatUserListItem--active, html[data-theme=dark] .Messages-newItem {background-color: #272c33 !important;} /* 通知 */ html[data-theme=dark] .PushNotifications-item a {color: #8ab5e0 !important;} @@ -203,6 +208,9 @@ html[data-theme=dark] .GifPlayer img {opacity: 1 !important;} html[data-theme=dark] .Topbar, html[data-theme=dark] .CommentsV2-footer, html[data-theme=dark] .Topstory-mainColumnCard .Card:not(.Topstory-tabCard), html[data-theme=dark] .NestComment:not(:last-child):after, html[data-theme=dark] .NestComment--rootComment:after, html[data-theme=dark] .NestComment .NestComment--child:after, html[data-theme=dark] .NestComment .NestComment--child:after, html[data-theme=dark] .CommentsV2-replyNum, html[data-theme=dark] .CommentItemV2:not(:first-child):after, html[data-theme=dark] .Tabs, html[data-theme=dark] .Popover-arrow:after {border-bottom: 1px solid #282d35 !important;} html[data-theme=dark] .CommentEditorV2-inputWrap--active, html[data-theme=dark] .CommentEditorV2-inputWrap, html[data-theme=dark] .PostItem {border: none !important;} html[data-theme=dark] .InputLike {border: 1px solid #424b56 !important;} +html[data-theme=dark] .Popover .InputLike {border: 1px solid #2d333b !important;} + +html[data-theme=dark] .Popover-content, html[data-theme=dark] .Popover-arrow:after {border: 1px solid #22272e !important;} /* 滚动条 */ html[data-theme=dark] body::-webkit-scrollbar, html[data-theme="dark"] .MessagesBox::-webkit-scrollbar, html[data-theme="dark"] .Messages-list::-webkit-scrollbar, html[data-theme=dark] .PushNotifications-list::-webkit-scrollbar, html[data-theme=dark] .CommentListV2::-webkit-scrollbar, .ChatListGroup-SectionContent::-webkit-scrollbar, html[data-theme=dark] .ChatSideBar-Search-ResultListWrap::-webkit-scrollbar {width: 6px !important;height: 1px !important;} @@ -217,10 +225,10 @@ html {scrollbar-width: thin; scrollbar-color: #3f4752 #22272e;} html[data-theme=dark] .WhiteBg-body, html[data-theme=dark] .Post-content {background: #22272E !important;} html[data-theme=dark] .ColumnPageHeader {background: #1c2129 !important;} -/* 按钮颜色(蓝色) */ +/* 按钮颜色 */ .TopstoryTabs-link.is-active, html[data-theme=dark] .TopstoryTabs-link.is-active, html[data-theme=dark] .VoteButton, .Tag, html[data-theme=dark] .Tag, html[data-theme=dark] .HotListNav-item.is-active, html[data-theme=dark] .RichText a.UserLink-link {color: #3faaff !important;} /*html[data-theme=dark] .Tabs-link.is-active:after {background: #2196F3 !important;}*/ -html[data-theme=dark] .Reward-rewardBtn {color: #ffffff !important;} +html[data-theme=dark] .Reward-rewardBtn, html[data-theme=dark] .SearchBar-searchIcon.hasValue, html[data-theme=dark] .Chat-UnreadCount {color: #ffffff !important;} /* 关闭查看回复时的高闪 */ html[data-theme=dark] .CommentItemV2--highlighted {-webkit-animation: nano !important;animation: nano !important;} From f63692da6a19cee0e29816e18e4f56258d300041 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 14 May 2021 08:05:39 +0800 Subject: [PATCH 0004/2159] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=9A=97?= =?UTF-8?q?=E9=BB=91=E6=A8=A1=E5=BC=8F]=20=E6=A0=B7=E5=BC=8F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Beautification.user.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index b4f4ed31b..2e275dc5e 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -154,7 +154,8 @@ header.is-hidden {display: none;} `, style_darkMode_1 = `/* 暗黑模式(方案 1) */ /* 文字颜色 */ -html[data-theme=dark] body, html[data-theme=dark] .ContentItem-title, html[data-theme=dark] .QuestionHeader-title, html[data-theme=dark] .Tabs-link, html[data-theme=dark] .CreatorEntrance-title, html[data-theme=dark] .Search-container, html[data-theme=dark] .HotItem-excerpt, html[data-theme=dark] .PushNotifications-item, html[data-theme=dark] .Notifications-Main>header h1, html[data-theme=dark] .Notifications-Section-header h2, html[data-theme=dark] .NotificationList-Item-content, html[data-theme=dark] .Reward, html[data-theme=dark] .ChatSideBar-Search-Input input, html[data-theme=dark] input.Input {color: #adbac7 !important;} +html[data-theme=dark] body, html[data-theme=dark] .ContentItem-title, html[data-theme=dark] .QuestionHeader-title, html[data-theme=dark] .Tabs-link, html[data-theme=dark] .CreatorEntrance-title, html[data-theme=dark] .Search-container, html[data-theme=dark] .HotItem-excerpt, html[data-theme=dark] .PushNotifications-item, html[data-theme=dark] .Notifications-Main>header h1, html[data-theme=dark] .Notifications-Section-header h2, html[data-theme=dark] .NotificationList-Item-content, html[data-theme=dark] .Reward, html[data-theme=dark] .ChatSideBar-Search-Input input, html[data-theme=dark] input.Input, html[data-theme=dark] .LinkCard-title, html[data-theme=dark] .MCNLinkCard-title, html[data-theme=dark] .ZVideoLinkCard-title {color: #adbac7 !important;} +html[data-theme=dark] .LinkCard-meta, html[data-theme=dark] .MCNLinkCard-source {color: #5a6f83 !important;} /* 热榜标题 */ html[data-theme=dark] .HotItem-title {color: #c4cfda !important;} /* 首页信息流标题 */ @@ -172,6 +173,12 @@ html[data-theme=dark] .CornerButton:hover {background: #3f4752 !important;} /* /* 背景颜色 - 引用 */ html[data-theme=dark] .ztext blockquote {color: #768390 !important;border-left: 3px solid #3b3b3b !important;} +/* 背景颜色 - 卡片 */ +html[data-theme=dark] .MCNLinkCard, html[data-theme=dark] .LinkCard-content, html[data-theme=dark] .ZVideoLinkCard-info {background-color: #22272e !important;} +html[data-theme=dark] .Post-content .MCNLinkCard, html[data-theme=dark] .Post-content .LinkCard-content, html[data-theme=dark] .Post-content .ZVideoLinkCard-info {background-color: #2D333B !important;} +html[data-theme=dark] .LinkCard-backdrop {background-image: url() !important;} + + /* 搜索框 */ html[data-theme=dark] .Input-wrapper.Input-wrapper--grey, html[data-theme=dark] .ChatSideBar-Search-Input input {background: #333a44 !important;} @@ -223,7 +230,7 @@ html {scrollbar-width: thin; scrollbar-color: #3f4752 #22272e;} /* 背景颜色 - 专栏/文章 */ html[data-theme=dark] .WhiteBg-body, html[data-theme=dark] .Post-content {background: #22272E !important;} -html[data-theme=dark] .ColumnPageHeader {background: #1c2129 !important;} +html[data-theme=dark] .ColumnPageHeader, html[data-theme=dark] .BottomInfo {background: #1c2129 !important;} /* 按钮颜色 */ .TopstoryTabs-link.is-active, html[data-theme=dark] .TopstoryTabs-link.is-active, html[data-theme=dark] .VoteButton, .Tag, html[data-theme=dark] .Tag, html[data-theme=dark] .HotListNav-item.is-active, html[data-theme=dark] .RichText a.UserLink-link {color: #3faaff !important;} From c54e50b0c8dff2d4f8a22b6bb93d7aa04b34f10b Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 14 May 2021 16:35:34 +0800 Subject: [PATCH 0005/2159] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E8=B1=86?= =?UTF-8?q?=E7=93=A3]=20=E6=94=AF=E6=8C=81=EF=BC=88=E9=9B=86=E8=AF=84?= =?UTF-8?q?=E3=80=81=E7=9F=AD=E8=AF=84=E3=80=81=E5=BD=B1=E8=AF=84=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index bd01ccb25..505ee21d0 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 自动无缝翻页 -// @version 1.2.1 +// @version 1.2.2 // @author X.I.U -// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛 +// @description 自动无缝翻页,目前支持:423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、豆瓣、FitGirl Repacks、AlphaCoders、PubMed、三国杀论坛、百分浏览器论坛 // @match *://www.423down.com/* // @exclude *://www.423down.com/*.html // @match *://apphot.cc/* @@ -18,6 +18,7 @@ // @match *://club.sanguosha.com/* // @match *://www.centbrowser.net/* // @match *://pubmed.ncbi.nlm.nih.gov/?term=* +// @match *://movie.douban.com/* // @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png // @grant GM_xmlhttpRequest // @grant GM_registerMenuCommand @@ -218,6 +219,39 @@ replaceE: 'css;#pageGroup', scrollDelta: 700 } + }, + douban_subject_comments: { + SiteTypeID: 15, + pager: { + type: 1, + nextLink: '//a[@class="next"][@href]', + pageElement: 'css;#comments > .comment-item', + HT_insert: ['css;#paginator', 1], + replaceE: 'css;#paginator', + scrollDelta: 700 + } + }, + douban_subject_reviews: { + SiteTypeID: 16, + pager: { + type: 1, + nextLink: '//link[@rel="next"][@href]', + pageElement: 'css;.review-list > div', + HT_insert: ['css;.review-list', 3], + replaceE: 'css;.paginator', + scrollDelta: 700 + } + }, + douban_subject_episode: { + SiteTypeID: 17, + pager: { + type: 1, + nextLink: '//link[@rel="next"][@href]', + pageElement: 'css;#comments > div', + HT_insert: ['css;#comments', 3], + replaceE: 'css;.paginator', + scrollDelta: 700 + } } }; @@ -288,6 +322,15 @@ case "pubmed.ncbi.nlm.nih.gov": curSite = DBSite.pubmed_postslist; break; + case "movie.douban.com": + if (location.pathname.indexOf('/subject') > -1 && location.pathname.indexOf('/comments') > -1) { // 短评 + curSite = DBSite.douban_subject_comments; + } else if (location.pathname.indexOf('/subject') > -1 && location.pathname.indexOf('/reviews') > -1) { // 影评 + curSite = DBSite.douban_subject_reviews; + }else if(location.pathname.indexOf('/subject') > -1 && location.pathname.indexOf('/episode') > -1) { // 电视剧每集评论 + curSite = DBSite.douban_subject_episode; + } + break; } curSite.pageUrl = ""; // 下一页URL pageLoading(); // 自动无缝翻页 From 187e33d4194f65e71612a3d13e9e67f8f2de5754 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 15 May 2021 01:04:41 +0800 Subject: [PATCH 0006/2159] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E5=B8=96?= =?UTF-8?q?=E5=AD=90=E5=86=85=E7=BF=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index f69f9eacf..fe598b2b3 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.0.6 +// @version 1.0.7 // @author X.I.U // @description 自动无缝翻页、自动显示帖子内隐藏回复 // @match *://hostloc.com/* @@ -76,7 +76,7 @@ nextLink: '//div[@id="pgt"]//a[contains(text(),"下一页")][@href]', pageElement: 'css;div#postlist > div[id^="post_"]', HT_insert: ['css;div#postlist', 2], - replaceE: '//div[@class="pg"] | //div[@class="pgbtn"]', + replaceE: 'css;div.pg', } }, guide: { @@ -115,9 +115,11 @@ // URL 判断 if (patt_thread.test(location.pathname) || location.search.indexOf('mod=viewthread') > -1){ // 帖子内 - if(menu_value('menu_thread_pageLoading'))curSite = DBSite.thread; - // 自动显示帖子内被隐藏的回复 - showPosts(); + if(menu_value('menu_thread_pageLoading')) { + curSite = DBSite.thread; + hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮 + } + showPosts(); // 自动显示帖子内被隐藏的回复 }else if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1){ // 各板块帖子列表 curSite = DBSite.forum; @@ -167,6 +169,14 @@ } + // 隐藏帖子内的 [下一页] 按钮 + function hidePgbtn() { + let style_hidePgbtn = document.createElement('style'); + style_hidePgbtn.innerHTML = `.pgbtn {display: none;}`; + document.head.appendChild(style_hidePgbtn); + } + + // 滚动条事件 function windowScroll(fn1) { var beforeScrollTop = document.documentElement.scrollTop, From 5546902d15da584052eb8e32d8846cd179f9831f Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 15 May 2021 18:37:18 +0800 Subject: [PATCH 0007/2159] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=9A=97?= =?UTF-8?q?=E9=BB=91=E6=A8=A1=E5=BC=8F]=20=E6=A0=B7=E5=BC=8F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Beautification.user.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index 2e275dc5e..ea81d60fb 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎美化 -// @version 1.2.1 +// @version 1.2.2 // @author X.I.U // @description 宽屏显示、暗黑模式(4种)、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致、屏蔽登录提示 // @match *://www.zhihu.com/* @@ -154,20 +154,20 @@ header.is-hidden {display: none;} `, style_darkMode_1 = `/* 暗黑模式(方案 1) */ /* 文字颜色 */ -html[data-theme=dark] body, html[data-theme=dark] .ContentItem-title, html[data-theme=dark] .QuestionHeader-title, html[data-theme=dark] .Tabs-link, html[data-theme=dark] .CreatorEntrance-title, html[data-theme=dark] .Search-container, html[data-theme=dark] .HotItem-excerpt, html[data-theme=dark] .PushNotifications-item, html[data-theme=dark] .Notifications-Main>header h1, html[data-theme=dark] .Notifications-Section-header h2, html[data-theme=dark] .NotificationList-Item-content, html[data-theme=dark] .Reward, html[data-theme=dark] .ChatSideBar-Search-Input input, html[data-theme=dark] input.Input, html[data-theme=dark] .LinkCard-title, html[data-theme=dark] .MCNLinkCard-title, html[data-theme=dark] .ZVideoLinkCard-title {color: #adbac7 !important;} +html[data-theme=dark] body, html[data-theme=dark] .ContentItem-title, html[data-theme=dark] .QuestionHeader-title, html[data-theme=dark] .Tabs-link, html[data-theme=dark] .CreatorEntrance-title, html[data-theme=dark] .Search-container, html[data-theme=dark] .HotItem-excerpt, html[data-theme=dark] .PushNotifications-item, html[data-theme=dark] .Notifications-Main>header h1, html[data-theme=dark] .Notifications-Section-header h2, html[data-theme=dark] .NotificationList-Item-content, html[data-theme=dark] .Reward, html[data-theme=dark] .ChatSideBar-Search-Input input, html[data-theme=dark] input.Input, html[data-theme=dark] .LinkCard-title, html[data-theme=dark] .MCNLinkCard-title, html[data-theme=dark] .ZVideoLinkCard-title, html[data-theme=dark] .TipjarDialog-customButton {color: #adbac7 !important;} html[data-theme=dark] .LinkCard-meta, html[data-theme=dark] .MCNLinkCard-source {color: #5a6f83 !important;} /* 热榜标题 */ html[data-theme=dark] .HotItem-title {color: #c4cfda !important;} /* 首页信息流标题 */ -html[data-theme=dark] .ContentItem-title a:hover, html[data-theme=dark] .RichContent.is-collapsed .RichContent-inner:hover, html[data-theme=dark] .ContentItem-more:hover {color: #c6d7ea !important;} +html[data-theme=dark] .ContentItem-title a:hover, html[data-theme=dark] .RichContent.is-collapsed .RichContent-inner:hover, html[data-theme=dark] .ContentItem-more:hover, html[data-theme=dark] .QuestionRichText--expandable.QuestionRichText--collapsed:hover {color: #b3c3d6 !important;} /* 搜索高亮红字 */ html[data-theme=dark] .Highlight em {color: #c33c39 !important;} /* 背景颜色 - 网页 */ html[data-theme=dark] body, html[data-theme=dark] .Select-option:focus {background: #22272E !important;} /* 背景颜色 - 问题 */ -html[data-theme=dark] .AppHeader, html[data-theme=dark] .QuestionHeader, html[data-theme=dark] .QuestionHeader-footer, html[data-theme=dark] .EmoticonsFooter-item--selected, html[data-theme=dark] .Card, html[data-theme=dark] .ContentItem-actions, html[data-theme=dark] .MoreAnswers .List-headerText, html[data-theme=dark] .CommentsV2-withPagination, html[data-theme=dark] .Topbar, html[data-theme=dark] .CommentsV2-footer, html[data-theme=dark] .CommentEditorV2-inputWrap--active, html[data-theme=dark] .InputLike, html[data-theme=dark] .Popover-content, html[data-theme=dark] .Notifications-footer, html[data-theme=dark] .Messages-footer, html[data-theme=dark] .Modal-inner, html[data-theme=dark] .Emoticons, html[data-theme=dark] .EmoticonsFooter, html[data-theme=dark] .SearchTabs, html[data-theme=dark] .Popover-arrow:after, html[data-theme=dark] .CommentEditorV2-inputWrap, html[data-theme=dark] .ProfileHeader-wrapper, html[data-theme=dark] .UserCover, html[data-theme=dark] .AnswerForm-footer, html[data-theme=dark] .Editable-toolbar, html[data-theme=dark] .AnswerForm-fullscreenContent .Editable-toolbar, html[data-theme=dark] .KfeCollection-PcCollegeCard-wrapper, html[data-theme=dark] .KfeCollection-PcCollegeCard-root, html[data-theme=dark] .HotItem, html[data-theme=dark] .HotList, html[data-theme=dark] .HotListNavEditPad, html[data-theme=dark] .QuestionWaiting-typesTopper, html[data-theme=dark] .QuestionWaiting-types, html[data-theme=dark] .PostItem, html[data-theme=dark] .ClubSideBar section, html[data-theme=dark] .SearchSubTabs, html[data-theme=dark] .Club-SearchPosts-Content, html[data-theme=dark] .Club-content, html[data-theme=dark] .ClubJoinOrCheckinButton, html[data-theme=dark] .ClubEdit, html[data-theme=dark] .CornerButton, html[data-theme=dark] .Notifications-Section-header, html[data-theme=dark] .NotificationList, .NotificationList-Item.NotificationList-Item:after, .NotificationList-DateSplit.NotificationList-DateSplit:after, html[data-theme=dark] .Chat, .ChatUserListItem:after, .ChatListGroup-SectionTitle--bottomBorder:after, html[data-theme=dark] .ActionMenu, .ChatSideBar-Search--active, html[data-theme=dark] .ChatSideBar-Search-ResultListWrap, html[data-theme=dark] .QuestionMainDivider-inner, html[data-theme=dark] .Topic-bar, html[data-theme=dark] .AnnotationTag, html[data-theme=dark] .HoverCard, html[data-theme=dark] .HoverCard-loading, html[data-theme=dark] .ExploreSpecialCard, html[data-theme=dark] .ExploreHomePage-ContentSection-moreButton a, html[data-theme=dark] .ExploreRoundtableCard, html[data-theme=dark] .ExploreCollectionCard, html[data-theme=dark] .ExploreColumnCard {background: #2D333B !important;} -html[data-theme=dark] .CommentListV2-header-divider, html[data-theme=dark] .CommentsV2-openComment-divider, html[data-theme=dark] .AnswerForm-fullscreenScroller, html[data-theme=dark] .HotListNav-item, html[data-theme=dark] .AutoInviteItem-wrapper--desktop, html[data-theme=dark] .ExploreSpecialCard-contentTag, html[data-theme=dark] .ExploreCollectionCard-contentTypeTag {background-color: #222933 !important;} +html[data-theme=dark] .AppHeader, html[data-theme=dark] .QuestionHeader, html[data-theme=dark] .QuestionHeader-footer, html[data-theme=dark] .EmoticonsFooter-item--selected, html[data-theme=dark] .Card, html[data-theme=dark] .ContentItem-actions, html[data-theme=dark] .MoreAnswers .List-headerText, html[data-theme=dark] .CommentsV2-withPagination, html[data-theme=dark] .Topbar, html[data-theme=dark] .CommentsV2-footer, html[data-theme=dark] .CommentEditorV2-inputWrap--active, html[data-theme=dark] .InputLike, html[data-theme=dark] .Popover-content, html[data-theme=dark] .Notifications-footer, html[data-theme=dark] .Messages-footer, html[data-theme=dark] .Modal-inner, html[data-theme=dark] .Emoticons, html[data-theme=dark] .EmoticonsFooter, html[data-theme=dark] .SearchTabs, html[data-theme=dark] .Popover-arrow:after, html[data-theme=dark] .CommentEditorV2-inputWrap, html[data-theme=dark] .ProfileHeader-wrapper, html[data-theme=dark] .UserCover, html[data-theme=dark] .AnswerForm-footer, html[data-theme=dark] .Editable-toolbar, html[data-theme=dark] .AnswerForm-fullscreenContent .Editable-toolbar, html[data-theme=dark] .KfeCollection-PcCollegeCard-wrapper, html[data-theme=dark] .KfeCollection-PcCollegeCard-root, html[data-theme=dark] .HotItem, html[data-theme=dark] .HotList, html[data-theme=dark] .HotListNavEditPad, html[data-theme=dark] .QuestionWaiting-typesTopper, html[data-theme=dark] .QuestionWaiting-types, html[data-theme=dark] .PostItem, html[data-theme=dark] .ClubSideBar section, html[data-theme=dark] .SearchSubTabs, html[data-theme=dark] .Club-SearchPosts-Content, html[data-theme=dark] .Club-content, html[data-theme=dark] .ClubJoinOrCheckinButton, html[data-theme=dark] .ClubEdit, html[data-theme=dark] .CornerButton, html[data-theme=dark] .Notifications-Section-header, html[data-theme=dark] .NotificationList, .NotificationList-Item.NotificationList-Item:after, .NotificationList-DateSplit.NotificationList-DateSplit:after, html[data-theme=dark] .Chat, .ChatUserListItem:after, .ChatListGroup-SectionTitle--bottomBorder:after, html[data-theme=dark] .ActionMenu, .ChatSideBar-Search--active, html[data-theme=dark] .ChatSideBar-Search-ResultListWrap, html[data-theme=dark] .QuestionMainDivider-inner, html[data-theme=dark] .Topic-bar, html[data-theme=dark] .AnnotationTag, html[data-theme=dark] .HoverCard, html[data-theme=dark] .HoverCard-loading, html[data-theme=dark] .ExploreSpecialCard, html[data-theme=dark] .ExploreHomePage-ContentSection-moreButton a, html[data-theme=dark] .ExploreRoundtableCard, html[data-theme=dark] .ExploreCollectionCard, html[data-theme=dark] .ExploreColumnCard, html[data-theme=dark] .RichText .lazy[data-lazy-status] {background: #2D333B !important;} +html[data-theme=dark] .CommentListV2-header-divider, html[data-theme=dark] .CommentsV2-openComment-divider, html[data-theme=dark] .AnswerForm-fullscreenScroller, html[data-theme=dark] .HotListNav-item, html[data-theme=dark] .AutoInviteItem-wrapper--desktop, html[data-theme=dark] .ExploreSpecialCard-contentTag, html[data-theme=dark] .ExploreCollectionCard-contentTypeTag, html[data-theme=dark] .Reward-TipjarDialog-tagLine {background-color: #222933 !important;} html[data-theme=dark] .CornerButton:hover {background: #3f4752 !important;} /* 右下角按钮 */ /* 背景颜色 - 引用 */ @@ -178,6 +178,8 @@ html[data-theme=dark] .MCNLinkCard, html[data-theme=dark] .LinkCard-content, htm html[data-theme=dark] .Post-content .MCNLinkCard, html[data-theme=dark] .Post-content .LinkCard-content, html[data-theme=dark] .Post-content .ZVideoLinkCard-info {background-color: #2D333B !important;} html[data-theme=dark] .LinkCard-backdrop {background-image: url() !important;} +/* 通知信息中点评论链接时,在弹出的评论框中 "高亮" 目标评论 */ +html[data-theme=dark] .CommentItemV2[tabindex='-1'] {background-color: #343a44 !important;} /* 搜索框 */ html[data-theme=dark] .Input-wrapper.Input-wrapper--grey, html[data-theme=dark] .ChatSideBar-Search-Input input {background: #333a44 !important;} @@ -207,9 +209,9 @@ html[data-theme=dark] .PushNotifications-item a {color: #8ab5e0 !important;} /* 封面大图/文章头部大图 */ html[data-theme=dark] img.UserCover-image, html[data-theme=dark] img.TitleImage {opacity: 0.7 !important;} /* 其他图片 */ -html[data-theme=dark] img {opacity: 0.9 !important;} -/* GIF 动图除外 */ -html[data-theme=dark] .GifPlayer img {opacity: 1 !important;} +html[data-theme=dark] img {opacity: 0.8 !important;} +/* GIF 动图、放大图除外 */ +html[data-theme=dark] .GifPlayer img, html[data-theme=dark] .ImageView-img {opacity: 1 !important;} /* 边框 */ html[data-theme=dark] .Topbar, html[data-theme=dark] .CommentsV2-footer, html[data-theme=dark] .Topstory-mainColumnCard .Card:not(.Topstory-tabCard), html[data-theme=dark] .NestComment:not(:last-child):after, html[data-theme=dark] .NestComment--rootComment:after, html[data-theme=dark] .NestComment .NestComment--child:after, html[data-theme=dark] .NestComment .NestComment--child:after, html[data-theme=dark] .CommentsV2-replyNum, html[data-theme=dark] .CommentItemV2:not(:first-child):after, html[data-theme=dark] .Tabs, html[data-theme=dark] .Popover-arrow:after {border-bottom: 1px solid #282d35 !important;} @@ -235,10 +237,13 @@ html[data-theme=dark] .ColumnPageHeader, html[data-theme=dark] .BottomInfo {back /* 按钮颜色 */ .TopstoryTabs-link.is-active, html[data-theme=dark] .TopstoryTabs-link.is-active, html[data-theme=dark] .VoteButton, .Tag, html[data-theme=dark] .Tag, html[data-theme=dark] .HotListNav-item.is-active, html[data-theme=dark] .RichText a.UserLink-link {color: #3faaff !important;} /*html[data-theme=dark] .Tabs-link.is-active:after {background: #2196F3 !important;}*/ -html[data-theme=dark] .Reward-rewardBtn, html[data-theme=dark] .SearchBar-searchIcon.hasValue, html[data-theme=dark] .Chat-UnreadCount {color: #ffffff !important;} +html[data-theme=dark] .Reward-rewardBtn, html[data-theme=dark] .SearchBar-searchIcon.hasValue, html[data-theme=dark] .Chat-UnreadCount, html[data-theme=dark] .Payment-CheckedButton {color: #ffffff !important;} /* 关闭查看回复时的高闪 */ html[data-theme=dark] .CommentItemV2--highlighted {-webkit-animation: nano !important;animation: nano !important;} + +/* 赞赏 */ +html[data-theme=dark] .Reward-TipjarDialog-amountList .Button--red, html[data-theme=dark] .Reward-TipjarDialog-amountList .Button--red, html[data-theme=dark] .Reward-TipjarDialog-amountInput .SimpleInput {color: #d3d3d3 !important; background-color: #353b44 !important; border: none !important;} `, style_darkMode_2 = `/* 暗黑模式(方案 2) */ html {filter: invert(80%) !important;} From 54ef1677735bb31a59d22eb99ef5f8576569d955 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 16 May 2021 09:39:46 +0800 Subject: [PATCH 0008/2159] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=9A=97?= =?UTF-8?q?=E9=BB=91=E6=A8=A1=E5=BC=8F]=20=E6=A0=B7=E5=BC=8F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zhihu-Beautification.user.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Zhihu-Beautification.user.js b/Zhihu-Beautification.user.js index ea81d60fb..12309edc4 100644 --- a/Zhihu-Beautification.user.js +++ b/Zhihu-Beautification.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎美化 -// @version 1.2.2 +// @version 1.2.3 // @author X.I.U // @description 宽屏显示、暗黑模式(4种)、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致、屏蔽登录提示 // @match *://www.zhihu.com/* @@ -197,6 +197,8 @@ html[data-theme=dark] .TextMessage-sender, html[data-theme=dark] .TextMessage-re /*html[data-theme=dark] .MessagesBox::-webkit-scrollbar {width: 0px !important;height: 0px !important;}*/ html[data-theme=dark] .ToolBar, html[data-theme=dark] .Input-wrapper, html[data-theme=dark] .ClubTopPosts, html[data-theme=dark] .ChatSideBar-Search-Input input {border: none !important;} +html[data-theme=dark] .ChatBoxModal-closeIcon {fill: #8590a6 !important;} + /* 私信网页 */ html[data-theme=dark] .ChatUserListItem .Chat-ActionMenuPopover-Button {background: -webkit-gradient(linear,left top,right top,from(rgba(18,18,18,0)),color-stop(20%,#22272e)) !important;background: linear-gradient(90deg,rgba(18,18,18,0),#22272e 20%) !important;} html[data-theme=dark] .css-1j6tmrz {border: 2px solid #2d333b !important;} @@ -222,10 +224,10 @@ html[data-theme=dark] .Popover .InputLike {border: 1px solid #2d333b !important; html[data-theme=dark] .Popover-content, html[data-theme=dark] .Popover-arrow:after {border: 1px solid #22272e !important;} /* 滚动条 */ -html[data-theme=dark] body::-webkit-scrollbar, html[data-theme="dark"] .MessagesBox::-webkit-scrollbar, html[data-theme="dark"] .Messages-list::-webkit-scrollbar, html[data-theme=dark] .PushNotifications-list::-webkit-scrollbar, html[data-theme=dark] .CommentListV2::-webkit-scrollbar, .ChatListGroup-SectionContent::-webkit-scrollbar, html[data-theme=dark] .ChatSideBar-Search-ResultListWrap::-webkit-scrollbar {width: 6px !important;height: 1px !important;} -html[data-theme=dark] body::-webkit-scrollbar-thumb, html[data-theme="dark"] .MessagesBox::-webkit-scrollbar-thumb, html[data-theme="dark"] .Messages-list::-webkit-scrollbar-thumb, html[data-theme=dark] .PushNotifications-list::-webkit-scrollbar-thumb, html[data-theme=dark] .CommentListV2::-webkit-scrollbar-thumb, .ChatListGroup-SectionContent::-webkit-scrollbar-thumb, html[data-theme=dark] .ChatSideBar-Search-ResultListWrap::-webkit-scrollbar-thumb {background: #3f4752 !important;} +html[data-theme=dark] body::-webkit-scrollbar, html[data-theme="dark"] .MessagesBox::-webkit-scrollbar, html[data-theme="dark"] .Messages-list::-webkit-scrollbar, html[data-theme=dark] .PushNotifications-list::-webkit-scrollbar, html[data-theme=dark] .CommentListV2::-webkit-scrollbar, .ChatListGroup-SectionContent::-webkit-scrollbar, html[data-theme=dark] .ChatSideBar-Search-ResultListWrap::-webkit-scrollbar, html[data-theme=dark] .ChatBox textarea.Input::-webkit-scrollbar {width: 6px !important;height: 1px !important;} +html[data-theme=dark] body::-webkit-scrollbar-thumb, html[data-theme="dark"] .MessagesBox::-webkit-scrollbar-thumb, html[data-theme="dark"] .Messages-list::-webkit-scrollbar-thumb, html[data-theme=dark] .PushNotifications-list::-webkit-scrollbar-thumb, html[data-theme=dark] .CommentListV2::-webkit-scrollbar-thumb, .ChatListGroup-SectionContent::-webkit-scrollbar-thumb, html[data-theme=dark] .ChatSideBar-Search-ResultListWrap::-webkit-scrollbar-thumb, html[data-theme=dark] .ChatBox textarea.Input::-webkit-scrollbar-thumb {background: #3f4752 !important;} html[data-theme=dark] body::-webkit-scrollbar-track {background: #22272e !important;} -html[data-theme=dark] .MessagesBox::-webkit-scrollbar-track, html[data-theme="dark"] .Messages-list::-webkit-scrollbar-track, html[data-theme=dark] .PushNotifications-list::-webkit-scrollbar-track, html[data-theme=dark] .CommentListV2::-webkit-scrollbar-track, .ChatListGroup-SectionContent::-webkit-scrollbar-track, html[data-theme=dark] .ChatSideBar-Search-ResultListWrap::-webkit-scrollbar-track {background: #2d333b !important;} +html[data-theme=dark] .MessagesBox::-webkit-scrollbar-track, html[data-theme="dark"] .Messages-list::-webkit-scrollbar-track, html[data-theme=dark] .PushNotifications-list::-webkit-scrollbar-track, html[data-theme=dark] .CommentListV2::-webkit-scrollbar-track, .ChatListGroup-SectionContent::-webkit-scrollbar-track, html[data-theme=dark] .ChatSideBar-Search-ResultListWrap::-webkit-scrollbar-track, html[data-theme=dark] .ChatBox textarea.Input::-webkit-scrollbar-track {background: #2d333b !important;} html {scrollbar-width: thin; scrollbar-color: #3f4752 #22272e;} .MessagesBox, .Messages-list, .PushNotifications-list, .CommentListV2, .ChatListGroup-SectionContent, .ChatSideBar-Search-ResultListWrap {scrollbar-width: thin; scrollbar-color: #3f4752 #2D333B;} From 1e863df74a32fdf86cf5015395f65ccdf4a1cce1 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 16 May 2021 10:07:14 +0800 Subject: [PATCH 0009/2159] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=9B=9E?= =?UTF-8?q?=E5=88=B0=E9=A1=B6=E9=83=A8=EF=BC=88=E5=8F=B3=E9=94=AE=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E4=B8=A4=E4=BE=A7=E7=A9=BA=E7=99=BD=E5=A4=84=EF=BC=89?= =?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 --- Hostloc-Enhanced.user.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index fe598b2b3..1032e3046 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.0.7 +// @version 1.0.8 // @author X.I.U -// @description 自动无缝翻页、自动显示帖子内隐藏回复 +// @description 自动无缝翻页、自动显示帖子内隐藏回复、回到顶部(右键点击两侧空白处) // @match *://hostloc.com/* // @icon https://www.hostloc.com/favicon.ico // @grant GM_xmlhttpRequest @@ -20,7 +20,8 @@ (function() { var menu_ALL = [ ['menu_thread_pageLoading', '帖子内自动翻页', '帖子内自动翻页', true], - ['menu_showhide', '自动显示隐藏回复', '自动显示隐藏回复', true] + ['menu_showhide', '自动显示隐藏回复', '自动显示隐藏回复', true], + ['menu_backToTop', '回到顶部(右键点击两侧空白处)', '回到顶部', true] ], menu_ID = []; for (let i=0;i Date: Sun, 16 May 2021 10:11:46 +0800 Subject: [PATCH 0010/2159] README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 08f87b94a..140d4a45e 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ | [](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 896a16c6ba287ee8f764853d3fee980059ae892b Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 16 May 2021 10:54:35 +0800 Subject: [PATCH 0011/2159] README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 140d4a45e..965b461df 100644 --- a/README.md +++ b/README.md @@ -17,21 +17,21 @@ | | 脚本名称 | 脚本功能 | 安装 \| 备用 | | :----: | :---- | :---- | :----: | -| [](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://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)** | | [](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)** | +| [](https://github.com/XIU2) | **自动无缝翻页 \*** | 423Down、Apphot、不死鸟、小众软件、异次元软件... | **[安装](https://greasyfork.org/zh-CN/scripts/419215)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/Autopage.user.js)** | | [](https://bbs.3dmgame.com) | **3DM论坛 美化** | 精简多余内容、样式优化 | **[安装](https://greasyfork.org/zh-CN/scripts/413593)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript@master/3dm-Beautification.user.js)** | | [](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 10c1be4018e6cb77d062e15b8436b61cf7062adb Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 17 May 2021 15:30:01 +0800 Subject: [PATCH 0012/2159] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=B1=8F=E8=94=BD=E9=98=85=E8=AF=BB=E6=9D=83=E9=99=90?= =?UTF-8?q?=20255=20=E7=9A=84=E5=B8=96=E5=AD=90]=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 | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 1032e3046..158d22b6b 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.0.8 +// @version 1.0.9 // @author X.I.U -// @description 自动无缝翻页、自动显示帖子内隐藏回复、回到顶部(右键点击两侧空白处) +// @description 自动无缝翻页、自动显示帖子内隐藏回复、自动屏蔽阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) // @match *://hostloc.com/* // @icon https://www.hostloc.com/favicon.ico // @grant GM_xmlhttpRequest @@ -21,6 +21,7 @@ var menu_ALL = [ ['menu_thread_pageLoading', '帖子内自动翻页', '帖子内自动翻页', true], ['menu_showhide', '自动显示隐藏回复', '自动显示隐藏回复', true], + ['menu_delate255', '自动屏蔽阅读权限 255 的帖子', '自动屏蔽阅读权限 255 的帖子', true], ['menu_backToTop', '回到顶部(右键点击两侧空白处)', '回到顶部', true] ], menu_ID = []; for (let i=0;i -1){ // 各板块帖子列表 curSite = DBSite.forum; + if (menu_value('menu_delate255')) delate255(); // 屏蔽阅读权限 255 的帖子 }else if (patt_guide.test(location.search)){ // 导读帖子列表 curSite = DBSite.guide; @@ -143,12 +145,19 @@ windowScroll(function (direction, e) { if (direction === "down") { // 下滑才准备翻页 let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop; - let scrollDelta = 766; - if (document.documentElement.scrollHeight <= document.documentElement.clientHeight + scrollTop + scrollDelta) { + if (document.documentElement.scrollHeight <= document.documentElement.clientHeight + scrollTop + 999) { if (curSite.SiteTypeID === SiteType.FORUM) { // 如果是各版块帖子列表则直接点下一页就行了 let autopbn = document.querySelector('#autopbn'); - if (autopbn && autopbn.innerText == "下一页 »"){ // 如果已经在加载中了,就忽略 + if (autopbn && autopbn.innerText === "下一页 »"){ // 如果已经在加载中了,就忽略 autopbn.click(); + if (menu_value('menu_delate255')) { + let timer = setInterval(function(){ + if (document.querySelector('#autopbn').innerText === "下一页 »") { + delate255(); + clearInterval(timer); + } + }, 10); + } } }else{ ShowPager.loadMorePage(); @@ -190,6 +199,19 @@ } + // 屏蔽阅读权限 255 的帖子 + function delate255() { + if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1){ + let tbody = document.querySelectorAll('tbody[id^="normalthread_"] .common .xw1'); + Array.from(tbody).forEach(function (_this) { + if (_this.innerText === '255') { + _this.parentNode.parentNode.parentNode.remove(); + } + }) + } + } + + // 滚动条事件 function windowScroll(fn1) { var beforeScrollTop = document.documentElement.scrollTop, From d9a9548a24b7f6d498365c9a7ec98f8124fed1ce Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 17 May 2021 15:33:51 +0800 Subject: [PATCH 0013/2159] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E9=9A=90=E8=97=8F=E9=98=85=E8=AF=BB=E6=9D=83=E9=99=90?= =?UTF-8?q?=20255=20=E7=9A=84=E5=B8=96=E5=AD=90]=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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 158d22b6b..dd3f51683 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -2,7 +2,7 @@ // @name 全球主机交流论坛增强 // @version 1.0.9 // @author X.I.U -// @description 自动无缝翻页、自动显示帖子内隐藏回复、自动屏蔽阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) +// @description 自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) // @match *://hostloc.com/* // @icon https://www.hostloc.com/favicon.ico // @grant GM_xmlhttpRequest @@ -21,7 +21,7 @@ var menu_ALL = [ ['menu_thread_pageLoading', '帖子内自动翻页', '帖子内自动翻页', true], ['menu_showhide', '自动显示隐藏回复', '自动显示隐藏回复', true], - ['menu_delate255', '自动屏蔽阅读权限 255 的帖子', '自动屏蔽阅读权限 255 的帖子', true], + ['menu_delate255', '自动隐藏阅读权限 255 的帖子', '自动隐藏阅读权限 255 的帖子', true], ['menu_backToTop', '回到顶部(右键点击两侧空白处)', '回到顶部', true] ], menu_ID = []; for (let i=0;i -1){ // 各板块帖子列表 curSite = DBSite.forum; - if (menu_value('menu_delate255')) delate255(); // 屏蔽阅读权限 255 的帖子 + if (menu_value('menu_delate255')) delate255(); // 自动隐藏阅读权限 255 的帖子 }else if (patt_guide.test(location.search)){ // 导读帖子列表 curSite = DBSite.guide; @@ -150,7 +150,7 @@ let autopbn = document.querySelector('#autopbn'); if (autopbn && autopbn.innerText === "下一页 »"){ // 如果已经在加载中了,就忽略 autopbn.click(); - if (menu_value('menu_delate255')) { + if (menu_value('menu_delate255')) { // 自动隐藏阅读权限 255 的帖子 let timer = setInterval(function(){ if (document.querySelector('#autopbn').innerText === "下一页 »") { delate255(); @@ -199,7 +199,7 @@ } - // 屏蔽阅读权限 255 的帖子 + // 自动隐藏阅读权限 255 的帖子 function delate255() { if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1){ let tbody = document.querySelectorAll('tbody[id^="normalthread_"] .common .xw1'); From e6d20a5bcee01fb7f644c6ae6a95b97f6443515d Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 19 May 2021 20:26:04 +0800 Subject: [PATCH 0014/2159] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=9C=AA?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=83=85=E5=86=B5=E4=B8=8B=E4=BC=9A=E6=8A=8A?= =?UTF-8?q?=20Git=20Clone=20SSH=20=E5=8A=A0=E9=80=9F=E6=BA=90=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=88=B0=20GitHub=20CLI=20=E5=88=97=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index 0d6ce4cf5..198f22b71 100644 --- a/GithubEnhanced-High-Speed-Download.user.js +++ b/GithubEnhanced-High-Speed-Download.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Github 增强 - 高速下载 -// @version 1.4.9 +// @version 1.5.0 // @author X.I.U // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) // @match *://github.com/* @@ -223,6 +223,8 @@ url = [], _html = ``; + if (href_split[0] != 'git@github.com') return + for (let i=0;i Date: Fri, 21 May 2021 15:04:52 +0800 Subject: [PATCH 0015/2159] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E7=BE=8E?= =?UTF-8?q?=E5=9B=BD=E8=B4=B9=E5=88=A9=E8=92=99]=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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GithubEnhanced-High-Speed-Download.user.js b/GithubEnhanced-High-Speed-Download.user.js index 198f22b71..66686ff99 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.0 +// @version 1.5.1 // @author X.I.U // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) // @match *://github.com/* @@ -34,6 +34,7 @@ ['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','韩国首尔'], From b373c1daa6f40fd203d95caadac47416e466ef6d Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 22 May 2021 09:49:51 +0800 Subject: [PATCH 0016/2159] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=AD=BE=E5=88=B0]=20=E5=8A=9F=E8=83=BD=EF=BC=88?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=AE=BF=E9=97=AE=E7=A9=BA=E9=97=B4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 56 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index dd3f51683..49db8a120 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.0.9 +// @version 1.1.0 // @author X.I.U -// @description 自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) +// @description 自动签到(访问空间)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) // @match *://hostloc.com/* // @icon https://www.hostloc.com/favicon.ico // @grant GM_xmlhttpRequest @@ -19,6 +19,8 @@ (function() { var menu_ALL = [ + ['menu_autoSignIn', '自动签到', '自动签到', true], + ['menu_reAutoSignIn', '重新签到', '重新签到', ''], ['menu_thread_pageLoading', '帖子内自动翻页', '帖子内自动翻页', true], ['menu_showhide', '自动显示隐藏回复', '自动显示隐藏回复', true], ['menu_delate255', '自动隐藏阅读权限 255 的帖子', '自动隐藏阅读权限 255 的帖子', true], @@ -38,7 +40,11 @@ } for (let i=0;i Date: Sat, 22 May 2021 09:53:18 +0800 Subject: [PATCH 0017/2159] =?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 --- Lanzou-Enhanced.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lanzou-Enhanced.user.js b/Lanzou-Enhanced.user.js index a78a50e84..e05f907e2 100644 --- a/Lanzou-Enhanced.user.js +++ b/Lanzou-Enhanced.user.js @@ -397,7 +397,7 @@ // 输入密码后回车确认 function enterToPass() { document.getElementById('pwd').onkeydown = function(e){ - if(e.keyCode == 13){ + if(e.key === 'Enter'){ document.getElementById('sub').click(); } }; From 9c79b03b6f8d0259d9f9d0a4be46bb24c315fa6f Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 22 May 2021 10:02:15 +0800 Subject: [PATCH 0018/2159] =?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 --- Lanzou-Enhanced.user.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Lanzou-Enhanced.user.js b/Lanzou-Enhanced.user.js index e05f907e2..c95f5d8ab 100644 --- a/Lanzou-Enhanced.user.js +++ b/Lanzou-Enhanced.user.js @@ -153,9 +153,7 @@ function refreshCorrection() { document.onkeydown = mainframe.onkeydown = function (e) { e = window.event || e; - let keycode = e.keyCode; - if (keycode == 116) { - e.keyCode = 0; + if (e.key === 'F5') { let folderID = /-?\d+/.exec(mainframe.document.getElementById("filemore").children[0].getAttribute("onclick")) if(folderID.length > 0){ mainframe.folder(folderID[0]); @@ -172,8 +170,7 @@ function UNrefreshCorrection() { document.onkeydown = mainframe.onkeydown = function (e) { e = window.event || e; - let keycode = e.keyCode; - if (keycode == 116) { + if (e.key === 'F5') { return true; } } From ac5c51cd21682867ffbcc4dedea4bf473a31e047 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 22 May 2021 13:59:43 +0800 Subject: [PATCH 0019/2159] README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 965b461df..9264e69d5 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ | [](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 4085ef774fe9350e6c91992a5cb8699bb43402a5 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sat, 22 May 2021 14:03:21 +0800 Subject: [PATCH 0020/2159] README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9264e69d5..7970354be 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ | [](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://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://github.com/XIU2/UserScript/issues/new/choose)!_ From e867879928d25bbc4c0d5b14005c3dad488e2283 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 23 May 2021 00:17:45 +0800 Subject: [PATCH 0021/2159] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E6=96=87?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 49db8a120..4dca19872 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -152,7 +152,7 @@ let timeNow = new Date().getFullYear() + "/" + (new Date().getMonth() + 1) + "/" + new Date().getDate(), timeOld = GM_getValue('menu_signInTime'); if (!timeOld || timeOld != timeNow) { // 是新的一天 - GM_notification({text: '请不要关闭/刷新网页!耐心等待 60 秒~\n在此期间可以在 "其他标签页" 浏览论坛!', timeout: 10000}); + GM_notification({text: '请不要关闭/刷新本页!耐心等待 60 秒~\n在此期间可以在 "其他标签页" 浏览论坛!', timeout: 10000}); let url_list = [], url = 0; // 随机生成 12 个空间地址(2 个冗余) From 450a78087b05cbe91c15a7c22b08d1051c41d465 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 23 May 2021 00:20:28 +0800 Subject: [PATCH 0022/2159] =?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=EF=BC=88?= =?UTF-8?q?=E7=AD=BE=E5=88=B0=E5=AE=8C=E6=88=90=E5=90=8E=E5=B0=86=E4=BC=9A?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 4dca19872..1f79ade7c 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.1.0 +// @version 1.1.1 // @author X.I.U // @description 自动签到(访问空间)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) // @match *://hostloc.com/* @@ -168,6 +168,7 @@ console.log(`[全球主机交流论坛 增强] 金钱 +2 (${url_list[url]})`); if (url === 11) { // 次数够了就取消定时循环 console.log('[全球主机交流论坛 增强] 签到完成!'); + GM_notification({text: '签到完成!金钱 +20 ~', timeout: 3500}); GM_setValue('menu_signingIn', false); GM_setValue('menu_signInTime', timeNow); // 写入签到时间以供后续比较 clearInterval(signIn); From 5a8f7b8e455fcbf73c13c6230ddfb03756666768 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 23 May 2021 15:56:24 +0800 Subject: [PATCH 0023/2159] =?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=E7=94=A8=E6=88=B7=EF=BC=88=E9=BB=91?= =?UTF-8?q?=E5=90=8D=E5=8D=95=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 | 56 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 1f79ade7c..7d715b155 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.1.1 +// @version 1.1.2 // @author X.I.U -// @description 自动签到(访问空间)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) +// @description 自动签到(访问空间)、屏蔽指定用户(黑名单)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) // @match *://hostloc.com/* // @icon https://www.hostloc.com/favicon.ico // @grant GM_xmlhttpRequest @@ -21,6 +21,8 @@ var menu_ALL = [ ['menu_autoSignIn', '自动签到', '自动签到', true], ['menu_reAutoSignIn', '重新签到', '重新签到', ''], + ['menu_blockUsers', '屏蔽指定用户', '屏蔽指定用户', false], + ['menu_customBlockUsers', '自定义屏蔽用户', '自定义屏蔽用户', []], ['menu_thread_pageLoading', '帖子内自动翻页', '帖子内自动翻页', true], ['menu_showhide', '自动显示隐藏回复', '自动显示隐藏回复', true], ['menu_delate255', '自动隐藏阅读权限 255 的帖子', '自动隐藏阅读权限 255 的帖子', true], @@ -42,6 +44,8 @@ menu_ALL[i][3] = GM_getValue(menu_ALL[i][0]); if (menu_ALL[i][0] === 'menu_reAutoSignIn') { menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){reAutoSignIn()}); + } else if (menu_ALL[i][0] === 'menu_customBlockUsers') { + menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){customBlockUsers()}); } 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]}`)}); } @@ -128,16 +132,19 @@ hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮 } showPosts(); // 自动显示帖子内被隐藏的回复 + blockUsers('thread'); }else if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1){ // 各板块帖子列表 curSite = DBSite.forum; if (menu_value('menu_delate255')) delate255(); // 自动隐藏阅读权限 255 的帖子 + blockUsers('forum'); }else if (patt_guide.test(location.search)){ // 导读帖子列表 curSite = DBSite.guide; }else if(location.pathname === '/search.php'){ // 搜索结果列表 curSite = DBSite.search; + blockUsers('search'); } curSite.pageUrl = ""; // 下一页URL @@ -188,6 +195,51 @@ } + // 自定义屏蔽用户 + function customBlockUsers() { + let nowBlockUsers = ''; + menu_value('menu_customBlockUsers').forEach(function(item){nowBlockUsers = nowBlockUsers + '|' + item}) + let newBlockUsers = prompt('编辑 [自定义屏蔽用户],刷新网页后生效\n(不同用户名之间使用 "|" 分隔,\n(例如:用户A|用户B|用户C,如果只有一个就不需要 "|" 了。', nowBlockUsers.replace('|','')); + if (newBlockUsers === '') { + GM_setValue('menu_customBlockUsers', []); + } else if (newBlockUsers != null) { + GM_setValue('menu_customBlockUsers', newBlockUsers.split('|')); + } + }; + + + // 屏蔽指定用户 + function blockUsers(type) { + if (!menu_value('menu_blockUsers')) return + if (!menu_value('menu_customBlockUsers') || menu_value('menu_customBlockUsers').length < 1) return + switch(type) { + case 'thread': + blockUsers_('[id^="post_"]'); + break; + case 'forum': + blockUsers_('[id^="normalthread_"]'); + break; + case 'search': + blockUsers_('.pbw'); + break; + } + + function blockUsers_(list) { + let listItem = document.querySelectorAll(list); + if (listItem.length < 1) return + listItem.forEach(function(item){ // 遍历所有帖子 + menu_value('menu_customBlockUsers').forEach(function(item1){ // 遍历用户黑名单 + let itemName = item.querySelector('a[href^="space-uid"]'); // 寻找用户名 + if (itemName && itemName.innerText === item1) { + //console.log(item1); + item.remove(); // 删除帖子 + } + }) + }) + } + } + + // 自动翻页 function pageLoading() { if (curSite.SiteTypeID > 0){ From c5a043634e180b824945e8df810d371282fd86eb Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 23 May 2021 15:57:54 +0800 Subject: [PATCH 0024/2159] =?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=E9=81=BF=E5=85=8D=E6=B8=85=E7=A9=BA=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=BB=91=E5=90=8D=E5=8D=95=E5=90=8E=E5=87=BA=E9=94=99?= =?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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Zhihu-Enhanced.user.js b/Zhihu-Enhanced.user.js index 0854001c8..60c616bc2 100644 --- a/Zhihu-Enhanced.user.js +++ b/Zhihu-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 知乎增强 -// @version 1.4.1 +// @version 1.4.2 // @author X.I.U // @description 移除登录弹窗、一键收起回答、收起当前回答/评论(点击两侧空白处)、快捷回到顶部(右键两侧空白处)、屏蔽指定用户、屏蔽盐选内容、置顶显示时间、显示问题时间、区分问题文章、默认高清原图、默认站外直链 // @match *://www.zhihu.com/* @@ -213,7 +213,10 @@ function customBlockUsers() { let nowBlockUsers = ''; menu_value('menu_customBlockUsers').forEach(function(item){nowBlockUsers = nowBlockUsers + '|' + item}) let newBlockUsers = prompt('编辑 [自定义屏蔽用户]\n(不同用户名之间使用 "|" 分隔,例如:用户A|用户B|用户C )', nowBlockUsers.replace('|','')); - if (newBlockUsers != null) { + if (newBlockUsers === '') { + GM_setValue('menu_customBlockUsers', []); + registerMenuCommand(); // 重新注册脚本菜单 + } else if (newBlockUsers != null) { GM_setValue('menu_customBlockUsers', newBlockUsers.split('|')); registerMenuCommand(); // 重新注册脚本菜单 } @@ -223,6 +226,7 @@ function customBlockUsers() { // 屏蔽指定用户 function blockUsers(type) { if (!menu_value('menu_blockUsers')) return + if (!menu_value('menu_customBlockUsers') || menu_value('menu_customBlockUsers').length < 1) return switch(type) { case 'index': blockUsers_index(); From eba0e2f3ab2ff4727b8194d362522a797b0f04c7 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 23 May 2021 16:11:25 +0800 Subject: [PATCH 0025/2159] =?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=EF=BC=88=E9=BB=91?= =?UTF-8?q?=E5=90=8D=E5=8D=95=EF=BC=89]=20=E5=8A=9F=E8=83=BD=EF=BC=88?= =?UTF-8?q?=E9=80=82=E9=85=8D=E8=87=AA=E5=8A=A8=E6=97=A0=E7=BC=9D=E7=BF=BB?= =?UTF-8?q?=E9=A1=B5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 7d715b155..4f5faa8ed 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.1.2 +// @version 1.1.3 // @author X.I.U // @description 自动签到(访问空间)、屏蔽指定用户(黑名单)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) // @match *://hostloc.com/* @@ -231,7 +231,7 @@ menu_value('menu_customBlockUsers').forEach(function(item1){ // 遍历用户黑名单 let itemName = item.querySelector('a[href^="space-uid"]'); // 寻找用户名 if (itemName && itemName.innerText === item1) { - //console.log(item1); + console.log(item1); item.remove(); // 删除帖子 } }) @@ -255,6 +255,7 @@ let timer = setInterval(function(){ if (document.querySelector('#autopbn').innerText === "下一页 »") { delate255(); + blockUsers('forum'); clearInterval(timer); } }, 10); @@ -392,6 +393,13 @@ pageElems.forEach(function (one) { toElement.insertAdjacentElement(addTo, one); }); + if (menu_value('menu_blockUsers')) { // 屏蔽指定用户 + if (patt_thread.test(location.pathname) || location.search.indexOf('mod=viewthread') > -1) { + blockUsers('thread'); + } else if (location.pathname === '/search.php') { + blockUsers('search'); + } + } // 替换待替换元素 try { let oriE = getAllElements(curSite.pager.replaceE); From 4ba9f6b091dc79c1b586add865fd174f08835502 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 23 May 2021 16:54:53 +0800 Subject: [PATCH 0026/2159] =?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=E7=94=A8=E6=88=B7=EF=BC=88=E9=BB=91?= =?UTF-8?q?=E5=90=8D=E5=8D=95=EF=BC=89]=20=E5=8A=9F=E8=83=BD=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=B6=88=E6=81=AF=E3=80=81=E7=82=B9=E8=AF=84=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 49 ++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 4f5faa8ed..c620ac0cc 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.1.3 +// @version 1.1.4 // @author X.I.U // @description 自动签到(访问空间)、屏蔽指定用户(黑名单)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) // @match *://hostloc.com/* @@ -125,26 +125,26 @@ patt_guide = /mod\=guide\&view\=(hot|digest)/ // URL 判断 - if (patt_thread.test(location.pathname) || location.search.indexOf('mod=viewthread') > -1){ - // 帖子内 - if(menu_value('menu_thread_pageLoading')) { + if (patt_thread.test(location.pathname) || location.search.indexOf('mod=viewthread') > -1) { // 帖子内 + if (menu_value('menu_thread_pageLoading')) { curSite = DBSite.thread; hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮 } showPosts(); // 自动显示帖子内被隐藏的回复 blockUsers('thread'); - }else if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1){ - // 各板块帖子列表 + } else if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1) { // 各板块帖子列表 curSite = DBSite.forum; if (menu_value('menu_delate255')) delate255(); // 自动隐藏阅读权限 255 的帖子 blockUsers('forum'); - }else if (patt_guide.test(location.search)){ - // 导读帖子列表 + }else if (patt_guide.test(location.search)) { // 导读帖子列表 curSite = DBSite.guide; - }else if(location.pathname === '/search.php'){ - // 搜索结果列表 + } else if(location.pathname === '/search.php') { // 搜索结果列表 curSite = DBSite.search; 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') { // 消息(私人聊天) + blockUsers('pm'); } curSite.pageUrl = ""; // 下一页URL @@ -198,12 +198,14 @@ // 自定义屏蔽用户 function customBlockUsers() { let nowBlockUsers = ''; - menu_value('menu_customBlockUsers').forEach(function(item){nowBlockUsers = nowBlockUsers + '|' + item}) + GM_getValue('menu_customBlockUsers').forEach(function(item){nowBlockUsers = nowBlockUsers + '|' + item}) let newBlockUsers = prompt('编辑 [自定义屏蔽用户],刷新网页后生效\n(不同用户名之间使用 "|" 分隔,\n(例如:用户A|用户B|用户C,如果只有一个就不需要 "|" 了。', nowBlockUsers.replace('|','')); if (newBlockUsers === '') { GM_setValue('menu_customBlockUsers', []); + registerMenuCommand(); // 重新注册脚本菜单 } else if (newBlockUsers != null) { GM_setValue('menu_customBlockUsers', newBlockUsers.split('|')); + registerMenuCommand(); // 重新注册脚本菜单 } }; @@ -213,23 +215,30 @@ if (!menu_value('menu_blockUsers')) return if (!menu_value('menu_customBlockUsers') || menu_value('menu_customBlockUsers').length < 1) return switch(type) { - case 'thread': - blockUsers_('[id^="post_"]'); + case 'thread': // 帖子内 + blockUsers_('[id^="post_"]', 'a[href^="space-uid"]'); + blockUsers_('[id^="comment_"] > div', 'a.xi2.xw1'); // 点评 break; - case 'forum': - blockUsers_('[id^="normalthread_"]'); + case 'forum': // 各版块帖子列表 + blockUsers_('[id^="normalthread_"]', 'a[href^="space-uid"]'); break; - case 'search': - blockUsers_('.pbw'); + case 'search': // 搜索结果 + blockUsers_('.pbw', 'a[href^="space-uid"]'); + break; + case 'notice': // 消息 + blockUsers_('dl.cl', '.ntc_body a[href^="space-uid"]'); + break; + case 'pm': // 私人聊天 + blockUsers_('dl[id^="pmlist_"]', '.ptm.pm_c a[href^="space-uid"]'); break; } - function blockUsers_(list) { - let listItem = document.querySelectorAll(list); + function blockUsers_(list1, list2) { + let listItem = document.querySelectorAll(list1); if (listItem.length < 1) return listItem.forEach(function(item){ // 遍历所有帖子 menu_value('menu_customBlockUsers').forEach(function(item1){ // 遍历用户黑名单 - let itemName = item.querySelector('a[href^="space-uid"]'); // 寻找用户名 + let itemName = item.querySelector(list2); // 寻找用户名 if (itemName && itemName.innerText === item1) { console.log(item1); item.remove(); // 删除帖子 From e0cf124a292ce57ee4747a8f1f37ea087fd48328 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 23 May 2021 17:01:07 +0800 Subject: [PATCH 0027/2159] README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7970354be..ab5e4c69b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ | [](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 0c75bf0d8d2f4349c7e221d6861af24939075537 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 23 May 2021 17:19:21 +0800 Subject: [PATCH 0028/2159] =?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(=E8=AE=BF=E9=97=AE=E7=A9=BA?= =?UTF-8?q?=E9=97=B4)]=20=E5=8A=9F=E8=83=BD=EF=BC=88=E6=9C=AA=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=B0=86=E4=B8=8D=E4=BC=9A=E8=BF=90=E8=A1=8C=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, 8 insertions(+), 1 deletion(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index c620ac0cc..fc5db8850 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.1.4 +// @version 1.1.5 // @author X.I.U // @description 自动签到(访问空间)、屏蔽指定用户(黑名单)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) // @match *://hostloc.com/* @@ -74,6 +74,12 @@ } } + // 检查是否登陆 + var loginStatus = false; + if (document.getElementById('um')){ + loginStatus = true; + } + // 默认 ID 为 0 var curSite = {SiteTypeID: 0}; @@ -155,6 +161,7 @@ // 自动签到(访问空间 10 次 = 20 积分) function autoSignIn() { + if (!loginStatus) return if (GM_getValue('menu_signingIn')) return let timeNow = new Date().getFullYear() + "/" + (new Date().getMonth() + 1) + "/" + new Date().getDate(), timeOld = GM_getValue('menu_signInTime'); From 62478063430dcd954b531d5a747d1e68314114bd Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 24 May 2021 09:35:25 +0800 Subject: [PATCH 0029/2159] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E5=85=B3=E9=94=AE=E8=AF=8D=EF=BC=88=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E6=A0=87=E9=A2=98=EF=BC=89]=20=E5=8A=9F=E8=83=BD;=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20[=E5=B1=8F=E8=94=BD=E7=94=A8=E6=88=B7=E3=80=81?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E9=9A=90=E8=97=8F=E9=98=85=E8=AF=BB=E6=9D=83?= =?UTF-8?q?=E9=99=90=20255=20=E7=9A=84=E5=B8=96=E5=AD=90]=20=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 93 +++++++++++++++++++++++++++++----------- 1 file changed, 69 insertions(+), 24 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index fc5db8850..d0f2b31b9 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.1.5 +// @version 1.1.6 // @author X.I.U -// @description 自动签到(访问空间)、屏蔽指定用户(黑名单)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) +// @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) // @match *://hostloc.com/* // @icon https://www.hostloc.com/favicon.ico // @grant GM_xmlhttpRequest @@ -21,8 +21,10 @@ var menu_ALL = [ ['menu_autoSignIn', '自动签到', '自动签到', true], ['menu_reAutoSignIn', '重新签到', '重新签到', ''], - ['menu_blockUsers', '屏蔽指定用户', '屏蔽指定用户', false], + ['menu_blockUsers', '屏蔽用户', '屏蔽用户', false], ['menu_customBlockUsers', '自定义屏蔽用户', '自定义屏蔽用户', []], + ['menu_blockKeywords', '屏蔽关键词(帖子标题)', '屏蔽关键词(帖子标题)', false], + ['menu_customBlockKeywords', '自定义屏蔽关键词', '自定义屏蔽关键词', []], ['menu_thread_pageLoading', '帖子内自动翻页', '帖子内自动翻页', true], ['menu_showhide', '自动显示隐藏回复', '自动显示隐藏回复', true], ['menu_delate255', '自动隐藏阅读权限 255 的帖子', '自动隐藏阅读权限 255 的帖子', true], @@ -46,6 +48,8 @@ menu_ID[i] = GM_registerMenuCommand(`[ ⚑ ] ${menu_ALL[i][1]}`, function(){reAutoSignIn()}); } else 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]}`)}); } @@ -134,23 +138,27 @@ if (patt_thread.test(location.pathname) || location.search.indexOf('mod=viewthread') > -1) { // 帖子内 if (menu_value('menu_thread_pageLoading')) { curSite = DBSite.thread; - hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮 + hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮 } - showPosts(); // 自动显示帖子内被隐藏的回复 - blockUsers('thread'); + showPosts(); // 自动显示帖子内被隐藏的回复 + blockUsers('thread'); // 屏蔽用户(黑名单) } else if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1) { // 各板块帖子列表 curSite = DBSite.forum; - if (menu_value('menu_delate255')) delate255(); // 自动隐藏阅读权限 255 的帖子 - blockUsers('forum'); - }else if (patt_guide.test(location.search)) { // 导读帖子列表 + if (menu_value('menu_delate255')) { // 自动隐藏阅读权限 255 的帖子 + delate255(); + setTimeout(delate255, 1500); // 为了避免有时候网页加载太慢时没有隐藏成功的问题 + } + blockUsers('forum'); // 屏蔽用户(黑名单) + blockKeywords(); // 屏蔽关键词(帖子标题) + }else if (patt_guide.test(location.search)) { // 导读帖子列表 curSite = DBSite.guide; - } else if(location.pathname === '/search.php') { // 搜索结果列表 + } else if(location.pathname === '/search.php') { // 搜索结果列表 curSite = DBSite.search; - blockUsers('search'); + blockUsers('search'); // 屏蔽用户(黑名单) } else if(location.pathname === '/home.php' && location.search.indexOf('mod=space&do=notice&view=mypost') > -1) { // 消息(帖子/点评/提到) - blockUsers('notice'); + blockUsers('notice'); // 屏蔽用户(黑名单) } else if(location.pathname === '/home.php' && location.search === '?mod=space&do=pm') { // 消息(私人聊天) - blockUsers('pm'); + blockUsers('pm'); // 屏蔽用户(黑名单) } curSite.pageUrl = ""; // 下一页URL @@ -217,7 +225,7 @@ }; - // 屏蔽指定用户 + // 屏蔽用户 function blockUsers(type) { if (!menu_value('menu_blockUsers')) return if (!menu_value('menu_customBlockUsers') || menu_value('menu_customBlockUsers').length < 1) return @@ -256,6 +264,44 @@ } + // 自定义屏蔽关键词(帖子标题) + function customBlockKeywords() { + let nowBlockKeywords = ''; + GM_getValue('menu_customBlockKeywords').forEach(function(item){nowBlockKeywords = nowBlockKeywords + '|' + item}) + let newBlockKeywords = prompt('编辑 [自定义屏蔽关键词],刷新网页后生效\n(不同关键词之间使用 "|" 分隔,\n(例如:嘿嘿|呵呵|嘎嘎,如果只有一个就不需要 "|" 了。', nowBlockKeywords.replace('|','')); + if (newBlockKeywords === '') { + GM_setValue('menu_customBlockKeywords', []); + registerMenuCommand(); // 重新注册脚本菜单 + } else if (newBlockKeywords != null) { + GM_setValue('menu_customBlockKeywords', newBlockKeywords.split('|')); + registerMenuCommand(); // 重新注册脚本菜单 + } + }; + + + // 屏蔽关键词(帖子标题) + function blockKeywords() { + if (!menu_value('menu_blockKeywords')) return + if (!menu_value('menu_customBlockKeywords') || menu_value('menu_customBlockKeywords').length < 1) return + //console.log('1111'); + let listItem = document.querySelectorAll('[id^="normalthread_"]'); + //console.log(listItem); + if (listItem.length < 1) return + listItem.forEach(function(item){ // 遍历所有帖子标题 + //console.log(item); + menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词 + let itemName = item.querySelector('th a.s.xst'); // 寻找帖子标题 + //console.log(itemName); + //console.log(item1, itemName.innerText); + if (itemName && itemName.innerText.indexOf(item1) > -1) { + console.log(item1, itemName.innerText); + item.remove(); // 删除帖子 + } + }) + }) + } + + // 自动翻页 function pageLoading() { if (curSite.SiteTypeID > 0){ @@ -267,15 +313,14 @@ let autopbn = document.querySelector('#autopbn'); if (autopbn && autopbn.innerText === "下一页 »"){ // 如果已经在加载中了,就忽略 autopbn.click(); - if (menu_value('menu_delate255')) { // 自动隐藏阅读权限 255 的帖子 - let timer = setInterval(function(){ - if (document.querySelector('#autopbn').innerText === "下一页 »") { - delate255(); - blockUsers('forum'); - clearInterval(timer); - } - }, 10); - } + let timer = setInterval(function(){ // 在下一页加载完成后 + if (document.querySelector('#autopbn').innerText === "下一页 »") { + if (menu_value('menu_delate255')) delate255(); // 隐藏 255 权限帖子 + if (menu_value('menu_blockUsers')) blockUsers('forum'); // 屏蔽用户(黑名单) + if (menu_value('menu_blockKeywords')) blockKeywords(); // 屏蔽关键词(帖子标题) + clearInterval(timer); + } + }, 10); } }else{ ShowPager.loadMorePage(); @@ -409,7 +454,7 @@ pageElems.forEach(function (one) { toElement.insertAdjacentElement(addTo, one); }); - if (menu_value('menu_blockUsers')) { // 屏蔽指定用户 + if (menu_value('menu_blockUsers')) { // 屏蔽用户(黑名单) if (patt_thread.test(location.pathname) || location.search.indexOf('mod=viewthread') > -1) { blockUsers('thread'); } else if (location.pathname === '/search.php') { From ad409bb24073c9225751ffa2317287ce3b5aa7d1 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 24 May 2021 13:35:00 +0800 Subject: [PATCH 0030/2159] =?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 --- V2ex-Enhanced.user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/V2ex-Enhanced.user.js b/V2ex-Enhanced.user.js index 45f4c8e5a..d0a691178 100644 --- a/V2ex-Enhanced.user.js +++ b/V2ex-Enhanced.user.js @@ -222,6 +222,7 @@ } else if (document.getElementById('gift_v2excellent')) { // 兼容 [V2ex Plus] 扩展 document.getElementById('gift_v2excellent').click(); GM_setValue('menu_clockInTime', timeNow); // 写入签到时间以供后续比较 + console.info('[V2EX 增强] 自动签到完成!') } else { // 都没有找到,说明已经签过到了 console.info('[V2EX 增强] 已经签过到了。') } @@ -345,7 +346,7 @@ function linksBlank(css) { if (!menu_value('menu_linksBlank')) return let links = document.querySelectorAll(css);if (!links) return - Array.from(links).forEach(function (_this) { + links.forEach(function (_this) { _this.target = '_blank' }); } From ccef91b9f8c72b0144bbee0c442c721fb6e3dc17 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 24 May 2021 13:59:36 +0800 Subject: [PATCH 0031/2159] =?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 --- Hostloc-Enhanced.user.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index d0f2b31b9..3da2f044b 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -196,9 +196,9 @@ clearInterval(signIn); } }, 5000); - } else { // 新旧签到时间一致 + }/* else { // 新旧签到时间一致 console.info('[全球主机交流论坛 增强] 已经签过到了。') - } + }*/ } @@ -255,7 +255,7 @@ menu_value('menu_customBlockUsers').forEach(function(item1){ // 遍历用户黑名单 let itemName = item.querySelector(list2); // 寻找用户名 if (itemName && itemName.innerText === item1) { - console.log(item1); + console.log(`屏蔽用户:${item1}`); item.remove(); // 删除帖子 } }) @@ -283,18 +283,13 @@ function blockKeywords() { if (!menu_value('menu_blockKeywords')) return if (!menu_value('menu_customBlockKeywords') || menu_value('menu_customBlockKeywords').length < 1) return - //console.log('1111'); let listItem = document.querySelectorAll('[id^="normalthread_"]'); - //console.log(listItem); if (listItem.length < 1) return listItem.forEach(function(item){ // 遍历所有帖子标题 - //console.log(item); menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词 let itemName = item.querySelector('th a.s.xst'); // 寻找帖子标题 - //console.log(itemName); - //console.log(item1, itemName.innerText); if (itemName && itemName.innerText.indexOf(item1) > -1) { - console.log(item1, itemName.innerText); + console.log(`屏蔽关键词:[${item1}]`, `,帖子标题:[${itemName.innerText}]`); item.remove(); // 删除帖子 } }) From d6043b10ee72b1480cbc885ab792979bde785ed6 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 24 May 2021 14:04:17 +0800 Subject: [PATCH 0032/2159] =?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 --- Hostloc-Enhanced.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 3da2f044b..e1bc0a8c1 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -268,7 +268,7 @@ function customBlockKeywords() { let nowBlockKeywords = ''; GM_getValue('menu_customBlockKeywords').forEach(function(item){nowBlockKeywords = nowBlockKeywords + '|' + item}) - let newBlockKeywords = prompt('编辑 [自定义屏蔽关键词],刷新网页后生效\n(不同关键词之间使用 "|" 分隔,\n(例如:嘿嘿|呵呵|嘎嘎,如果只有一个就不需要 "|" 了。', nowBlockKeywords.replace('|','')); + let newBlockKeywords = prompt('编辑 [自定义屏蔽关键词],刷新网页后生效\n(不同关键词之间使用 "|" 分隔,\n(例如:助力|互助|互点,如果只有一个就不需要 "|" 了。', nowBlockKeywords.replace('|','')); if (newBlockKeywords === '') { GM_setValue('menu_customBlockKeywords', []); registerMenuCommand(); // 重新注册脚本菜单 From c4b6f4f94f2eab08087cdab0b57a7e705e2dcf15 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Tue, 25 May 2021 11:17:41 +0800 Subject: [PATCH 0033/2159] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E7=94=A8=E6=88=B7=E3=80=81=E5=B1=8F=E8=94=BD=E5=85=B3?= =?UTF-8?q?=E9=94=AE=E8=AF=8D]=20=E6=94=AF=E6=8C=81=20[=E6=9C=89=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E5=9B=9E=E5=A4=8D=E4=B8=BB=E9=A2=98=EF=BC=8C=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E6=9F=A5=E7=9C=8B]=20=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hostloc-Enhanced.user.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index e1bc0a8c1..03c14eb70 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.1.6 +// @version 1.1.7 // @author X.I.U // @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) // @match *://hostloc.com/* @@ -146,10 +146,11 @@ curSite = DBSite.forum; if (menu_value('menu_delate255')) { // 自动隐藏阅读权限 255 的帖子 delate255(); - setTimeout(delate255, 1500); // 为了避免有时候网页加载太慢时没有隐藏成功的问题 + setTimeout(delate255, 2000); // 为了避免有时候网页加载太慢时没有隐藏成功的问题 } blockUsers('forum'); // 屏蔽用户(黑名单) blockKeywords(); // 屏蔽关键词(帖子标题) + if (patt_forum.test(location.pathname)) blockDOMNodeInserted(); // 监听插入事件(针对的是:有新的回复主题,点击查看) }else if (patt_guide.test(location.search)) { // 导读帖子列表 curSite = DBSite.guide; } else if(location.pathname === '/search.php') { // 搜索结果列表 @@ -287,7 +288,7 @@ if (listItem.length < 1) return listItem.forEach(function(item){ // 遍历所有帖子标题 menu_value('menu_customBlockKeywords').forEach(function(item1){ // 遍历关键词 - let itemName = item.querySelector('th a.s.xst'); // 寻找帖子标题 + let itemName = item.querySelector('a.s.xst'); // 寻找帖子标题 if (itemName && itemName.innerText.indexOf(item1) > -1) { console.log(`屏蔽关键词:[${item1}]`, `,帖子标题:[${itemName.innerText}]`); item.remove(); // 删除帖子 @@ -297,6 +298,20 @@ } + // 监听插入事件(针对的是:有新的回复主题,点击查看) + function blockDOMNodeInserted() { + let block = e => { + if (e.target.innerText && e.target.innerText.indexOf('newthread') > -1) { + setTimeout(function () { + blockUsers('forum'); // 屏蔽用户(黑名单) + blockKeywords(); // 屏蔽关键词(帖子标题) + }, 100) + } + } + document.addEventListener('DOMNodeInserted', block); // 监听插入事件 + } + + // 自动翻页 function pageLoading() { if (curSite.SiteTypeID > 0){ From d5289733c38f2239e50b1dc2e5dc0fb4fc7d3d67 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 26 May 2021 19:38:02 +0800 Subject: [PATCH 0034/2159] =?UTF-8?q?=E6=96=B0=E5=A2=9E=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;=20=E6=96=B0=E5=A2=9E=20[=E6=98=BE=E7=A4=BA=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=9C=A8=E7=BA=BF]=20=E5=8A=9F=E8=83=BD;=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20[=E5=B1=8F=E8=94=BD=E9=98=85=E8=AF=BB=E6=9D=83?= =?UTF-8?q?=E9=99=90=20255=20=E5=B8=96=E5=AD=90]=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, 46 insertions(+), 20 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 03c14eb70..8c3d183df 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -1,8 +1,8 @@ // ==UserScript== // @name 全球主机交流论坛增强 -// @version 1.1.7 +// @version 1.1.8 // @author X.I.U -// @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、回到顶部(右键点击两侧空白处) +// @description 自动签到(访问空间)、屏蔽用户(黑名单)、屏蔽关键词(帖子标题)、自动无缝翻页、自动显示帖子内隐藏回复、自动隐藏阅读权限 255 的帖子、快捷回到顶部(右键点击两侧空白处)、收起预览帖子(左键点击两侧空白处) // @match *://hostloc.com/* // @icon https://www.hostloc.com/favicon.ico // @grant GM_xmlhttpRequest @@ -26,9 +26,11 @@ ['menu_blockKeywords', '屏蔽关键词(帖子标题)', '屏蔽关键词(帖子标题)', false], ['menu_customBlockKeywords', '自定义屏蔽关键词', '自定义屏蔽关键词', []], ['menu_thread_pageLoading', '帖子内自动翻页', '帖子内自动翻页', true], - ['menu_showhide', '自动显示隐藏回复', '自动显示隐藏回复', true], - ['menu_delate255', '自动隐藏阅读权限 255 的帖子', '自动隐藏阅读权限 255 的帖子', true], - ['menu_backToTop', '回到顶部(右键点击两侧空白处)', '回到顶部', true] + ['menu_showhide', '显示隐藏回复', '显示隐藏回复', true], + ['menu_backToTop', '快捷回到顶部(右键点击两侧空白处)', '快捷回到顶部', true], + ['menu_collapsedNowPost', '收起预览帖子(左键点击两侧空白处)', '收起预览帖子', true], + ['menu_onlineStatus', '显示是否在线', '显示是否在线', true], + ['menu_delate255', '屏蔽阅读权限 255 帖子', '屏蔽阅读权限 255 帖子', true] ], menu_ID = []; for (let i=0;i -1) { // 帖子内 if (menu_value('menu_thread_pageLoading')) { curSite = DBSite.thread; - hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮 + hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮 } - showPosts(); // 自动显示帖子内被隐藏的回复 - blockUsers('thread'); // 屏蔽用户(黑名单) + showPosts(); // 自动显示帖子内被隐藏的回复 + blockUsers('thread'); // 屏蔽用户(黑名单) + if (menu_value('menu_onlineStatus')) onlineStatus(); // 显示是否在线 } else if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1) { // 各板块帖子列表 curSite = DBSite.forum; - if (menu_value('menu_delate255')) { // 自动隐藏阅读权限 255 的帖子 - delate255(); - setTimeout(delate255, 2000); // 为了避免有时候网页加载太慢时没有隐藏成功的问题 - } - blockUsers('forum'); // 屏蔽用户(黑名单) - blockKeywords(); // 屏蔽关键词(帖子标题) + if (menu_value('menu_collapsedNowPost')) collapsedNowPost(); // 收起当前帖子预览(左键左右两侧空白处) + if (menu_value('menu_delate255')) delate255(); // 自动隐藏阅读权限 255 的帖子 + blockUsers('forum'); // 屏蔽用户(黑名单) + blockKeywords(); // 屏蔽关键词(帖子标题) if (patt_forum.test(location.pathname)) blockDOMNodeInserted(); // 监听插入事件(针对的是:有新的回复主题,点击查看) - }else if (patt_guide.test(location.search)) { // 导读帖子列表 + }else if (patt_guide.test(location.search)) { // 导读帖子列表 curSite = DBSite.guide; - } else if(location.pathname === '/search.php') { // 搜索结果列表 + } else if(location.pathname === '/search.php') { // 搜索结果列表 curSite = DBSite.search; - blockUsers('search'); // 屏蔽用户(黑名单) + blockUsers('search'); // 屏蔽用户(黑名单) } else if(location.pathname === '/home.php' && location.search.indexOf('mod=space&do=notice&view=mypost') > -1) { // 消息(帖子/点评/提到) - blockUsers('notice'); // 屏蔽用户(黑名单) + blockUsers('notice'); // 屏蔽用户(黑名单) } else if(location.pathname === '/home.php' && location.search === '?mod=space&do=pm') { // 消息(私人聊天) - blockUsers('pm'); // 屏蔽用户(黑名单) + blockUsers('pm'); // 屏蔽用户(黑名单) } curSite.pageUrl = ""; // 下一页URL @@ -168,6 +169,18 @@ if(menu_value('menu_autoSignIn'))autoSignIn(); // 自动签到(访问空间 10 次 = 20 积分) + // 显示在线状态 + function onlineStatus() { + document.querySelectorAll('[id^="favatar"]').forEach(function(item){ // 遍历所有帖子 + let icon = (item.querySelector('[id^="userinfo"] > .i.y em').innerText === '当前在线') ? '🌝' : '🌚'; + let divStatus = document.createElement('div'); + divStatus.style = 'position: absolute;margin: -8px 0 0 8px;padding: 0 1px 1.2px;background-color: #ffffff;border-radius: 50%;'; + divStatus.innerText = icon; + let mochu = item.querySelector('.avatar'); + mochu.parentNode.insertBefore(divStatus,mochu); + }) + } + // 自动签到(访问空间 10 次 = 20 积分) function autoSignIn() { if (!loginStatus) return @@ -372,10 +385,23 @@ } + // 收起当前帖子预览(左键左右两侧空白处) + function collapsedNowPost() { + //if (!menu_value('menu_collapsedNowAnswer')) return + document.body.onclick = function(event){ + if (event.target==this) { + document.querySelectorAll('[id^="threadPreviewTR_"] .showhide').forEach(function (el) { + el.click() + }); + } + } + } + + // 自动隐藏阅读权限 255 的帖子 function delate255() { if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1){ - let tbody = document.querySelectorAll('tbody[id^="normalthread_"] .common .xw1'); + let tbody = document.querySelectorAll('tbody[id^="normalthread_"] .xw1'); Array.from(tbody).forEach(function (_this) { if (_this.innerText === '255') { _this.parentNode.parentNode.parentNode.remove(); From 93d79f329a65c56761bbda937246ddcb6d3ad912 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 26 May 2021 19:43:52 +0800 Subject: [PATCH 0035/2159] =?UTF-8?q?=E6=96=B0=E5=A2=9E=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;=20=E6=96=B0=E5=A2=9E=20[=E6=98=BE=E7=A4=BA=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=9C=A8=E7=BA=BF]=20=E5=8A=9F=E8=83=BD;=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20[=E5=B1=8F=E8=94=BD=E9=98=85=E8=AF=BB=E6=9D=83?= =?UTF-8?q?=E9=99=90=20255=20=E5=B8=96=E5=AD=90]=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 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Hostloc-Enhanced.user.js b/Hostloc-Enhanced.user.js index 8c3d183df..301919c7e 100644 --- a/Hostloc-Enhanced.user.js +++ b/Hostloc-Enhanced.user.js @@ -169,18 +169,6 @@ if(menu_value('menu_autoSignIn'))autoSignIn(); // 自动签到(访问空间 10 次 = 20 积分) - // 显示在线状态 - function onlineStatus() { - document.querySelectorAll('[id^="favatar"]').forEach(function(item){ // 遍历所有帖子 - let icon = (item.querySelector('[id^="userinfo"] > .i.y em').innerText === '当前在线') ? '🌝' : '🌚'; - let divStatus = document.createElement('div'); - divStatus.style = 'position: absolute;margin: -8px 0 0 8px;padding: 0 1px 1.2px;background-color: #ffffff;border-radius: 50%;'; - divStatus.innerText = icon; - let mochu = item.querySelector('.avatar'); - mochu.parentNode.insertBefore(divStatus,mochu); - }) - } - // 自动签到(访问空间 10 次 = 20 积分) function autoSignIn() { if (!loginStatus) return @@ -374,7 +362,7 @@ } - // 回到顶部(右键左右两侧空白处) + // 快捷回到顶部(右键左右两侧空白处) function backToTop() { document.body.oncontextmenu = function(event){ if (event.target==this) { @@ -385,9 +373,8 @@ } - // 收起当前帖子预览(左键左右两侧空白处) + // 收起帖子预览(左键左右两侧空白处) function collapsedNowPost() { - //if (!menu_value('menu_collapsedNowAnswer')) return document.body.onclick = function(event){ if (event.target==this) { document.querySelectorAll('[id^="threadPreviewTR_"] .showhide').forEach(function (el) { @@ -398,6 +385,19 @@ } + // 显示在线状态 + function onlineStatus() { + document.querySelectorAll('[id^="favatar"]').forEach(function(item){ // 遍历所有帖子 + let icon = (item.querySelector('[id^="userinfo"] > .i.y em').innerText === '当前在线') ? '🌝' : '🌚'; + let divStatus = document.createElement('div'); + divStatus.style = 'position: absolute;margin: -8px 0 0 8px;padding: 0 1px 1.2px;background-color: #ffffff;border-radius: 50%;'; + divStatus.innerText = icon; + let mochu = item.querySelector('.avatar'); + mochu.parentNode.insertBefore(divStatus,mochu); + }) + } + + // 自动隐藏阅读权限 255 的帖子 function delate255() { if (patt_forum.test(location.pathname) || location.search.indexOf('mod=forumdisplay') > -1){ 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 0036/2159] =?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 0037/2159] =?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 0038/2159] 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 0039/2159] =?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 0040/2159] =?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 0041/2159] =?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 0042/2159] =?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 0043/2159] =?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 0044/2159] =?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 0045/2159] =?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 0046/2159] =?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 0047/2159] =?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 0048/2159] =?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 0049/2159] =?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 0050/2159] =?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 0051/2159] =?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 0052/2159] =?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 0053/2159] =?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 0054/2159] =?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 0055/2159] =?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 0056/2159] =?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 0057/2159] =?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 0058/2159] =?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 0059/2159] =?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 0060/2159] =?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 0061/2159] =?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 0062/2159] =?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 0063/2159] =?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 0064/2159] =?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 0065/2159] =?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 0066/2159] =?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 0067/2159] =?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 0068/2159] =?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 0069/2159] =?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 0070/2159] =?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 0071/2159] =?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 0072/2159] =?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 0073/2159] =?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 0074/2159] =?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 0075/2159] =?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 0076/2159] =?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 0077/2159] =?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 0078/2159] =?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 0079/2159] =?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 0080/2159] =?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 0081/2159] =?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 0082/2159] =?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 0083/2159] =?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 0084/2159] =?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 0085/2159] 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 0086/2159] =?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 0087/2159] =?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 0088/2159] =?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 0089/2159] 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 0090/2159] 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 0091/2159] =?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 0092/2159] =?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 0093/2159] =?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 0094/2159] =?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