(9anime) AniWave Bingewatcher+

Auto-fullscreen, skip intros, jump to next episode, 9anime on Vidstream and MyCloud videos (Auto-1080p in configuration panel)

  1. // ==UserScript==
  2. // @name (9anime) AniWave Bingewatcher+
  3. // @namespace https://gf.qytechs.cn/en/users/10118-drhouse
  4. // @version 6.3
  5. // @description Auto-fullscreen, skip intros, jump to next episode, 9anime on Vidstream and MyCloud videos (Auto-1080p in configuration panel)
  6. // @match https://aniwave.to/*
  7. // @include https://www*.9anime.*/*
  8. // @include https://netmovies.to/*
  9. // @include https://guccihide.com/*
  10. // @include https://rabbitstream.net/*
  11. // @include https://sbface.com/*
  12. // @include https://filemoon.sx/*
  13. // @include https://9anime.*/*
  14. // @include https://*.9anime.*/*
  15. // @include https://9anime.id/*
  16. // @include https://vidstream.pro/*
  17. // @include https://vidstreamz.online/*
  18. // @include https://vizcloud.online/*
  19. // @include https://vizcloud2.online/*
  20. // @include https://vizcloud.*/*
  21. // @include https://vizcloud.store/*
  22. // @include https://blob:vizcloud.store/*
  23. // @include https://mcloud.to/*
  24. // @include https://mcloud2.to/*
  25. // @include https://storage.googleapis.com/*
  26. // @include https://movies7.to/*
  27. // @include https://*.mp4upload.com:*/*
  28. // @include https://*.mp4upload.com*/*
  29. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  30. // @require https://gf.qytechs.cn/scripts/439099-monkeyconfig-modern-reloaded/code/MonkeyConfig%20Modern%20Reloaded.js?version=1012538
  31. // @require https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js
  32. // @require https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.js
  33. // @require https://gf.qytechs.cn/scripts/451088-utils-library/code/Utils%20-%20Library.js?version=1097324
  34. // @grant GM_getValue
  35. // @grant GM_setValue
  36. // @grant GM_deleteValue
  37. // @grant GM_addStyle
  38. // @grant GM_registerMenuCommand
  39. // @grant GM_notification
  40. // @grant window.onurlchange
  41. // @author drhouse
  42. // @license CC-BY-NC-SA-4.0
  43. // @icon https://www.google.com/s2/favicons?domain=9anime.to
  44. // ==/UserScript==
  45. /* global jQuery, $ */
  46. this.$ = this.jQuery = jQuery.noConflict(true);
  47.  
  48. $(window).on('load', function() {
  49.  
  50. var vPoint_launch = setTimeout(function(){
  51. var vPoint_work = window.location.href;
  52. if ( vPoint_work.indexOf('9anime') > -1 && cfg.get('Automatic Crowdsource Skip Opt-in'))
  53. {
  54. GM_setValue('toplocation', vPoint_work)
  55. vPoint_check()
  56. clearInterval(vPoint_launch)
  57. }
  58. }, 1000);
  59.  
  60. var cfg = new MonkeyConfig({
  61. title: 'Configure',
  62. menuCommand: true,
  63. params: {
  64. 'Automatic Highest Quality': {
  65. type: 'checkbox',
  66. default: true
  67. },
  68. Skip_Anime_Intro_Key: {
  69. type: 'text',
  70. default: 'v'
  71. },
  72. 'Skip Anime Intro Time': {
  73. type: 'number',
  74. default: '89'
  75. },
  76. Next_Episode_Key: {
  77. type: 'text',
  78. default: 'n'
  79. },
  80. Skip_Company_ID_Key: {
  81. type: 'text',
  82. default: 'q'
  83. },
  84. 'Skip Company ID Time': {
  85. type: 'number',
  86. default: '10'
  87. },
  88. 'Automatic Skip Company ID': {
  89. type: 'checkbox',
  90. default: false
  91. },
  92. 'Automatic Crowdsource Skip Opt-in': {
  93. type: 'checkbox',
  94. default: true
  95. },
  96. },
  97. // onSave: setOptions
  98. })
  99.  
  100.  
  101. function myTimer2() {
  102. var video = $("#player").get(0);
  103. const player = $('#player')[0];
  104. $('body').click()
  105. player.requestFullscreen();
  106. $(player).focus();
  107. if (document.fullscreen === true)
  108. clearInterval(myInterval2);
  109. }
  110.  
  111. if (cfg.get('Automatic Highest Quality') && !window.location.href.includes("movies7")) {
  112. try {
  113. var myInterval2 = setInterval(myTimer2, 1000);
  114. } catch (error) {
  115. if (error instanceof TypeError) {
  116. // Do nothing
  117. } else {
  118. throw error;
  119. }
  120. }
  121. }
  122.  
  123. function openFullscreen(elem) {
  124. if (elem.requestFullscreen) {
  125. elem.requestFullscreen();
  126. } else if (elem.mozRequestFullScreen) { /* Firefox */
  127. elem.mozRequestFullScreen();
  128. } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */
  129. elem.webkitRequestFullscreen();
  130. } else if (elem.msRequestFullscreen) { /* IE / Edge */
  131. elem.msRequestFullscreen();
  132. }
  133. }
  134.  
  135. function vPoint_check(){
  136. $.get("https://unity.alwaysdata.net/vpoint.php?toplocation=" + GM_getValue('toplocation'), function(data){
  137.  
  138. if(data !== 'nada'){
  139. GM_setValue('vPoint_exists', Number(data));
  140. }
  141. else {
  142. GM_setValue('vPoint_exists', 'nada');
  143. }
  144.  
  145. });
  146. }
  147.  
  148. function checkURLchange(){
  149. if(window.location.href != oldURL){
  150. GM_setValue('title', document.title)
  151. GM_setValue('toplocation', window.location.href)
  152. oldURL = window.location.href;
  153. }
  154. }
  155.  
  156. var oldURL = window.location.href;
  157. if (cfg.get('Automatic Crowdsource Skip Opt-in'))
  158. setInterval(checkURLchange, 1000);
  159.  
  160. var canOnlyFireOnce2 = once(function(current) {
  161. central(current)
  162. });
  163.  
  164. function central(current){
  165. var episode = window.location.href
  166. var vPoint = current
  167. var title = GM_getValue('title')
  168. var toplocation = GM_getValue('toplocation')
  169.  
  170. const xhttp = new XMLHttpRequest();
  171. xhttp.open("GET", "https://unity.alwaysdata.net/central.php?vPoint=" + vPoint + "&toplocation=" + toplocation);
  172. xhttp.send();
  173. }
  174.  
  175. function once(fn, context) {
  176. var result;
  177. return function() {
  178. if(fn) {
  179. result = fn.apply(context || this, arguments);
  180. fn = null;
  181. }
  182. return result;
  183. };
  184. }
  185.  
  186. var canOnlyFireOnce = once(function(player, current) {
  187. player.currentTime = Number(cfg.get('Skip Company ID Time'))
  188. });
  189.  
  190. function waitForElementToDisplay(selector, time) {
  191. if($(selector)!=null) {
  192. setTimeout(function(){
  193. var video = $("#player").get(0);
  194. // var rfs = video.requestFullscreen || video.webkitRequestFullScreen || video.mozRequestFullScreen || video.msRequestFullscreen;
  195. // rfs.call(video);
  196.  
  197. const player = $('#player')[0];
  198. // var video = $("#player").get(0);
  199.  
  200. // If the player element exists and supports fullscreen mode
  201. if (player && player.requestFullscreen && !window.location.href.includes("movies7")) {
  202. // Activate fullscreen mode on page load
  203. // $('body').click()
  204. player.requestFullscreen();
  205. $(player).focus();
  206.  
  207. // player = $("#vidcloud-player > div.jw-wrapper.jw-reset > div.jw-media.jw-reset > video").get(0)
  208. player.requestFullscreen();
  209. $(player).focus();
  210. }
  211. }, 1000);
  212.  
  213.  
  214. var newYearCountdown = setInterval(function(){
  215.  
  216. var player = $('video').get(0);
  217.  
  218. var duration = player.duration;
  219. var current = player.currentTime;
  220.  
  221. if(cfg.get('Automatic Skip Company ID')){
  222. if(player.currentTime < 1){
  223. canOnlyFireOnce(player, current);
  224. }
  225. }
  226.  
  227. if (GM_getValue('vPoint_exists') !== 'nada' && cfg.get('Automatic Crowdsource Skip Opt-in')){
  228. if (Math.round(player.currentTime) === GM_getValue('vPoint_exists')){
  229. player.currentTime = GM_getValue('vPoint_exists') + Number(cfg.get('Skip Anime Intro Time'))
  230. GM_setValue('vPoint_exists','nada')
  231. }
  232. }
  233.  
  234.  
  235. $('body').keypress(function(event){
  236. var key = (event.keyCode ? event.keyCode : event.which);
  237. var x = String.fromCharCode(key)
  238. // player = $("#vidcloud-player > div.jw-wrapper.jw-reset > div.jw-media.jw-reset > video").get(0)
  239. if (x == cfg.get('Skip_Company_ID_Key')) { // Q key skip 10s
  240. player.currentTime = current + Number(cfg.get('Skip Company ID Time'));
  241. }
  242. if (x == cfg.get('Skip_Anime_Intro_Key')) { // V key skip 89s
  243. if ('Automatic Crowdsource Skip Opt-in')
  244. canOnlyFireOnce2(player.currentTime);
  245. player.currentTime = current + Number(cfg.get('Skip Anime Intro Time'));
  246. }
  247. if (x == cfg.get('Next_Episode_Key')) { // N key skip end
  248. player.currentTime = player.duration;
  249. }
  250.  
  251. })
  252. }, 1000);
  253. }
  254. else {
  255. setTimeout(function() {
  256. waitForElementToDisplay(selector, time);
  257. }, time);
  258. }
  259. }
  260.  
  261. waitForElementToDisplay('#player', 1000);
  262.  
  263.  
  264.  
  265.  
  266. const runOnURLChange = () => {
  267. window.addEventListener('urlchange', (info) => {
  268.  
  269. utils.waitForElement('#player').then(function() {
  270.  
  271. if (cfg.get('Automatic Highest Quality')) {
  272. const myInterval = setInterval(myTimer, 1000);
  273.  
  274. function myTimer() {
  275. var $highest_check = $('#jw-player-settings-menu > div:nth-child(3) > div > button:nth-child(2)').attr('aria-checked')
  276. var $auto_check = $('#jw-player-settings-menu > div:nth-child(3) > div > button:nth-child(1)').text()
  277. //$('div.jw-icon:nth-child(14)')[0].click()
  278.  
  279. if ($auto_check === 'Auto'){
  280. if ($highest_check === "true"){
  281. // $('div.jw-icon:nth-child(14)')[0].click()
  282. clearInterval(myInterval);
  283. } else {
  284. $("div[aria-label='Settings']")[0].click()
  285. $('#jw-player-settings-menu > div:nth-child(3) > div > button:nth-child(2)')[0].click()
  286. }
  287. } else {
  288. //$('div.jw-icon:nth-child(14)')[0].click()
  289. clearInterval(myInterval);
  290. }
  291. }
  292. }
  293.  
  294.  
  295. setTimeout(function(){
  296. var video = $("#player").get(0);
  297. const player = $('#player')[0];
  298. $('body').click()
  299.  
  300. if (player && player.requestFullscreen && !window.location.href.includes("movies7")) {
  301. player.requestFullscreen();
  302. $(player).focus();
  303. }
  304. }, 1000);
  305.  
  306. })
  307.  
  308.  
  309. })
  310. }
  311.  
  312. })

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址