countdown wait

video countdown wait|play click

  1. // ==UserScript==
  2. // @name countdown wait
  3. // @namespace manobastardo
  4. // @include *vodlocker.com*
  5. // @include *gorillavid*
  6. // @include http://bestreams.net*
  7. // @include *thevideo*
  8. // @include *streamin*
  9. // @include *vidbull*
  10. // @include *daclips*
  11. // @version 1.1
  12. // @grant none
  13. // @description video countdown wait|play click
  14. // ==/UserScript==
  15.  
  16. current_url = window.location.href;
  17.  
  18. function elements() {
  19. var values = {
  20. "button": "",
  21. "player": "",
  22. "wanted": "",
  23. "current": ""
  24. };
  25.  
  26. if (current_url.indexOf("gorillavid") > -1) {
  27. values.button = $('#btn_download');
  28. values.wanted = "continue";
  29. values.current = values.button.attr("value");
  30. } else if (current_url.indexOf("daclips") > -1) {
  31. values.button = $('#btn_download');
  32. values.wanted = "continue";
  33. values.current = values.button.attr("value");
  34. } else if (current_url.indexOf("bestreams") > -1) {
  35. values.button = $('#btn_download');
  36. values.wanted = "hidden";
  37. values.current = $("#countdown_str").css("visibility");
  38. } else if (current_url.indexOf("vodlocker") > -1) {
  39. values.button = $('#btn_download');
  40. values.wanted = "hidden";
  41. values.current = $("#countdown_str").css("visibility");
  42. } else if (current_url.indexOf("thevideo") > -1) {
  43. values.button = $('#btn_download');
  44. values.wanted = "proceed";
  45. values.current = values.button.text();
  46. } else if (current_url.indexOf("streamin") > -1) {
  47. values.button = $('#btn_download');
  48. values.wanted = "hidden";
  49. values.current = $("#countdown_str").css("visibility");
  50. } else if (current_url.indexOf("vidbull") > -1) {
  51. values.button = $('#btn_download');
  52. values.wanted = "block";
  53. values.current = $('#download_linkb').css("display");
  54. }
  55.  
  56. return values
  57. }
  58.  
  59. function wait_button() {
  60. console.log("wait_button");
  61. var e = elements();
  62. if (e.current.toLowerCase().indexOf(e.wanted) > -1) {
  63. e.button[0].click();
  64. } else {
  65. setTimeout(wait_button, 333);
  66. }
  67. }
  68.  
  69. console.log("wait");
  70. window.onload = wait_button;