Watch Series Skipper

Skips WatchSeries.lt ad page

  1. // ==UserScript==
  2. // @name Watch Series Skipper
  3. // @version 0.1.15
  4. // @description Skips WatchSeries.lt ad page
  5. // @namespace https://greasyfork.org/users/2329-killerbadger
  6. // @match http://watchseries.lt/open/cale/*
  7. // @match http://watchseries.sx/open/cale/*
  8. // @match http://watchseries.ag/open/cale/*
  9. // @match http://spainseries.lt/open/cale/*
  10. // @match http://watchseries.vc/open/cale/*
  11. // @match http://watchtvseries.ch/open/cale/*
  12. // @match http://watchtvseries.vc/open/cale/*
  13. // @match http://watchtvseries.se/open/cale/*
  14. // @match http://mywatchseries.to/cale.html*
  15. // UK Mirrors:
  16. // @match http://watchseriesuk.lt/open/cale/*
  17. // @match http://watchseriesuk.ag/open/cale/*
  18. // I believe that this clone is not directly affiliated with the main site, but upon request, I have added support.
  19. // @match http://watch-tv-series.to/open/cale/*
  20. // @match http://watch-series-tv.to/open/cale/*
  21. // @run-at document-end
  22. // ==/UserScript==
  23. //alert(document.getElementById("countdown_str").innerHTML);
  24. var hn = window.location.hostname;
  25. var button;
  26. var newLoc;
  27. if(hn==='watch-tv-series.to' || hn==='watch-series-tv.to') {
  28. button = document.getElementsByClassName('push_button blue')[0];
  29. if(button) {
  30. getLink();
  31. //if(newLoc===undefined) {setInterval(getLink(), 100);}
  32. redirect(newLoc);
  33. }
  34. }
  35. else if(hn==='watchseries.lt') {
  36. button = document.getElementsByClassName('myButton')[0];
  37. if(button) {
  38. getLink();
  39. //if(newLoc===undefined) {setInterval(getLink(), 100);}
  40. redirect(newLoc);
  41. }
  42. }
  43. else if(hn==='mywatchseries.to') {
  44. button = document.getElementsByClassName('push_button blue')[0];
  45. redirect(button);
  46. }
  47. else {
  48. button = document.getElementsByClassName('actions grid-1 grid-lg-8-24')[0];
  49. b = button.innerHTML;
  50. newLoc = b.substring(b.indexOf("http"),b.indexOf('" class="action-btn txt'));
  51. var styleIndex = newLoc.indexOf('style=');
  52. if(styleIndex != -1) { // probably not even necessary anymore
  53. newLoc = newLoc.substring(0,styleIndex-2);
  54. }
  55. redirect(newLoc);
  56. }
  57.  
  58. function redirect(nLoc) {
  59. document.title = 'Redirecting...';
  60. window.location.replace(nLoc);
  61. }
  62.  
  63. function getLink() {
  64. if(newLoc===undefined) {newLoc = button.href;}
  65. if(newLoc===undefined) {newLoc = button.getAttribute("link");}
  66. if(newLoc===undefined) {newLoc = button;}
  67. }