Skip to content

Commit

Permalink
chore: fix typo, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
festoney8 committed Jan 8, 2024
1 parent 48077e5 commit 87e33b8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: mkdir
run: mkdir output
- name: move and rename file
run: mv dist/bilibili-cleaner.user.js output/bilibili-cleaner.user.min.js
run: mv dist/bilibili-cleaner.user.js output/bilibili-cleaner.min.user.js
- name: build default
run: pnpm run build
- name: copy file
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: mkdir
run: mkdir output
- name: move and rename file
run: mv dist/bilibili-cleaner.user.js output/bilibili-cleaner.user.min.js
run: mv dist/bilibili-cleaner.user.js output/bilibili-cleaner.min.user.js
- name: build default
run: pnpm run build
- name: copy file
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: mkdir
run: mkdir build-release
- name: move and rename file
run: mv dist/bilibili-cleaner.user.js build-release/bilibili-cleaner.user.min.js
run: mv dist/bilibili-cleaner.user.js build-release/bilibili-cleaner.min.user.js
- name: build default
run: pnpm run build
- name: copy file
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
- **「版权视频播放页」大部分功能与「播放页」一致且互相同步,小部分独有功能已用 "★" 重点标出**
- 「动态页」评论区相关功能与「播放页」一致且互相同步
- 「直播页」顶栏与普通顶栏不同,通用功能对其不生效(仅搜索栏少数功能与通用同步)
- 「首页」默认 10 个推荐位,在显示 5 列的情况下,若同时隐藏广告和分区视频,会产生一个待载入空位(骨架),可调节骨架相关选项改善观感

## 浏览器适配

Expand Down
8 changes: 4 additions & 4 deletions src/core/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class NormalItem implements IItem {
error(err)
}
}
/** 启用CSS片段, 向document.head插入style */
/** 启用CSS片段, 向<html>插入style */
insertItemCSS() {
if (!this.itemCSS) {
return
Expand All @@ -85,7 +85,7 @@ export class NormalItem implements IItem {
return
}
const style = document.createElement('style')
// 简单压缩, 若使用innerText, 多行CSS插入head后会产生<br>标签
// 简单压缩, 若使用innerText, 多行CSS插入后会产生<br>标签
style.innerHTML = this.itemCSS.replace(/\n\s*/g, '').trim()
// 指定CSS片段ID,用于实时启用停用
style.setAttribute('bili-cleaner-css', this.itemID)
Expand All @@ -98,7 +98,7 @@ export class NormalItem implements IItem {
error(err)
}
}
/** 停用CSS片段, 从document.head移除style */
/** 停用CSS片段, 从<html>移除style */
removeItemCSS() {
if (this.itemCSS) {
const style = document.querySelector(`html>style[bili-cleaner-css=${this.itemID}]`) as HTMLStyleElement
Expand Down Expand Up @@ -132,7 +132,7 @@ export class NormalItem implements IItem {
}
}
/**
* 执行item功能, 在页面head添加CSS, 执行func
* 执行item功能, 添加CSS, 执行func
* @param enableFunc 是否执行func, 默认true
*/
enableItem(enableFunc = true) {
Expand Down

0 comments on commit 87e33b8

Please sign in to comment.