動畫瘋自動點擊彈幕設定

在進入網頁時自動點擊彈幕設定按鈕

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         動畫瘋自動點擊彈幕設定
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  在進入網頁時自動點擊彈幕設定按鈕
// @match        https://ani.gamer.com.tw/animeVideo.php*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // 檢查 localStorage 中是否已經記錄過是否點擊過彈幕設定按鈕
    if (!localStorage.getItem('danmuSettingClicked')) {
        // 檢查是否有彈幕設定按鈕
        const danmuSettingButton = document.querySelector('#setting-danmu a');
        if (danmuSettingButton) {
            // 點擊彈幕設定按鈕
            danmuSettingButton.click();
            // 將點擊記錄存入 localStorage
            localStorage.setItem('danmuSettingClicked', true);
        }
    }
})();