您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
屏蔽未看过话播出时间以前的讨论
当前为
// ==UserScript== // @name Bangumi Anti-Netabare // @namespace BAN // @include /https?:\/\/(bgm|bangumi|chii)\.(tv|in)\/ep\/.+/ // @version 0.3 // @grant none // @description 屏蔽未看过话播出时间以前的讨论 // ==/UserScript== //---- Actions on ep. page -------------------------------- //Get the first on air date. getOnAirDate = function() { return (new Date($('.epDesc .tip').html().match(/首播:(\d{4}\-\d{1,2}\-\d{1,2})/).slice(1)[0])).valueOf() / 1000; } getFloorDate = function($el) { var match = $el.html().match(/(\d{4})\-(\d{1,2})\-(\d{1,2}) (\d{1,2}):(\d{1,2})/); if(typeof match == "undefined") return new Date(0); match = match.slice(1); //The month start from 0 return (new Date(match[0], match[1] - 1, match[2], match[3], match[4])).valueOf() / 1000; } //Check whether the date in .re_info is out of the date first on air. checkDate = function(floorDate, filterDate) { return (floorDate > filterDate); } getSubjectUrl = function() { return $('#subject_inner_info a').attr('href'); } //---- Actions on subject page ---------------------------- getFirstUnwachedEpDate = function(page) { var $ep = page.match(/load-epinfo (epBtnAir|epBtnNA)" title=".*?" rel="#prginfo_(\d+)/).slice(2)[0]; //496541" class="ep_status">抛弃</a></div><span class="tip">中文标题:你多么耀眼<br />首播:2015-04-19 var $date = page.match((new RegExp($ep + '" class="ep_status.+?首播:(\\d{4}\\-\\d{1,2}\\-\\d{1,2})'))).slice(1)[0]; return (new Date($date)).valueOf() / 1000; } //---- Here we go~ ---------------------------------------- $(function() { //var epOnAirDate = getOnAirDate(); var subjectPage = getSubjectUrl(); $.get(subjectPage, function(subjectPageContent) { var filterDate = getFirstUnwachedEpDate(subjectPageContent); $('.re_info').each(function() { if(checkDate(getFloorDate($(this)), filterDate)) { //Hide this floor $(this).parent().children('.inner').children('.reply_content').css({opacity: 0}); $(this).parent().css({background: "#DDDFFF"}); $(this).parent().addClass('banFloor'); } }); $('.banFloor').click(function() { $(this).children('.inner').children('.reply_content').animate({ opacity: 1 }, 500); }) }); });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址