Watch Series Skipper

Skips WatchSeries.lt ad page

当前为 2014-12-19 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name       Watch Series Skipper
// @version    0.1.5
// @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/*
// @match      http://watchseries.vc/open/cale/*
// @match      http://watchtvseries.ch/open/cale/*
// @match      http://watchtvseries.vc/open/cale/*
// @match      http://watchtvseries.se/open/cale/*
// UK Mirrors:
// @match      http://watchseriesuk.lt/open/cale/*
// @match      http://watchseriesuk.ag/open/cale/*
// I believe that this clone is not directly affiliated with the main site, but upon request, I will add support.
// @match      http://watch-tv-series.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==="watch-tv-series.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);
}