// ==UserScript== // @name Yinyuetai // @author hyk // @namespace bengda@outlook.com // @description 免积分,免登录,既可观看、下载高清MV // @version 1.1.7 // @create 2016-03-28 // @lastmodified 2016-06-03 // @lastmodified 2016-12-23 // @include http://v.yinyuetai.com/video/* // @copyright 2016+, hyk // @grant unsafeWindow // @grant GM_addStyle // @grant GM_xmlhttpRequest // @icon http://www.yinyuetai.com/favicon.ico // @updatelog [2016-11-13] 解决音悅台页面改变后脚本失效。重写了代码。以前代码好糟糕,现在的代码照样还是很糟糕 -_-|| // /*不再支持悅单列表(没有意义)*/ // @updatelog [2016-06-03] 将鼠标悬浮视频预览改为鼠标点击显示,并可快速聚焦到正在播放的项 // @downloadURL none // ==/UserScript== //======= 禁止商业用途 ===========// //======= 禁止商业用途 ===========// //======= 禁止商业用途 ===========// //======== start =================// var Yyt=function(){ this.version='1.1.6'; this.author='hyk'; var resResult=new RegExp(/http:\/\/v\.yinyuetai\.com\/video\/(\d+).*|http:\/\/v\.yinyuetai\.com\/video\/h5\/(\d+).*/,'g').exec(window.location.href); this.Vid=resResult[1]||resResult[2]; /* api from 跳过网站等待、验证码及登录[author:Jixun.Moe] * https://greasyfork.org/zh-CN/scripts/2600-%E8%B7%B3%E8%BF%87%E7%BD%91%E7%AB%99%E7%AD%89%E5%BE%85-%E9%AA%8C%E8%AF%81%E7%A0%81%E5%8F%8A%E7%99%BB%E5%BD%95 */ this.api='http://www.yinyuetai.com/insite/get-video-info?json=true&videoId='+this.Vid; //this.api='http://ext.yinyuetai.com/main/get-h-mv-info?json=true&videoId='+this.Vid;// + Vid this.wrapper='#Yyt_user_script_'+Date.now(); Yyt.initView.apply(this,arguments); // Yyt.initEvent.apply(this,arguments); Yyt.style.apply(this,arguments); } Yyt.initView=function(){ var $this=this; GM_xmlhttpRequest({ url:$this.api , method: "get", onload: function (y){ var r = JSON.parse(y.responseText); var aVideoUrlModels = r.videoInfo.coreVideoInfo.videoUrlModels; // var aVideoQuality = [{quality:'hc',text:'流畅'}, {quality:'hd',text:'高清'},{quality:'he',text:'超清'},{quality:'sh',text:'会员'}]; var YytELe=document.createElement('div'); YytELe.setAttribute('id',$this.wrapper.split('#')[1]); var videoUrlEle=aVideoUrlModels.map(function(item,i){ return ''+item.qualityLevelName+''; }); YytELe.innerHTML='\