Greasy Fork

来自缓存

Greasy Fork is available in English.

Soap2Day Autoplay

Soap2Day - Autoplay shows and movies in fullscreen mode when page loads.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name           Soap2Day Autoplay
// @version        0.1
// @description    Soap2Day - Autoplay shows and movies in fullscreen mode when page loads.
// @author         mohitdhule
// @include        https://soap2day.to/*
// @include        https://soap2day.im/*
// @include        https://soap2day.ac/*
// @include        https://soap2day.se/*
// @include        https://s2dfree.to/*
// @include        https://s2dfree.cc/*
// @include        https://s2dfree.de/*
// @include        https://s2dfree.is/*
// @include        https://s2dfree.in/*
// @include        https://s2dfree.nl/*
// @include        https://secretlink.xyz/*
// @run-at         document-idle
// @namespace http://greasyfork.icu/users/776541
// ==/UserScript==

(function() {
    'use strict';
    function rafAsync() {
        return new Promise(resolve => requestAnimationFrame(resolve));
    }
    async function checkElement(selector) {
        let querySelector = null;
        while (querySelector === null) {
            await rafAsync();
            querySelector = document.querySelector(selector);
        }
        return querySelector;
    }
    checkElement('video').then(element => {
        const newScript = document.createElement("script");
        const inlineScript = document.createTextNode("jwplayer().play();jwplayer().setFullscreen(true);");
        newScript.appendChild(inlineScript);
        const target = document.body;
        target.appendChild(newScript);
    });
})();