Greasy Fork is available in English.

acfun直播弹幕

acfun直播弹幕。

Tính đến 2020-10-29 15:22:50 UTC. Xem phiên bản mới nhất.

// ==UserScript==
// @name     acfun直播弹幕
// @description acfun直播弹幕。
// @namespace syachiku
// @author       syachiku
// @match        https://live.acfun.cn/live/*
// @grant		GM_addStyle
// @version  1.1.0
// @grant    none
// ==/UserScript==


;(function(){

	const css = `
		/* base html */
		#header,#footer,
		.main>.list-container.outer-wrapper,
		.main>.list-container.outer-wrapper:before,
		.container-live>.left,
		.live-feed-watching,
		.container-live-feed-messages:before
		{display:none!important}
		#app>.main,
		.player-outer-wrapper,
		.player-outer-wrapper>.container-live,
		.player-outer-wrapper>.container-live>.container-live-feed.right,
		.player-outer-wrapper>.container-live>.container-live-feed.right>.live-feed,
		.player-outer-wrapper>.container-live>.container-live-feed.right>.live-feed>.container-live-feed-messages,
		.player-outer-wrapper>.container-live>.container-live-feed.right>.live-feed>.container-live-feed-messages>.live-feed-messages
		{
		display:block!important;
		position:fixed!important;
		width:100%!important;
		height:100%!important;
		margin:0!important;
		padding:0!important;
		border:0!important;
		top:0!important;
		bottom:0!important;
		word-break:break-all!important;
		}
		.player-outer-wrapper>.container-live>.container-live-feed.right>.live-feed>.container-live-feed-messages{background:#0c0!important;}
		.player-outer-wrapper>.container-live>.container-live-feed.right>.live-feed>.container-live-feed-messages>.live-feed-messages{height:calc(100% - 5px)!important}
		/* danmu */
		.live-feed-messages>div{
		height:auto!important;
		line-height:30px!important;
		font-size:120%!important;
		font-weight:900!important;
		margin-left:5px!important;
		font-family:Microsoft Yahei!important;
		margin-bottom:3px!important;
		}
		.container-live-feed-messages .live-feed-messages>div>div{
		text-shadow: 0px 2px 2px #000, 0px -2px 2px #000, 2px 0px 2px #000, -2px 0px 2px #000, 2px 2px 2px #000, -2px -2px 2px #000, 2px -2px 2px #000, -2px 2px 2px #000!important;
		padding:1px 5px 1px 1px!important;max-width:unset!important;
		}
		.container-live-feed-messages .live-feed-messages>div>div>:nth-child(1){color:#b6d9fa!important}
		.container-live-feed-messages .live-feed-messages>div>div>:nth-child(2){color:#fff!important}
		.container-live-feed-messages .live-feed-messages>div>div>.nickname{text-overflow:unset!important;overflow:visible!important;max-width:unset!important;}
		.container-live-feed-messages .live-feed-messages>:not(.comment)>div>:nth-child(2){color:#ddd!important}
		.container-live-feed-messages .live-feed-messages>:not(.comment)>div>span:nth-child(1){margin-right:10px!important;}
		.container-live-feed-messages .live-feed-messages>.comment{padding:1px 0px 1px 0px!important;margin:0 0 -5px 0px!important}
		.container-live-feed-messages .live-feed-messages>.comment>div{line-height:24px!important;padding:0px 10px 0px 4px!important;margin:0px 0 0 8px!important}
		.container-live-feed-messages .live-feed-messages>.like{padding:0px 0px 2px 10px!important;}
		.container-live-feed-messages .live-feed-messages>.like>div{padding:2px 18px 2px 10px!important;margin:0 0 0 -12px!important;border-radius:10px!important}
		.container-live-feed-messages .live-feed-messages>.like>div>span:after{padding:0px 5px 0px 5px!important;margin:0px -10px 0 10px!important}
		.container-live-feed-messages .live-feed-messages>.follow>div{height:auto!important;padding:2px 10px 3px 7px!important;margin:3px 0px 4px 0!important}
		.container-live-feed-messages .live-feed-messages>.user-enter>div{height:auto!important;padding:2px 10px 3px 4px!important;margin:3px 0 1px 3px!important;border-radius:10px!important}
		.container-live-feed-messages .live-feed-messages>.gift>div{background:#fedf3b!important;height:auto!important;line-height:25px!important;padding:2px 5px 2px 10px!important;margin:0 0 -5px 0!important;border-radius:10px!important}
		.container-live-feed-messages .live-feed-messages>.gift>div>span:nth-child(2){padding:0px 5px 0px 0px!important;}
		.container-live-feed-messages .live-feed-messages>.gift>div>img{margin:0 0 1px 0!important}
		.container-live-feed-messages .live-feed-messages > :not(.comment) > div > :nth-child(2).nickname{
		    color : #b6d9fa !important
		}
		.container-live-feed-messages .live-feed-messages > div > div > :nth-child(2).nickname{
		    color : #b6d9fa !important
		}
		.container-live-feed-messages .live-feed-messages > :not(.comment) > div > :nth-child(2){
		    color:#fff !important;
		}
		.container-live-feed-messages .live-feed-messages > div.comment > div .comment-text{
		    color:#fff !important;
		}
		.container-live-feed-messages .live-feed-messages > div.like > div .like-text{
		    color:#fff !important;
		}
		.container-live-feed-messages .live-feed-messages > div.gift > div{
		    color : #fff !important;
		}
		.container-live-feed-messages .live-feed-messages > div.user-enter{
			color: #fff !important;
		}
		.live-feed-input{
		    opacity : 0;
		}
		.live-feed-input:hover{
		    opacity : 1;
		}

	`;

	GM_addStyle(css);

	window.setInterval(function(){
		let videoEles = document.querySelectorAll('video');
		for(let videoEle of videoEles){
			videoEle.src = null;
		}
	}, 500);
})();