Bilibili上下弹幕变字幕

用于突出显示B站的顶部弹幕与底部弹幕,使其呈现Youtube字幕的效果。适用于一些有字幕弹幕的生肉视频。

目前为 2017-11-15 提交的版本。查看 最新版本

// ==UserScript==
// @name         Bilibili上下弹幕变字幕
// @namespace    [email protected]
// @version      0.1
// @description  用于突出显示B站的顶部弹幕与底部弹幕,使其呈现Youtube字幕的效果。适用于一些有字幕弹幕的生肉视频。
// @author       剧情帝
// @match        https://www.bilibili.com/video/av*
// @match        http://www.bilibili.com/video/av*
// @run-at       document-end
// @lastmodified 2017-11-16
// ==/UserScript==

(function() {
    'use strict';

	var $style = $('<style id="testStyle" type="text/css"></style>');
	$('head').append($style);
	var sheet = $style[0].sheet;
	var cssRule = '#bofqi .bilibili-player-video-danmaku .bilibili-danmaku:not([style*="transform"]) {';
	cssRule += 'background-color:rgba(0,0,0,0.75);';
	cssRule += ' padding:4px 10px;';
	cssRule += ' opacity:1 !important;';
	cssRule += ' border-radius:3px;';
	cssRule += ' font-size:36px !important;';
	cssRule += ' line-height:1 !important}';
	sheet.insertRule( cssRule);
})();