Yinyuetai

免积分,免登录,既可观看、下载高清MV

当前为 2016-11-13 提交的版本,查看 最新版本

// ==UserScript==
// @name           Yinyuetai
// @author         hyk
// @namespace      [email protected]
// @description    免积分,免登录,既可观看、下载高清MV
// @version        1.1.6
// @create         2016-03-28
// @lastmodified   2016-06-03
// @lastmodified   2016-11-13

// @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] 将鼠标悬浮视频预览改为鼠标点击显示,并可快速聚焦到正在播放的项
// ==/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];
  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 '<a href="'+item.videoUrl+'" class="vUrl vUrl_'+item.qualityLevel+'">'+item.qualityLevelName+'</a>';
              });
                YytELe.innerHTML='<span class="aside"></span>\
                                  <div class="Yyt_user_script_wrapper">'
                                  +videoUrlEle.join('')+
                                  '</div>'
                document.body.appendChild(YytELe);
          }
      });
}
Yyt.style=function(){
    var css=  this.wrapper+'{position:absolute;left:0;top:624px;font-size: 14px;transition: width 0.5s;width: 8px;height: 22px;background-color: #333;z-index: 99999;}\
              '+this.wrapper+' .aside{display: inline-block;height: 100%;width: 8px;background-color: #27d5bf;}\
              '+this.wrapper+':hover{width: 260px;}\
              '+this.wrapper+':hover .aside{display: none;}\
              '+this.wrapper+' .Yyt_user_script_wrapper{display: none;}\
              '+this.wrapper+':hover .Yyt_user_script_wrapper{width: 100%;overflow: hidden;display: flex;justify-content: center;align-items: center;height: 22px;}\
              '+this.wrapper+' .Yyt_user_script_wrapper .vUrl{font-size: 1em;text-align: center;text-decoration: none;color: #fff;line-height: 22px;border-right: 1px solid #444;flex: 1;}\
              '+this.wrapper+' .Yyt_user_script_wrapper .vUrl:last-child{border-right: none;}\
              '+this.wrapper+' .Yyt_user_script_wrapper .vUrlvisited{color: #666;}\
              '+this.wrapper+' .Yyt_user_script_wrapper .vUrl:hover{text-decoration: underline;color: #27d5bf;}';

    GM_addStyle(css);
}
new Yyt();
//==============================================================================//
//                                                                              //
//                                                                              //
//          ==      ==         ===        ===          ===    ===               //
//          ==      ==           ==      ==             ==    ==                //
//          == ==== ==            == == ==              ==   ==                 //
//          == ==== ==               ==                 == ===                  //
//          ==      ==               ==                 ==   ===                //
//          ==      ==               ==                 ==     ====             //
//                                                                              //
//==============================================================================//
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

一年攒够 12 元

云驰互联

云驰互联