您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
屏蔽常规优惠帖、老站简版网页跳转正常版本、
当前为
// ==UserScript== // @name 数码之家多功能脚本 // @namespace http://tampermonkey.net/ // @version 0.2 // @description 屏蔽常规优惠帖、老站简版网页跳转正常版本、 // @author You // @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js // @match https://www.mydigit.cn/forum.php?mod=* // @match http://bbs.mydigit.cn/simple/?t*.html // @match https://www.mydigit.cn/plugin.php?id=k_misign:sign // ==/UserScript== // 脚本开始 console.log('脚本启动'); /////////////////// // 屏蔽常规优惠帖 // /////////////////// if (location.href.match(/^https:\/\/www\.mydigit\.cn\/forum\.php\?mod=.*/)) { // 设置标题限制长度 var tLL = 30; // 设置广告机器人名 var arr = ['主推暴款', 'dsdfg', 'czgou.cn', 'cjlzq', '帮你省', 'suzuki_alto', '买买弟', 'huigu__', 'kgdssa', 'long2012i', '小葵花', '第7天', '乐淘', '杨贵生', '好货分享']; var temp = new Set(arr); //-------------------------------------------------------------------------------- // if (location.href.match(/^https:\/\/www\.mydigit\.cn\/forum\.php\?mod=forumdisplay&fid=((37)|(2))?(&page=\d+)?$/)) { // 遍历ID为waterfall的子代li迭代 $('#waterfall > li').each(function() { // 获取当前节点子级h3的子级a的html var titl = $('h3 > a', this).html(); var author = $('cite + a', this).html(); // 判断 若 temp 中含有 auther 则 移除当前节点,另若 标题长度大于 tll 则 删除当前节点 (temp.has(author) || titl.length > tLL) && $(this).remove(); }); } // 去广告代码段 $('#diyfastposttop').remove(); // 新帖删除长标题广告帖 if (location.href.match(/^https:\/\/www\.mydigit\.cn\/forum\.php\?mod=guide&view=(newthread)|(hot)|(new)(&page=\d+)?$/) || location.href.match(/^https:\/\/www\.mydigit\.cn\/forum\.php\?mod=guide$/)) { console.log('新帖'); $('#forumnew + table > tbody').each(function() { var newTitle = $('a.xst', this).html(); // 判断 若 标题长度大于 tLL 则 移除当前节点 newTitle.length > tLL && $(this).remove(); }); } } ////////////////////////// // 简版网页跳转常规版老站 // ////////////////////////// if (location.href.match(/^http:\/\/bbs\.mydigit\.cn\/simple\/\?t\d+\.html$/)) { console.log('匹配简版网页'); let url = location.href; url = url.replace(/simple\/\?t(\d+)\.html$/, 'read.php?tid=$1'); location.href = url; } /////////////////// // 签到页自动签到 // 好像没用 /////////////////// if (location.href.match(/^https:\/\/www\.mydigit\.cn\/plugin\.php\?id=k_misign:sign$/)) { console.log('签到页'); $('JD_sign').click(); console.log('完成点击'); }