Better Studyflix

Clicks away login window and stops autoplay.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Better Studyflix
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Clicks away login window and stops autoplay.
// @author       Doriano Dipierro
// @license      MIT
// @match        https://studyflix.de/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=studyflix.de
// @grant        none
// ==/UserScript==
(function() {
    'use strict';
    const interval = 1000;
    let attempts = 10;
    const intervalId = setInterval(() => {
        const button = document.querySelector('[up-dismiss]');
        if (button) {
            button.click();
            clearInterval(intervalId);
        }
    }, interval);
    const intervalId2 = setInterval(() => {
        const button = document.querySelector('[class="vjs-play-control vjs-control vjs-button vjs-playing"]');
        if (button) {
            button.click();
            clearInterval(intervalId2);
        }
    }, interval);
})();