Sleazy Fork is available in English.

红杏视频破解会员

针对红杏视频的优化脚本,此脚本可以让用户观看全站视频,免费无任何注入

  1. // ==UserScript==
  2. // @name 红杏视频破解会员
  3. // @namespace https://tampermonkey.net.cn/
  4. // @version 4.1.2
  5. // @license MIT
  6. // @match https://*.aidou.pro/*
  7. // @match https://*.aidou.art/*
  8. // @match https://*.aidoo.pw/*
  9. // @match https://*.aidoo.info/*
  10. // @match https://*.aido2.cc/*
  11. // @require https://cdn.jsdelivr.net/npm/hls.js@1.5.17/dist/hls.min.js
  12. // @require https://cdn.jsdelivr.net/npm/dplayer@1.27.1/dist/DPlayer.min.js
  13. // @require https://cdn.jsdelivr.net/npm/crypto-js@4.2.0/index.min.js
  14. // @include /^https?://.*\.aido([0-9]|[a-z])?\.(top|art|pro|cc|icu|pw|info|net|club|xyz|vip|me)/.*$/
  15. // @icon https://www6.aidou.pro/static/img/logo.png
  16. // @grant none
  17. // @description 针对红杏视频的优化脚本,此脚本可以让用户观看全站视频,免费无任何注入
  18. // ==/UserScript==
  19.  
  20. (function() {
  21. 'use strict';
  22. let url = window.location.href;
  23. window.onload = function(){
  24. var line = localStorage.getItem("line") || "1";
  25. var cookie = {
  26. 'set': function(name, value, days) {
  27. var key = name.match(/\w+\.m3u8/)[0];
  28. window.localStorage ? localStorage.setItem(key, value) : null;
  29. },
  30. 'get': function(name) {
  31. var key = name.match(/\w+\.m3u8/)[0];
  32. var value = window.localStorage ? localStorage.getItem(key) : 0;
  33. return parseFloat(value);
  34. }
  35. };
  36. var isIOS = function() {
  37. if ((/(iPhone|iPad|iPod|iOS|macintosh)/i.test(navigator.userAgent))) {
  38. return true;
  39. }
  40. return false;
  41. };
  42. var initVideo = function(vod, picUrl) {
  43. var vodUrl = vod.vodPlayUrl + "?ios=1&line=" + line;
  44. $('<video src="' + vodUrl + '" poster="' + picUrl + '" width="100%" height="100%" playsinline="true" autoplay controls autobuffer type="application/vnd.apple.mpegurl"></video>').appendTo($("#video"));
  45. var $video = $("video");
  46. };
  47. var initDPlayer = function(vod, picUrl) {
  48. var vodUrl = vod.vodPlayUrl + "?line=" + line;
  49. var jump = "";
  50. var logo = '';
  51. var dp = new DPlayer({
  52. container: document.getElementById('formatVideo'),
  53. theme: '#4C8FE8',
  54. volume: 0.8,
  55. logo: logo,
  56. autoplay: false,
  57. preload: 'auto',
  58. video: {
  59. url: vodUrl,
  60. pic: picUrl,
  61. type: 'auto',
  62. defaultQuality: 0
  63. }
  64. });
  65. dp.on("fullscreen", function() {
  66. dp.notice("全屏已开启");
  67. });
  68. dp.on("fullscreen_cancel", function() {
  69. dp.notice("全屏已关闭");
  70. });
  71. dp.on('loadeddata', function() {
  72. cookie.get(vodUrl) ? dp.seek(cookie.get(vodUrl)) : dp.notice("视频已就绪");
  73. dp.on('timeupdate', function() {
  74. if (cookie)
  75. cookie.set(vodUrl, dp.video.currentTime, 30);
  76. });
  77. Boot.addPlay({
  78. "vodId": vod.vodId
  79. });
  80. });
  81. dp.on('loadstart', function(e) {});
  82. dp.on('ended', function() {
  83. dp.notice("视频播放已结束");
  84. if (jump != '') {
  85. top.location.href = jump;
  86. }
  87. });
  88. };
  89. $(function() {
  90. Boot.getVod({
  91. "id": window.location.href.split('/', -1).pop().split('.', -1)[0],
  92. "line": line
  93. }, function(vod) {
  94. Boot.getCover(vod.vodPic, function(picUrl) {
  95. if (isIOS(vod, picUrl)) {
  96. initVideo(vod, picUrl);
  97. } else {
  98. initDPlayer(vod, picUrl);
  99. }
  100. });
  101. });
  102. });
  103. }
  104. })();