Greasy Fork

来自缓存

Greasy Fork is available in English.

Crunchyroll Skip Intro/Outro Multilingual

Skip intro and credits buttons on Crunchyroll iframe in 20+ languages

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

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

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

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

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

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

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

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

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

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

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

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

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

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

作者
Yanis Sansnom
日安装量
0
总安装量
26
评分
0 0 0
版本
0.4
创建于
2025-04-10
更新于
2025-12-02
大小
3.0 KB
许可证
MIT
适用于

Crunchyroll Skip Intro Userscript - Detailed Description

Overview

This is a Tampermonkey userscript designed to automatically skip intro sequences when watching anime on Crunchyroll. The script eliminates the need for manual interaction when the "Skip Intro" button appears during show openings.

Functionality

The script works by periodically checking the Crunchyroll video player for the presence of the skip intro button. When detected, it automatically triggers a click on this button, allowing for seamless viewing without manual intervention.

Technical Details

Script Header

Implementation

The code consists of:

  1. An immediately invoked function expression (IIFE) with strict mode enabled for better error handling and performance
  2. A function skipIntroOnMainSite() that:
    • Uses document.querySelector() to find the Skip Intro button by its data test ID attribute
    • Simulates a click on the button if it exists
  3. A setInterval() that calls this function every 5 seconds (5000ms)

Design Choices

  • Polling Approach: The script uses a simple interval-based polling mechanism rather than event listeners. This ensures compatibility across different versions of the Crunchyroll player, as it doesn't rely on specific event implementations.

  • 5-Second Interval: This timing is chosen as a balance between responsiveness (detecting the skip button quickly) and performance (not checking too frequently to cause unnecessary CPU usage).

  • Element Selection: The script identifies the skip button using Crunchyroll's own test ID (data-testid="skipIntroText"), which makes it resilient to cosmetic UI changes as long as this identifier remains consistent.

  • Simple Structure: The straightforward implementation makes the script easy to understand and modify if Crunchyroll changes their player interface in the future.

This script provides a convenient quality-of-life improvement for Crunchyroll users who prefer to skip intro sequences automatically while binge-watching anime series.