// ==UserScript== // @name 视频VIP替换 // @namespace http://tampermonkey.net/ // @version 1.2 // @description 直接在视频页查看会员视频 // @author You // @match *.iqiyi.com/v* // @grant none // @run-at document-start // @require https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js // @downloadURL none // ==/UserScript== (function() { 'use strict'; var vip_parse_url = "https://danmu.sonimei.cn/player/?url=&url="; // 替换播放器 function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } } function gen_iqiyi_player(current_url) { console.log('ready to replace'); // 生成替换源 var request_url = ''; console.log(request_url); return request_url; }; function get_vip() { var current_url = window.location.href; var request_url = gen_iqiyi_player(current_url); if (current_url.indexOf("www.iqiyi.com") != -1) { $('#iframaWrapper').empty().html(request_url); $("#contentArea").remove(); $("#block-AR").remove(); } } setTimeout(function(){ get_vip(); }, 1000); })();