jav视频预览

在网页嵌入一个预览视频页面,无需翻墙

  1. // ==UserScript==
  2. // @name jav视频预览
  3. // @description 在网页嵌入一个预览视频页面,无需翻墙
  4. // @namespace http://tampermonkey.net/
  5. // @version 2.6
  6. // @author You
  7. // @include /^https?:\/\/(?:[A-Za-z0-9]+\.)*(?:javbus|busjav|busfan|fanbus|buscdn|cdnbus|dmmsee|seedmm|busdmm|dmmbus|javsee|seejav){1}/
  8. // @match https://www.javbus.com/*
  9. // @match https://*/thread-*
  10. // @match https://*/forum.php?mod=viewthread&tid=*
  11. // @exclude https://www.javbus.red/
  12. // @grant GM_addStyle
  13. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABFElEQVQ4ja2TMU4CQRSGvzfuKkQ2bqORRpKNV6CjIaGgovQK1LRs7R24AoECbrAHWE7glhQkJO4SEgt1GQsCBhmG1fjKee//8v/zZiSGJ+AZeOR3lQChxPDyB/EeIjFo28SuKSf6jk0sjoPXaHDh+6yjiDzLjmaUDaDKZe77fR4GAy5rNaNVK2DnQlwXEXOIs4Bz9f8AU85TG4CfW1AKv93mul7ndTjkfT4HETSgN5sCAK256XS47XZRlQrrKOIqCMjTlDxNjU7UoV6TTSZ8Lpfc9XoEoxFutUo6HvOxWBgdHL1EcRy8ZhOv1UKVSrzNZmTTKflqVQwA2wOBbX6trZeo2P6qQ+p3JqsYSBQQmiAFKgHCL3I+UIXeDJynAAAAAElFTkSuQmCC
  14. // ==/UserScript==
  15. (function () {
  16. 'use strict';
  17. var host = 'https://javspyl.eu.org/'
  18. //98堂
  19. if (document.title.indexOf('高清中文字幕') != -1) {
  20. if (document.querySelector("#switchwidth").innerHTML == '切换到宽版') {
  21. widthauto(this);
  22. }
  23. let id = document.title.split(' ')[0];
  24. if (escape(id).indexOf("%u3010") > 0) {
  25. id = document.title.split('【')[0];
  26. }
  27. if (!/[^a-zA-Z0-9-_]/.test(id)) {
  28. document.querySelector("#postlist > table:nth-child(1) > tbody > tr > td.plc.ptm.pbn.vwthd > span ").innerHTML = '<br><iframe src = ' + host + id.replace('-4K', "") + ' style="width:1140px;height:642px;border:none;" allowfullscreen></iframe>'
  29. }
  30. }
  31. //javbus
  32. if (document.querySelector("body > nav > div > div.navbar-header.mh50 > a > img.hidden-xs")) {
  33. GM_addStyle(`
  34. #waterfall > div > a > div.photo-frame{
  35. position: relative;
  36. cursor: default;
  37. }
  38. #yulan{
  39. width: 100%;
  40. height: 100%;
  41. position: absolute;
  42. top: 0;
  43. left: 0;
  44. right: 0;
  45. bottom: 0;
  46. margin: auto;
  47. background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAYhJREFUaEPt2cErRFEUBvDv+0MsbP0H8s+xpCxoUmShlCyUslA2ShksbJSyUBJKKQtlY6GnU+eUZMwdc++776t561fv+8158+695xDiF8XzYwKoXcGhFWiaZgbABoA5AH0APZK7tYPH81MAZwBmfwTeAbBE8qo2JAXQDAj5bgiHfNSCjAOIzJcAFknu1UDkAETuba/GdZuQnADL/eavlVXksw1IbkBkvvBq7JdGlAJE7i2H3JSClAZY7ldH2Bcr+9UGIELbImhrx0FORZuAyL3pkNsckBoAy/3iiOVxEbUAkfvEIYf/hdQGRO51h9yNCukKwHI/+5ZkZRRElwCR+9ircZQC6SIgcq95RR7+gnQZYLkfvRq9QYiuAyL3PMmF3xAqgCeSU8qAe5LTygDZV0j6Tyz7GZVdyKS3ErKbOdnttPSBRvZIKXuol26ryDa2ZFuL0s1d2fa67IBDZsR06hPK7wciqSGfjVlt9bRJ5TmAVakxa0pzqeY9Q7sSNcOlPHsCSPmVSt7zBVQT8DFIGYGwAAAAAElFTkSuQmCC') no-repeat center;
  48. display: none;
  49. cursor: pointer;
  50. background-color: #323232b3;
  51. }
  52. #javspyl_iframe{
  53. position: fixed;
  54. width: 100%;
  55. height: 100%;
  56. background-color: #000000ab;
  57. top: 0;
  58. z-index: 900;
  59. display: none;
  60. }
  61. #javspyl_iframe iframe{
  62. width: 70%;
  63. height: 80%;
  64. position: fixed;
  65. top: 0;
  66. bottom: 0;
  67. left: 0;
  68. right: 0;
  69. margin: auto;
  70. border:none;
  71. box-shadow: 0px 0px 7px 13px rgb(0 0 0 / 47%);
  72. }
  73. `);
  74. let fpb = () => {
  75. document.querySelector("#navbar > ul:nth-child(2)").innerHTML = document.querySelector("#navbar > ul:nth-child(2)").innerHTML + '<li class="hidden-sm"><a href=' + host + ' target="_blank"><font style="vertical-align: inherit;">防屏蔽地址</font></a></li>'
  76. }
  77. let id = window.location.href.split('/').pop()
  78. let hreflength = window.location.href.split('/').length
  79.  
  80. let play = (date) => {
  81. $('#javspyl_iframe').fadeIn(200)
  82. $('#javspyl_iframe iframe').attr('src', date)
  83. }
  84. let out = () => {
  85. $('#javspyl_iframe iframe').attr('src', 'about:blank')
  86. $('#javspyl_iframe').fadeOut(200)
  87. }
  88.  
  89. if (hreflength === 4 && id && id != 'uncensored' && id != 'en' && id != 'ko' && id != 'ja') {
  90. fpb()
  91. $('.screencap').append('<div id="yulan" style="display: block;background-color: #0000008c;width: 50px;height: 50px;"></div>');
  92. $('body').append('<div id="javspyl_iframe"><iframe allowfullscreen></iframe></div>');
  93.  
  94. $("#yulan").click((e) => {
  95. play(host + id)
  96. });
  97. $("#javspyl_iframe").click((e) => {
  98. out()
  99. });
  100. } else {
  101. fpb()
  102. $('.photo-frame').append('<div class="Out" id="yulan"></div>');
  103. $('body').append('<div id="javspyl_iframe"><iframe allowfullscreen></iframe></div>');
  104. $('#waterfall > div > a > div.photo-frame').mouseenter((e) => {
  105. e.currentTarget.lastElementChild.className = 'in'
  106. $('.in').fadeIn(200)
  107. })
  108. $('#waterfall > div > a > div.photo-frame').mouseleave((e) => {
  109. e.currentTarget.lastElementChild.className = 'Out'
  110. $('.Out').fadeOut(200)
  111. })
  112. $(".Out").click((e) => {
  113. e.preventDefault();
  114. id = e.currentTarget.parentElement.parentElement.href.split('/').pop()
  115. play(host + id)
  116. });
  117. $("#javspyl_iframe").click((e) => {
  118. out()
  119. });
  120. }
  121. }
  122. })();