Skip to content

Commit 962cee6

Browse files
committed
fix: scope css
1 parent 28499fa commit 962cee6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

epub_browser/assets/chapter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function scopeEBStyles(scopeSelector = '[data-eb-styles]') {
176176
.then(response => response.text())
177177
.then(cssText => {
178178
// 为所有 CSS 规则添加作用域前缀
179-
const scopedCSS = scopeCSS(cssText);
179+
const scopedCSS = scopeCSS(cssText, scopeSelector);
180180

181181
// 创建新的 style 标签
182182
const style = document.createElement('style');
@@ -192,7 +192,7 @@ function scopeEBStyles(scopeSelector = '[data-eb-styles]') {
192192

193193
// 再添加
194194
const originalCSS = style.textContent;
195-
const scopedCSS = scopeCSS(originalCSS);
195+
const scopedCSS = scopeCSS(originalCSS, scopeSelector);
196196

197197
// 创建作用域化的新样式
198198
const scopedStyle = document.createElement('style');

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name="epub-browser", # 在PyPI上显示的项目名称
9-
version="1.6.10", # 初始版本号
9+
version="1.6.11", # 初始版本号
1010
author="dfface", # 作者名
1111
author_email="dfface@sina.com", # 作者邮箱
1212
keywords="epub reader html export browser convert calibre-web calibre kindle web server local",

0 commit comments

Comments
 (0)