Greasy Fork is available in English.

TDPLAYER ACFUN H5 Player

替换HTML5播放器

Version vom 29.06.2017. Aktuellste Version

// ==UserScript==
// @name  TDPLAYER ACFUN H5 Player
// @namespace    http://tampermonkey.net/
// @description  替换HTML5播放器
// @author       疯狂减肥带
// @match        http://www.acfun.cn/*
// @match        http://www.acfun.tv/*
// @match        http://www.aixifan.com/*
// @match        http://acfun.cn/*
// @match        http://acfun.tv/*
// @match        http://aixifan.com/*
// @grant        none
// @version 0.0.1.20170629141944
// ==/UserScript==
(function() {
    var thisurl = window.location.href;
    var tmp = thisurl.split("/");
	thisac = tmp[tmp.length - 1];
	var script = document.createElement("script");
	script.setAttribute("type", "text/javascript");
	script.setAttribute("charset", "UTF-8");
	script.setAttribute('src', 'https://app.haotown.cn/td/tdplayer.min.js?v=2.8.2');
	document.head.appendChild(script);
	script.onload = function() {
	            if (thisac.indexOf("ac") == 0) {
	               	var info=document.querySelector('#pageInfo');
	                if (info) {
	                	if (info.getAttribute("data-from")=='zhuzhan') {
	                		console.log('ac源视频');
	                		tdvidplay(document.querySelector('#player'),info.getAttribute("data-vid"),info.getAttribute("data-pic"))
	                	}else if(info.getAttribute("data-from")=='youku'){
	                		tdyoukuplay(document.querySelector('#player'),document.querySelector('#pageInfo').getAttribute("data-aid"))
	                	}
	                }
	            } else if(thisac.indexOf('ab')==0){
	            	var e=document.querySelector('.primary');
	            	if (e.getAttribute("data-from")=='ac') {
	            		document.querySelector('.ui-draggable').innerHTML=null;
	            		tdvidplay(document.querySelector('.ui-draggable'),e.getAttribute("data-vid"))
	            	}else{
	            		console.log("不支持。 /(ㄒoㄒ)/~~");
	            	}
	            }
	    }
})();