muzuiget / monkey-support

Lightweight userscript manager
6 stars 1 forks source link

Firefox 版本 v0.6.6 似乎無法搭配 Dualsub v2.28.0 改變字幕樣式 #4

Closed gnafrgb closed 4 months ago

gnafrgb commented 4 months ago

本來可以同時用這兩個套件在Netflix顯示雙字幕並且改顏色字體大小之類的 但突然就不行了

播放時顯示有匹配到Netflix網址 但沒有改變字幕樣式 只有dualsub原本內建的基本字幕樣式還有作用 shot

muzuiget commented 4 months ago

因为在 Dualsub 2.27.0 里我重写的标准模式的通用渲染器,HTML 结构和之前的版本不同了。

你可以贴一下原来的 CSS 是怎么写的,然后我替你改一下。

gnafrgb commented 4 months ago

原本的是這樣

.dualsub-renderer .subtitles .contents { color: rgb(255, 255, 0); font-size: 42px; background-color: rgba(0, 0, 0, 0.4); padding: 3px; }

.dualsub-renderer .subtitle-2 .contents { color: rgb(255,255,255); font-size: 18px; background-color: transparent; text-shadow: 2px 2px 1px rgba(0,0,0,1); }

muzuiget commented 4 months ago

.contents 去掉试下。

.dualsub-renderer .subtitles {
    color: rgb(255, 255, 0);
    font-size: 42px;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 3px;
}

.dualsub-renderer .subtitle-2 {
    color: rgb(255,255,255);
    font-size: 18px;
    background-color: transparent;
    text-shadow: 2px 2px 1px rgba(0,0,0,1);
}
gnafrgb commented 4 months ago

去掉之後有變更字幕的顏色跟大小 但是次字幕也跟主字幕一樣有半透明黑背景了

Firefox_Screenshot_2024-04-11T17-04-09 383Z

muzuiget commented 4 months ago

把第一段 .dualsub-renderer .subtitles 改成 .dualsub-renderer .subtitle-1

.dualsub-renderer .subtitle-1 {
    color: rgb(255, 255, 0);
    font-size: 42px;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 3px;
}

.dualsub-renderer .subtitle-2 {
    color: rgb(255,255,255);
    font-size: 18px;
    background-color: transparent;
    text-shadow: 2px 2px 1px rgba(0,0,0,1);
}
gnafrgb commented 4 months ago

感謝! 測試後已正常

muzuiget commented 4 months ago

最近我提交了 Wildmonkey 0.16.2 到 Firefox,等待审核通过。升级到 Manifest V3 版本,跟 Chrome 版本使用相同代码。

但是 Firefox 现在对 Manifest V3 权限处理是按需授权,用户需要单独对每个网站独立授权,所以从 Manifest V2 升级到 Manifest V3 后,扩展会突然失效。

通过对工具栏图标右键设置授权,类似这样:

Screenshot_20240412_183558