Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Izumiko committed Oct 12, 2024
1 parent 40b7a2c commit daf12f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ sub_filter '</body>' '<script src="https://jellyfin-danmaku.pages.dev/ede.user.j
sub_filter_once on;
```

並加入新的 location :
若需要本地代理弹弹play API,不使用CF Worker代理,则加入新的 location 块,否则删除上面网址中的`?noCors=1`:
```conf
location /ddplay-api/ {
proxy_pass https://api.dandanplay.net;
proxy_set_header Host $host;
# 下傳的頭部設置
# example.com 根据自己的域名设置,或直接设为*
add_header Access-Control-Allow-Origin "example.com";
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
add_header Access-Control-Allow-Headers "Origin, Content-Type, Accept, Authorization";
Expand All @@ -85,7 +85,7 @@ location /ddplay-api/api/v2/login {
proxy_pass https://ddplay-api.930524.xyz;
proxy_set_header Host $host;
# 下傳的頭部設置
# example.com 根据自己的域名设置,或直接设为*
add_header Access-Control-Allow-Origin "example.com";
add_header Access-Control-Allow-Methods "POST, OPTIONS";
add_header Access-Control-Allow-Headers "Origin, Content-Type, Accept, Authorization";
Expand Down Expand Up @@ -116,6 +116,7 @@ example.com {
header_up Accept-Encoding identity
}
# 若需要本地代理弹弹play API,不使用CF Worker代理,则加入下面两个handle_path,否则删除上面网址中的 ?noCors=1
handle_path /ddplay-api/* {
reverse_proxy https://api.dandanplay.net {
header_up Host {upstream_hostport}
Expand Down
10 changes: 5 additions & 5 deletions ede.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<input style="width: 50%;" type="range" id="fontSize" min="8" max="80" step="1" value="${window.ede.fontSize || 18}" />
</div>
<div style="display: flex;">
<label style="flex: auto;">其他字体选項:</label>
<label style="flex: auto;">其他字体选项:</label>
<div><input style="flex-grow: 1;" id="danmakuFontOptions" placeholder="" value="${window.ede.fontOptions ?? ""}" /></div>
</div>
<div style="display: flex;">
Expand Down Expand Up @@ -292,7 +292,7 @@
showDebugInfo(`字体:${window.ede.fontFamily}`);
window.ede.fontOptions = document.getElementById("danmakuFontOptions").value;
window.localStorage.setItem('danmakuFontOptions', window.ede.fontOptions);
showDebugInfo(`字体选項${window.ede.fontOptions}`);
showDebugInfo(`字体选项${window.ede.fontOptions}`);
reloadDanmaku('reload');
closeModal();
} catch (e) {
Expand Down Expand Up @@ -494,10 +494,10 @@
// 当前剧集弹幕偏移时间
this.curEpOffset = 0;
this.curEpOffsetModified = false;
// 字體
// 字体
const fontFamily = window.localStorage.getItem('danmakuFontFamily');
this.fontFamily = fontFamily ?? "sans-serif";
// 字体选項
// 字体选项
const fontOptions = window.localStorage.getItem('danmakuFontOptions');
this.fontOptions = fontOptions ?? "";

Expand Down Expand Up @@ -1165,7 +1165,7 @@
showDebugInfo(`弹幕模式过滤:${window.ede.danmakuModeFilter}`);
showDebugInfo(`弹幕字号:${window.ede.fontSize}`);
showDebugInfo(`弹幕字体:${window.ede.fontFamily}`);
showDebugInfo(`弹幕字体选項${window.ede.fontOptions}`);
showDebugInfo(`弹幕字体选项${window.ede.fontOptions}`);
showDebugInfo(`屏幕分辨率:${window.screen.width}x${window.screen.height}`);
if (window.ede.curEpOffset !== 0) showDebugInfo(`当前弹幕偏移:${window.ede.curEpOffset} 秒`);

Expand Down

0 comments on commit daf12f8

Please sign in to comment.