Watch Series Skipper

Skips WatchSeries.lt ad page

目前為 2014-10-14 提交的版本,檢視 最新版本

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name       Watch Series Skipper
// @version    0.1.3
// @description  Skips WatchSeries.lt ad page
// @namespace  https://greasyfork.org/users/2329-killerbadger
// @match      http://watchseries.lt/open/cale/*
// @match      http://watchseries.sx/open/cale/*
// @match      http://watchseries.ag/open/cale/*
// @match      http://spainseries.lt/open/cale/*
// I believe that these clones are not directly affiliated with the main site, but upon request, I will add support for them.
// @match      http://watchtvseries.ch/open/cale/*
// @match      http://watchtvseries.to/open/cale/*
// @run-at        document-start
// ==/UserScript==
//alert(document.getElementById("countdown_str").innerHTML);
var hn = window.location.hostname; 
var button;
var b;
var newLoc;
if(hn==="watchtvseries.to") {
    // With script run at document-start, the button would not be definded before the script ran. 
    // Since running at document-start made all other pages faster, I added the setInterval.
    setInterval(function(){ 
        button = document.getElementsByClassName('push_button blue')[0];
        if(button) {
	    newLoc = button.href; 
            window.location.assign(newLoc);
        }
    }, 1000);
    
}
else {
    button = document.getElementById("popup2-middle");
    b = button.innerHTML;
    newLoc = b.substring(b.indexOf("http://"),b.indexOf("\">Cl"));
    window.location.assign(newLoc);
}