Darling in the iqiyi

爱奇艺国家队 720p 观看脚本

  1. // ==UserScript==
  2. // @name Darling in the iqiyi
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.6
  5. // @description 爱奇艺国家队 720p 观看脚本
  6. // @author REK
  7. // @include http://www.iqiyi.com/*
  8. // @include https://www.iqiyi.com/*
  9. // @include http://so.iqiyi.com/*
  10. // @include https://so.iqiyi.com/*
  11. // @grant GM_xmlhttpRequest
  12. // ==/UserScript==
  13.  
  14. function start() {
  15. var str1 = 'http://so.iqiyi.com/so/q_darling';
  16. var str2 = 'https://so.iqiyi.com/so/q_darling';
  17. var flag1 = window.location.href.toLowerCase().indexOf(str1);
  18. var flag2 = window.location.href.toLowerCase().indexOf(str2);
  19. if (flag1 > -1 || flag2 > -1) {
  20. fetchAnimeList();
  21. }
  22. }
  23. function fetchAnimeList() {
  24. var xhr = new XMLHttpRequest();
  25. xhr.onreadystatechange = function() {
  26. if (xhr.readyState == XMLHttpRequest.DONE) {
  27. if (xhr.status === 200) {
  28. removeVideoCannotAutoplayTips(xhr.responseText);
  29. } else {
  30. alert('获取列表失败');
  31. }
  32. }
  33. };
  34. xhr.open('GET', 'https://so.tw.iqiyi.com/so/q_DARLING%20in%20the%20FRANXX', true);
  35. xhr.send(null);
  36. }
  37.  
  38. function removeVideoCannotAutoplayTips(sourceCode) {
  39. var baseHtml = document.createElement( 'html' );
  40. baseHtml.innerHTML = sourceCode;
  41. fetchArrs = baseHtml.getElementsByClassName('album_link');
  42. var len = (fetchArrs.length - 1)/2;
  43. var animeArr = new Array(len);
  44. for (var i=0; i<len; i++) {
  45. animeArr[i] = fetchArrs[i];
  46. }
  47. createButtonWithAnimeArr(animeArr);
  48. }
  49.  
  50. function createButtonWithAnimeArr(animeArr) {
  51. for (var i=0; i<animeArr.length;i++) {
  52. var btn = document.createElement("BUTTON");
  53. if (i%2 == 0) {
  54. btn.style.backgroundColor = '#1BA8DE';
  55. } else {
  56. btn.style.backgroundColor = '#FC4129';
  57. }
  58. btn.style.color = '#FFFFFF';
  59. btn.style.height = '50px';
  60. btn.style.width = '150px';
  61. btn.style.position = 'absolute';
  62. var left = (window.screen.width/2 + (i%5 - animeArr.length/2) *200 - 150) + 'px';
  63. btn.style.left = left;
  64. var top = window.screen.height/2 - 50 + Math.floor(i/5) *60 + 'px';
  65. btn.style.top = top;
  66. var name = '第'+ (i+1) +'集';
  67. var t = document.createTextNode(name);
  68. btn.appendChild(t);
  69. let url = animeArr[i].href;
  70. btn.addEventListener ("click", function() {
  71. darlingUrl = 'http://api.baiyug.cn/vip/index.php?url=' + url;
  72. window.location.href = darlingUrl;
  73. });
  74. document.body.appendChild(btn);
  75. }
  76. }
  77.  
  78. start();

QingJ © 2025

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