您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
免积分,免登录,既可观看、下载高清MV
当前为
// ==UserScript== // @name Yinyuetai // @author hyk // @namespace [email protected] // @description 免积分,免登录,既可观看、下载高清MV // @version 1.1.8 // @create 2016-03-28 // @lastmodified 2016-06-03 // @lastmodified 2016-12-23 // @lastmodified 2017-01-05 // @include http://v.yinyuetai.com/video/* // @copyright 2016+, hyk // @grant unsafeWindow // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant GM_getValue // @grant GM_setValue // @grant GM_registerMenuCommand // @run-at document-start // @icon http://www.yinyuetai.com/favicon.ico // @updatelog [2017-01-05] 自动跳转到官方h5播放页面 // @updatelog [2016-11-13] 解决音悅台页面改变后脚本失效。重写了代码。以前代码好糟糕,现在的代码照样还是很糟糕 -_-|| // /*不再支持悅单列表(没有意义)*/ // @updatelog [2016-06-03] 将鼠标悬浮视频预览改为鼠标点击显示,并可快速聚焦到正在播放的项 // ==/UserScript== //======= 禁止商业用途 ===========// //======= 禁止商业用途 ===========// //======= 禁止商业用途 ===========// //======== start =================// var Yyt=function(){ this.version='1.1.8'; 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] * http://greasyfork.icu/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(); this.enableH5Play=(GM_getValue('enableH5Play')==undefined?true:GM_getValue('enableH5Play'));//默认重定向至官方h5播放页面; if(this.enableH5Play) this.redirectToH5(); setTimeout(function(){this.initView()}.bind(this),1e3); this.style(); this.enableH5PlaySet(); } Yyt.prototype.redirectToH5=function(){ //启用官方htm5播放 var url=location.href; if(/^http:\/\/v\.yinyuetai.com\/video\/\d+/.test(url)){ url=url.replace(/(^http:\/\/v.yinyuetai.com\/video\/)(\d+\S*$)/,"$1h5\/$2"); location.href=url; } } Yyt.prototype.enableH5PlayHandler=function(){ var f=this.enableH5Play; this.enableH5Play=!f; GM_setValue('enableH5Play',this.enableH5Play); location.reload(); } Yyt.prototype.enableH5PlaySet=function(){ var f=this.enableH5Play; var str=['启用音悦台h5播放','禁用音悦台h5播放']; GM_registerMenuCommand(str[Number(f)],this.enableH5PlayHandler.bind(this)); } Yyt.prototype.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 YytELe=document.createElement('div'); var videoUrlEle=aVideoUrlModels.map(function(item,i){return '<a href="'+item.videoUrl+'" class="vUrl vUrl_'+item.qualityLevel+'">'+item.qualityLevelName+'</a>';}); YytELe.setAttribute('id',$this.wrapper.split('#')[1]); YytELe.innerHTML='<span class="aside"></span>\<div class="Yyt_user_script_wrapper">'+videoUrlEle.join('')+'</div>' document.body.appendChild(YytELe); } }); } Yyt.prototype.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(); //==============================================================================// // // // // // == == === === === === // // == == == == == == // // == ==== == == == == == == // // == ==== == == == === // // == == == == === // // == == == == ==== // // // //==============================================================================//