Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

Commit

Permalink
[ass] use opacity from biliHelper.playerConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
myfreeer committed Dec 8, 2016
1 parent 5b79d09 commit 65790e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bilibili_ASS_Danmaku_Downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ var initFont = (function () {
}());

var generateASS = function (danmaku, info) {
if (Number(info.opacity)) config.opacity = info.opacity;
var assHeader = fillStr('[Script Info]\nTitle: {{title}}\nOriginal Script: 根据 {{ori}} 的弹幕信息,由 https://github.com/tiansh/us-danmaku 生成\nScriptType: v4.00+\nCollisions: Normal\nPlayResX: {{playResX}}\nPlayResY: {{playResY}}\nTimer: 10.0000\n\n[V4+ Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding\nStyle: Fix,{{font}},25,&H{{alpha}}FFFFFF,&H{{alpha}}FFFFFF,&H{{alpha}}000000,&H{{alpha}}000000,1,0,0,0,100,100,0,0,1,2,0,2,20,20,2,0\nStyle: R2L,{{font}},25,&H{{alpha}}FFFFFF,&H{{alpha}}FFFFFF,&H{{alpha}}000000,&H{{alpha}}000000,1,0,0,0,100,100,0,0,1,2,0,2,20,20,2,0\n\n[Events]\nFormat: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\n', config, info, {'alpha': hexAlpha(config.opacity) });
// 补齐数字开头的0
var paddingNum = function (num, len) {
Expand Down

0 comments on commit 65790e9

Please sign in to comment.