Greasy Fork

Watch Series Skipper

Skips WatchSeries.lt ad page

目前为 2015-04-16 提交的版本。查看 最新版本

// ==UserScript==
// @name       Watch Series Skipper
// @version    0.1.6
// @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 have added support.
// @match      http://watch-tv-series.to/open/cale/*
// @match      http://watch-series-tv.to/open/cale/*
// @run-at        document-end
// ==/UserScript==
//alert(document.getElementById("countdown_str").innerHTML);
var hn = window.location.hostname; 
var button;
var b;
var newLoc;
if(hn==="watch-tv-series.to || hn==="watch-series-tv.to"") {
    button = document.getElementsByClassName('push_button blue')[0];
    if(button) {
	newLoc = button.href; 
        redirect(newLoc);
    }
    
}
else if(hn==="watchseries.lt") {
    button = document.getElementsByClassName('myButton')[0];
    if(button) {
	newLoc = button.href; 
        redirect(newLoc);
    }
}
else {
    button = document.getElementById("popup2-middle");
    b = button.innerHTML;
    newLoc = b.substring(b.indexOf("http://"),b.indexOf("\">Cl"));
    redirect(newLoc);
}

function redirect(nLoc) {
    document.title = 'Redirecting...';
    window.location.replace(nLoc);
}