Swyter Tweaks for Played.to

Gets rid of all the hurdles and directly plays the video in an immersive player.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name          Swyter Tweaks for Played.to
// @description   Gets rid of all the hurdles and directly plays the video in an immersive player.
// @match         http://played.to/*
// @grant         none
// @version       2013.11.28
// @author        Swyter
// @namespace https://greasyfork.org/users/4813
// ==/UserScript==

if ( btn_download = document.querySelector("#btn_download") )
{
    // Click the accept button if exists
    console.log("-> Skipping the countdown.")
    
    btn_download.disabled=false;
    btn_download.click();
}
else
{
    // Remove all the timeouts, which launch banners and all sorts of ugly monsters (http://stackoverflow.com/a/8345837/674685)
    var highestTimeoutId = setTimeout(";");
    for (var i = 0 ; i < highestTimeoutId ; i++) {
        clearTimeout(i); 
    }


    // Just remove the annoyances, enable the built-in lightbox and enjoy the view
    var ads = document.querySelectorAll(
        "div[style*='block !important;'], #overlayPPU, #OnPlayerBanner, #OnPlayerClose, center>div+script[type='text/javascript']"
    );
    
    Array.prototype.forEach.call(ads,function(node) {
        node.parentNode.removeChild(node);
    });
    
    document.getElementById("lightsOff").click();
}