新浪视频mpeg解析

解决新浪,优酷,爱奇艺mpeg格式解析问题

  1. // ==UserScript==
  2. // @name 新浪视频mpeg解析
  3. // @namespace https://moive.sina.com.cn
  4. // @version 0.2.1
  5. // @description 解决新浪,优酷,爱奇艺mpeg格式解析问题
  6. // @author 新浪
  7. // @require https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js
  8. // @match *://v.youku.com/*
  9. // @match *://v.qq.com/*
  10. // @match *://*.iqiyi.com/v*
  11. // @grant GM_addStyle
  12. // ==/UserScript==
  13. (function () {
  14. 'use strict';
  15. const $ = window.jQuery
  16. const host = location.host
  17. const href = location.href
  18. const originList = [
  19. { name: '线路 1', url: 'https://jx.sigujx.com/?url=' },
  20. { name: '线路 2', url: 'https://jx.ivito.cn/?url=' },
  21. { name: '线路 3', url: 'http://jiexi.380k.com/?url=' }
  22. ]
  23. const playerList = [
  24. { domain: "v.youku.com", node: "#player" },
  25. { domain: "v.qq.com", node: "#mod_player" },
  26. { domain: "www.iqiyi.com", node: "#flashbox" }
  27. ]
  28. let node = ''
  29. for (let i = 0, len = playerList.length; i < len; i++) {
  30. const item = playerList[i]
  31. if (item.domain === host) {
  32. node = item.node
  33. break
  34. }
  35. }
  36. let html = ''
  37. html += '<div class="sjw">'
  38. html += '<ul class="sjw__list js-sjw-list">'
  39. originList.forEach((item, index) => {
  40. html += `<li data-index='${index}'>${item.name}</li>`
  41. })
  42. html += '</ul>'
  43. html += '<div class="sjw__btn js-sjw-btn">VIP</div>'
  44. html += '</div>'
  45. GM_addStyle(`
  46. .sjw { position: fixed; top: 100px; left: 0; z-index: 999999999999; font-size: 12px; font-family: inherit; display: flex; align-items: flex-start; }
  47. .sjw * { margin: 0; padding: 0; list-style: none; }
  48. .sjw__btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px 8px 8px; color: #5B3301; background: linear-gradient(to right, #FCE5AA, #E1B271); border-radius: 0 10em 10em 0; cursor: pointer; margin: 8px 0 0 0; }
  49. .sjw__list { background: #fff; padding: 4px 0; min-width: 80px; display: none; border-radius: 0 6px 6px 0; }
  50. .sjw__list--show { display: block; }
  51. .sjw__list li { padding: 8px 12px; white-space: nowrap; transition: all .3s; cursor: pointer; }
  52. .sjw__list li:hover,
  53. .sjw__list li.sjw__list--active { background: rgba(0, 0, 0, .1); }
  54. `)
  55. $(function () {
  56. $('body').append(html)
  57. $('.js-sjw-btn').on('click', function () {
  58. $('.js-sjw-list').toggleClass('sjw__list--show')
  59. })
  60. $(document).on('click', function (e) {
  61. if (!$('.js-sjw-btn').is(e.target) && $('.js-sjw-btn').has(e.target).length === 0) {
  62. $('.js-sjw-list').removeClass('sjw__list--show')
  63. }
  64. })
  65. $('.js-sjw-list li').on('click', function () {
  66. const index = $(this).data('index')
  67. const origin = originList[index].url
  68. $(node).html(`<iframe frameborder="0" allowfullscreen="allowfullscreen" allowtransparency="true" width="100%" height="100%" scrolling="no" src="${origin}${href}"></iframe>`)
  69. $(this).addClass('sjw__list--active').siblings().removeClass('sjw__list--active')
  70. })
  71. })
  72. })();

QingJ © 2025

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