9anime Bingewatcher+

Auto-fullscreen, skip intros, jump to next episode 9anime on Vidstream and MyCloud videos

Stan na 25-09-2021. Zobacz najnowsza wersja.

  1. // ==UserScript==
  2. // @name 9anime Bingewatcher+
  3. // @namespace https://greasyfork.org/en/users/10118-drhouse
  4. // @version 2.8
  5. // @description Auto-fullscreen, skip intros, jump to next episode 9anime on Vidstream and MyCloud videos
  6. // @include https://www*.9anime.*/*
  7. // @include https://9anime.*/*
  8. // @include https://*.9anime.*/*
  9. // @match *.9anime.to/watch/*
  10. // @include https://vidstream.pro/*
  11. // @include https://vidstreamz.online/*
  12. // @include https://mcloud.to/*
  13. // @include https://mcloud2.to/*
  14. // @include https://storage.googleapis.com/*
  15. // @include https://movies7.to/*
  16. // @include https://*.mp4upload.com:*/*
  17. // @include https://*.mp4upload.com*/*
  18. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  19. // @require https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js
  20. // @require https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.js
  21. // @grant GM_getValue
  22. // @grant GM_setValue
  23. // @grant GM_registerMenuCommand
  24. // @grant GM_notification
  25. // @author drhouse
  26. // @icon https://s2.bunnycdn.ru/assets/9anime/favicons/favicon.png?v1
  27. // ==/UserScript==
  28. (function($){
  29. function openFullscreen(elem) {
  30. if (elem.requestFullscreen) {
  31. elem.requestFullscreen();
  32. } else if (elem.mozRequestFullScreen) { /* Firefox */
  33. elem.mozRequestFullScreen();
  34. } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */
  35. elem.webkitRequestFullscreen();
  36. } else if (elem.msRequestFullscreen) { /* IE / Edge */
  37. elem.msRequestFullscreen();
  38. }
  39. }
  40. function waitForElementToDisplay(selector, time) {
  41. if(document.querySelector(selector)!=null) {
  42. setTimeout(function(){
  43. var elem = $('video').parent().parent().parent().get(0);
  44. openFullscreen(elem);
  45. $(elem).focus();
  46. }, 1000);
  47. var newYearCountdown = setInterval(function(){
  48. var player = $('video').get(0);
  49. var duration = player.duration;
  50. var current = player.currentTime;
  51. //console.log('duration='+duration)
  52. //console.log('current='+current)
  53. var link = document.querySelector("body");
  54. link.addEventListener("keydown", function(event) {
  55. var x = event.key;
  56. var z = event.keyCode;
  57. if (x == '0') { // 0 key skip 90s
  58. player.currentTime = current + 90;
  59. }
  60. if (x == '6') { // 0 key skip end
  61. player.currentTime = player.duration;
  62. }
  63. if (x == 'v') { // V key skip 90s
  64. player.currentTime = current + 90;
  65. }
  66. if (x == 'n') { // V key skip end
  67. player.currentTime = player.duration;
  68. }
  69. })
  70. }, 1000);
  71. }
  72. else {
  73. setTimeout(function() {
  74. waitForElementToDisplay(selector, time);
  75. }, time);
  76. }
  77. }
  78. waitForElementToDisplay('#player', 1000);
  79. })(jQuery);