新增 扩展菜单选项,可以方便的开关/切换功能。

This commit is contained in:
xiu2
2020-10-22 22:36:14 +08:00
parent df0fa699fd
commit 8f3127f08a
4 changed files with 98 additions and 12 deletions
+24 -3
View File
@@ -1,19 +1,40 @@
// ==UserScript==
// @name 3DM论坛增强
// @version 1.0.2
// @version 1.0.3
// @author X.I.U
// @description 自动回复、自动无缝翻页、清理置顶帖子
// @match *://bbs.3dmgame.com/*
// @icon https://bbs.3dmgame.com/favicon.ico
// @grant GM_xmlhttpRequest
// @grant GM_registerMenuCommand
// @grant GM_openInTab
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_notification
// @license GPL-3.0 License
// @run-at document-end
// @namespace https://greasyfork.org/scripts/412890
// ==/UserScript==
(function() {
// 是否开启帖子内自动翻页功能,true 为开启,false 为关闭。
var thread_pageLoading = false;
// 开关帖子内自动翻页功能,true 为开启,false 为关闭,默认关闭
var thread_pageLoading = GM_getValue('xiu2_thread_pageLoading');
if (thread_pageLoading == null){
thread_pageLoading = false;
GM_setValue('xiu2_thread_pageLoading', false);
}
// 注册脚本菜单
GM_registerMenuCommand('开关 [帖子内自动翻页] 功能', function () {
if (thread_pageLoading){
thread_pageLoading = false;
GM_notification(`已关闭 [帖子内自动翻页] 功能\n(刷新网页后生效)`);
}else{
thread_pageLoading = true;
GM_notification(`已开启 [帖子内自动翻页] 功能\n(刷新网页后生效)`);
}
GM_setValue('xiu2_thread_pageLoading', thread_pageLoading);
});
GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});});
// 随机回复帖子的内容
var replyList = [
+24 -3
View File
@@ -1,19 +1,40 @@
// ==UserScript==
// @name 吾爱破解论坛增强 - 自动签到、翻页
// @version 1.0.7
// @version 1.0.8
// @author X.I.U
// @description 自动签到、自动无缝翻页
// @match *://www.52pojie.cn/*
// @icon https://www.52pojie.cn/favicon.ico
// @grant GM_xmlhttpRequest
// @grant GM_registerMenuCommand
// @grant GM_openInTab
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_notification
// @license GPL-3.0 License
// @run-at document-end
// @namespace https://greasyfork.org/scripts/412680
// ==/UserScript==
(function() {
// 是否开启帖子内自动翻页功能,true 为开启,false 为关闭。
var thread_pageLoading = true;
// 开关帖子内自动翻页功能,true 为开启,false 为关闭,默认开启
var thread_pageLoading = GM_getValue('xiu2_thread_pageLoading');
if (thread_pageLoading == null){
thread_pageLoading = true;
GM_setValue('xiu2_thread_pageLoading', true);
}
// 注册脚本菜单
GM_registerMenuCommand('开关 [帖子内自动翻页] 功能', function () {
if (thread_pageLoading){
thread_pageLoading = false;
GM_notification(`已关闭 [帖子内自动翻页] 功能\n(刷新网页后生效)`);
}else{
thread_pageLoading = true;
GM_notification(`已开启 [帖子内自动翻页] 功能\n(刷新网页后生效)`);
}
GM_setValue('xiu2_thread_pageLoading', thread_pageLoading);
});
GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});});
// 默认 ID 为 0
var curSite = {SiteTypeID: 0};
+24 -3
View File
@@ -1,19 +1,40 @@
// ==UserScript==
// @name 全球主机交流论坛增强
// @version 1.0.0
// @version 1.0.1
// @author X.I.U
// @description 自动无缝翻页
// @match *://www.hostloc.com/*
// @icon https://www.hostloc.com/favicon.ico
// @grant GM_xmlhttpRequest
// @grant GM_registerMenuCommand
// @grant GM_openInTab
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_notification
// @license GPL-3.0 License
// @run-at document-end
// @namespace https://greasyfork.org/scripts/414005
// ==/UserScript==
(function() {
// 是否开启帖子内自动翻页功能,true 为开启,false 为关闭。
var thread_pageLoading = true;
// 开关帖子内自动翻页功能,true 为开启,false 为关闭,默认开启
var thread_pageLoading = GM_getValue('xiu2_thread_pageLoading');
if (thread_pageLoading == null){
thread_pageLoading = true;
GM_setValue('xiu2_thread_pageLoading', true);
}
// 注册脚本菜单
GM_registerMenuCommand('开关 [帖子内自动翻页] 功能', function () {
if (thread_pageLoading){
thread_pageLoading = false;
GM_notification(`已关闭 [帖子内自动翻页] 功能\n(刷新网页后生效)`);
}else{
thread_pageLoading = true;
GM_notification(`已开启 [帖子内自动翻页] 功能\n(刷新网页后生效)`);
}
GM_setValue('xiu2_thread_pageLoading', thread_pageLoading);
});
GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});});
// 默认 ID 为 0
var curSite = {SiteTypeID: 0};
+26 -3
View File
@@ -1,11 +1,16 @@
// ==UserScript==
// @name 智友邦论坛增强
// @version 1.0.7
// @version 1.0.8
// @author X.I.U
// @description 自动签到、自动回复、自动无缝翻页、清理置顶帖子、清理帖子标题〖XXX〗【XXX】文字
// @icon http://bbs.zhiyoo.net/favicon.ico
// @match *://bbs.zhiyoo.net/*
// @grant GM_xmlhttpRequest
// @grant GM_registerMenuCommand
// @grant GM_openInTab
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_notification
// @license GPL-3.0 License
// @run-at document-end
// @namespace https://greasyfork.org/scripts/412362
@@ -15,8 +20,25 @@
// 签到后跳转的URL
var qiandao_Redirect_URL = `http://bbs.zhiyoo.net/forum.php?mod=forumdisplay&fid=42&filter=author&orderby=dateline`;
// 是否开启「清理帖子列表中帖子标题开头的〖XXX〗【XXX】文字」功能,标题中的 APP 名称完全对齐,看起来更舒服!true 为开启,false 为关闭,默认开启。
var cleanText = true;
// 开关「清理帖子列表中帖子标题开头的〖XXX〗【XXX】文字」功能,标题中的 APP 名称完全对齐,看起来更舒服!true 为开启,false 为关闭,默认开启。
var cleanText = GM_getValue('xiu2_cleanText');
if (cleanText == null){
cleanText = true;
GM_setValue('xiu2_cleanText', true);
}
// 注册脚本菜单
GM_registerMenuCommand('开关 [清理帖子标题开头〖〗【】文字] 功能', function () {
if (cleanText){
cleanText = false;
GM_notification(`已关闭 [清理帖子标题开头〖〗【】文字] 功能(刷新网页后生效)`);
}else{
cleanText = true;
GM_notification(`已开启 [清理帖子标题开头〖〗【】文字] 功能(刷新网页后生效)`);
}
GM_setValue('xiu2_cleanText', cleanText);
});
GM_registerMenuCommand('反馈 & 建议', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});});
// 帖子数量,避免重复清理帖子列表中帖子标题开头的〖XXX〗【XXX】文字,用于提高效率
var postNum = 0;
@@ -140,6 +162,7 @@
if (document.getElementsByClassName("showhide").length > 0){
setTimeout(`window.scrollTo(0,99999999)`, 1000);
//setTimeout(`location.hash='#footer'`, 1000);
console.log(`${$(".showhide").scrollTop()}`);
}
}
}