Greasy Fork

Greasy Fork is available in English.

Simulcast Calendar Dub Remover - crunchyroll.com

Removes dubs from simulcast calendar to reduce clutter. Also adds "Last Week" button when it is missing.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Simulcast Calendar Dub Remover - crunchyroll.com
// @namespace   Violentmonkey Scripts
// @match       https://www.crunchyroll.com/simulcastcalendar
// @grant       none
// @version     1.2
// @author      farhil
// @description Removes dubs from simulcast calendar to reduce clutter. Also adds "Last Week" button when it is missing.
// @license MIT
// ==/UserScript==
$(document).ready(function () {
  $('.releases li').each(function() {
      var $this = $(this);
      var text = $('.season-name', $this).text();
      if (text.includes('Dub)')) {
          $this.remove();
      }
  })

  if ($('.pagination-arrow').length === 0)   {
      var lastWeekButton = '<a class="pagination-arrow pagination-last js-pagination-last" href="/simulcastcalendar?date=' + getFormattedDate(-7) + '"><svg viewBox="0 0 48 48"><title>Last Week</title><use xlink:href="/i/svg/simulcastcalendar/calendar_icons.svg#cr_prev"></use></svg></a>'

      $('.viewport .content').prepend(lastWeekButton);
  }
});

// Gets current date with an offset formatted as 'yyyy-mm-dd'
function getFormattedDate(offset) {
  var result = new Date();
  result.setDate(result.getDate() + offset);
  return result.toISOString().split('T')[0];
}