Skip to content

Commit

Permalink
Merge pull request #12 from TCOTC/main
Browse files Browse the repository at this point in the history
fix #11
  • Loading branch information
TCOTC authored Apr 30, 2024
2 parents 14d5b52 + d44c2d5 commit c6ffcb1
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 17 deletions.
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,25 @@ now can remove almost all the buttons
## 1.0.2 2024.01.06
- fix tag in editor disappeared

## 1.1.3 2024.01.24
## 1.1.0 2024.01.12
- add icons for reference in setting panel
- not anymore detect or read old config
- delete config data after uninstall, but not when turn off plugin

## 1.1.2 2024.01.24
- fix multiple window ain't open

## changelog 1.1.3 2024.01.27
## 1.1.3 2024.01.27
- fix warning in editor
- add custom window control button reload
- add custom window control button custon position
- add custom window control button custom layout

## 1.1.5 2024.03.12
- add docker support

## 1.1.6 2024.03.19
- fix issue that you can still select item by up and down arrow key on keyboard after hiding.

## 1.1.7 2024.04.30
- add command palette button
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,31 @@ A SiYuan Plugin that able to remove the buttons in menu that you don't really us
It currently support removing top bar icons, side bar icons, and menus with id `commonMenu`, which are two icons on top right corner of each doc, and calling from the right side of each paragraph.

# Download
go to release page or go to SiYuan's market and search `siyuan_rmv_btn`
go to release page or go to SiYuan's market and search `siyuan_rmv_btn`


## changelog 1.1.0 2024.01.12
- Add icons for reference in setting panel.
- Not anymore detect or read old config.
- Delete config data after uninstall, but not when turn off plugin.
- add icons for reference in setting panel
- not anymore detect or read old config
- delete config data after uninstall, but not when turn off plugin

## changelog 1.1.3 2024.01.27
- fix warning in editor
- add custom window control button reload
- add custom window control button custon position
- add custom window control button custom layout

## changelog 1.1.5 2024.03.12
- add docker support

## changelog 1.1.6 2024.03.19
- fix issue that you can still select item by up and down arrow key on keyboard after hiding.

## changelog 1.1.7 2024.04.30
- add command palette button

# Warning
- If you removed too much items and end up stopped working, please go to your workspace and delete the entire ``siyuan_rmv_btn`` folder.
- If you removed too much items and end up stopped working, please go to your workspace and delete the entire `siyuan_rmv_btn` folder.
- The handler handle main interface of SiYuan as soon as DOM changes. In which case if you added too many items, the performance would be influenced.
- This plugin didn't do extra work to prevent JS injection, in which case you should be more careful using it when in browser or hosted in public net.
- If items you are trying to hide is related to SiYuan's commercial part, please consider to donate to @D and @V (not me) because they lives by writing open-source codes.
Expand Down
14 changes: 8 additions & 6 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
本插件在MIT协议下开源,没有联网行为,也没有从远端fetch恶意代码的能力。

# 下载
到release页面下载,或者到思源集市搜索“移除按钮”
到release页面下载,或者到思源集市搜索“移除按钮”

## changelog 1.1.0 2024.01.12
- Add icons for reference in setting panel.
- Not anymore detect or read old config.
- Delete config data after uninstall, but not when turn off plugin.
- add icons for reference in setting panel
- not anymore detect or read old config
- delete config data after uninstall, but not when turn off plugin

## changelog 1.1.4 2024.03.07
## changelog 1.1.3 2024.01.27
- fix warning in editor
- add custom window control button reload
- add custom window control button custon position
Expand All @@ -32,6 +32,8 @@
## changelog 1.1.6 2024.03.19
- fix issue that you can still select item by up and down arrow key on keyboard after hiding.

## changelog 1.1.7 2024.04.30
- add command palette button

# 链接
repo/源码:https://github.com/zxkmm/siyuan_rmv_btn
Expand All @@ -44,7 +46,7 @@ repo/源码:https://github.com/zxkmm/siyuan_rmv_btn

# 警告

- 如果你移除了太多东西导致无法正常操作,请到思源工作空间删除整个``siyuan_rmv_btn``文件夹。
- 如果你移除了太多东西导致无法正常操作,请到思源工作空间删除整个`siyuan_rmv_btn`文件夹。

- 插件在 DOM 发生变化时会立即注入思源的主界面。在这种情况下,如果添加的项目过多,性能将受到影响。

Expand Down
7 changes: 5 additions & 2 deletions plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "siyuan_rmv_btn",
"author": "zxkmm",
"url": "https://github.com/zxkmm/siyuan_rmv_btn",
"version": "1.1.6",
"version": "1.1.7",
"minAppVersion": "2.10.14",
"backends": [
"windows",
Expand Down Expand Up @@ -37,12 +37,15 @@
]
},
"keywords": [
"按钮",
"移除",
"隐藏",
"菜单",
"button",
"remove",
"hide",
"menu",
"siyuan_rmv_btn"
"siyuan_rmv_btn",
"zxkmm"
]
}
2 changes: 1 addition & 1 deletion src/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"rm_menu_title": "Menu Items to Hide",
"rm_menu_desc": "Enter the label names of the interface language (e.g., \"Copy, Move\" without quotes). If using multiple languages, please enter the label names for all languages (e.g., \"Copy, Copy, Move, Move\" without quotes).<br>Separate with English or Chinese half-width commas, i.e., \",\" or \"\".",
"rm_top_title": "Top and Bottom Bar Buttons to Hide",
"rm_top_desc": "<head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><style>#siyuan_rmv_btn_setting_table svg {border: 1px;width: 1em;height: 1em;vertical-align: middle;}#siyuan_rmv_btn_setting_table table {border-collapse: collapse;width: 100%;margin: 0 auto;}#siyuan_rmv_btn_setting_table td {border: 1px;padding: 10px;text-align: right;}#siyuan_rmv_btn_setting_table th {border: 1px;padding: 10px;text-align: left;font-weight: bold;}#siyuan_rmv_btn_setting_table tr:hover {box-shadow: inset 0 0 10px #999;}</style></head><body>❗Please do not hide functional icons, such as close buttons, unless necessary❗<br>Fill in the provided tag namestrings (e.g., \"barSync, barBack\") separated by English or Chinese half-width commas, i.e., \",\" or\",\".<br>Options:<table id=\"siyuan_rmv_btn_setting_table\"><thead><tr><th>Item to Hide</th><th>String (Double-click to select)</th></tr></thead><tbody><tr><th><svg><use xlink:href=\"#iconCloudSucc\"></use></svg> Sync Button</th><td>barSync</td></tr><tr><th><svg><use xlink:href=\"#iconBack\"></use></svg> Back Button</th><td>barBack</td></tr><tr><th><svg><use xlink:href=\"#iconForward\"></use></svg> Forward Button</th><td>barForward</td></tr><tr><th><svg><use xlink:href=\"#iconPlugin\"></use></svg> Plugin Button</th><td>barPlugins</td></tr><tr><th><svg><use xlink:href=\"#iconSearch\"></use></svg> Search Button</th><td>barSearch</td></tr><tr><th><svg><use xlink:href=\"#iconLight\"></use></svg><svg><use xlink:href=\"#iconDark\"></use></svg><svg><use xlink:href=\"#iconMode\"></use></svg> Day/Night Mode Button</th><td>barMode</td></tr><tr><th><svg><use xlink:href=\"#iconQuit\"></use></svg> Exit Button (iPad and Android Tablets)</th><td>barExit</td></tr><tr><th><svg><use xlink:href=\"#iconClose\"></use></svg><svg><use xlink:href=\"#iconMin\"></use></svg><svg><use xlink:href=\"#iconRestore\"></use></svg> Window Controls Button</th><td>windowControls</td></tr><tr><th><svg class=\"ft__error\"><use xlink:href=\"#iconVIP\"></use></svg> Crown Icon</th><td>toolbarVIP</td></tr><tr><th><svg><use xlink:href=\"#iconHelp\"></use></svg> Bottom Bar Help Button</th><td>statusHelp</td></tr><tr><th><svg><use xlink:href=\"#iconHideDock\"></use></svg> Bottom Bar Hidden Sidebar Button</th><td>barDock</td></tr></tbody></table><body></body>",
"rm_top_desc": "<head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><style>#siyuan_rmv_btn_setting_table svg {border: 1px;width: 1em;height: 1em;vertical-align: middle;}#siyuan_rmv_btn_setting_table table {border-collapse: collapse;width: 100%;margin: 0 auto;}#siyuan_rmv_btn_setting_table td {border: 1px;padding: 10px;text-align: right;}#siyuan_rmv_btn_setting_table th {border: 1px;padding: 10px;text-align: left;font-weight: bold;}#siyuan_rmv_btn_setting_table tr:hover {box-shadow: inset 0 0 10px #999;}</style></head><body>❗Please do not hide functional icons, such as close buttons, unless necessary❗<br>Fill in the provided tag namestrings (e.g., \"barSync, barBack\") separated by English or Chinese half-width commas, i.e., \",\" or\",\".<br>Options:<table id=\"siyuan_rmv_btn_setting_table\"><thead><tr><th>Item to Hide</th><th>String (Double-click to select)</th></tr></thead><tbody><tr><th><svg><use xlink:href=\"#iconCloudSucc\"></use></svg> Sync Button</th><td>barSync</td></tr><tr><th><svg><use xlink:href=\"#iconBack\"></use></svg> Back Button</th><td>barBack</td></tr><tr><th><svg><use xlink:href=\"#iconForward\"></use></svg> Forward Button</th><td>barForward</td></tr><tr><th><svg><use xlink:href=\"#iconPlugin\"></use></svg> Plugin Button</th><td>barPlugins</td></tr><tr><th><svg><use xlink:href=\"#iconLayoutBottom\"></use></svg> Command Palette Button</th><td>barCommand</td></tr><tr><th><svg><use xlink:href=\"#iconSearch\"></use></svg> Search Button</th><td>barSearch</td></tr><tr><th><svg><use xlink:href=\"#iconLight\"></use></svg><svg><use xlink:href=\"#iconDark\"></use></svg><svg><use xlink:href=\"#iconMode\"></use></svg> Day/Night Mode Button</th><td>barMode</td></tr><tr><th><svg><use xlink:href=\"#iconQuit\"></use></svg> Exit Button (iPad and Android Tablets)</th><td>barExit</td></tr><tr><th><svg><use xlink:href=\"#iconClose\"></use></svg><svg><use xlink:href=\"#iconMin\"></use></svg><svg><use xlink:href=\"#iconRestore\"></use></svg> Window Controls Button</th><td>windowControls</td></tr><tr><th><svg class=\"ft__error\"><use xlink:href=\"#iconVIP\"></use></svg> Crown Icon</th><td>toolbarVIP</td></tr><tr><th><svg><use xlink:href=\"#iconHelp\"></use></svg> Bottom Bar Help Button</th><td>statusHelp</td></tr><tr><th><svg><use xlink:href=\"#iconHideDock\"></use></svg> Bottom Bar Hidden Sidebar Button</th><td>barDock</td></tr></tbody></table><body></body>",
"rm_side_title": "Sidebar Buttons to Hide",
"rm_side_desc": "<head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><style>#siyuan_rmv_btn_setting_table svg {border: 1px;width: 1em;height: 1em;vertical-align: middle;}#siyuan_rmv_btn_setting_table table {border-collapse: collapse;width: 100%;margin: 0 auto;}#siyuan_rmv_btn_setting_table td {border: 1px;padding: 10px;text-align: right;}#siyuan_rmv_btn_setting_table th {border: 1px;padding: 10px;text-align: left;font-weight: bold;}#siyuan_rmv_btn_setting_table tr:hover {box-shadow: inset 0 0 10px #999;}</style></head><body> Enter the provided label name strings (e.g., \"outline, tag\" without quotes)<br>Separate with English or Chinesehalf-width commas, i.e., \",\" or \",\".<br>Options:<br><table id=\"siyuan_rmv_btn_setting_table\"><thead><tr><th>Items to Hide</th><th>Input String (Double-click to select)</th></tr></thead><tbody><tr><th><svg><use xlink:href=\"#iconAlignCenter\"></use></svg> Outline Icon</th><td>outline</td></tr><tr><th><svg><use xlink:href=\"#iconInbox\"></use></svg> Inbox Icon</th><td>inbox</td></tr><tr><th><svg><use xlink:href=\"#iconBookmark\"></use></svg> Bookmark Icon</th><td>bookmark</td></tr><tr><th><svg><use xlink:href=\"#iconTags\"></use></svg> Tag Icon</th><td>tag</td></tr><tr><th><svg><use xlink:href=\"#iconLink\"></use></svg> Backlink Icon</th><td>backlink</td></tr><tr><th><svg><use xlink:href=\"#iconGlobalGraph\"></use></svg> Global Graph Icon</th><td>globalGraph</td></tr><tr><th><svg><use xlink:href=\"#iconGraph\"></use></svg> Notebook Graph Icon</th><td>graph</td></tr></tbody></table></body>",
"ignore_warning": "remove button plugin: the warning above is just because you choosed a high performance observing implementation, if you don't like it, you may choose the other two selections in the setting panel. thank you",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"rm_menu_title": "要隐藏的菜单项",
"rm_menu_desc": "填写界面语言的标签名(如“复制,移动”(不包括双引号)),若使用多语言,请同时填写所有语言的标签名(如“复制,Copy,移动,Move”(不包括双引号))。<br>用英文或中文半角逗号,即\",\"\"\"隔开。",
"rm_top_title": "要隐藏的顶栏按钮和底栏按钮",
"rm_top_desc": "<head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><style>#siyuan_rmv_btn_setting_table svg {border: 1px;width: 1em;height: 1em;vertical-align: middle;}#siyuan_rmv_btn_setting_table table {border-collapse: collapse;width: 100%;margin: 0 auto;}#siyuan_rmv_btn_setting_table td {border: 1px;padding: 10px;text-align: right;}#siyuan_rmv_btn_setting_table th {border: 1px;padding: 10px;text-align: left;font-weight: bold;}#siyuan_rmv_btn_setting_table tr:hover {box-shadow: inset 0 0 10px #999;}</style></head><body>❗请勿隐藏功能性图标,如关闭按钮等,除非确实需要❗<br>填写提供的标签名字符串(如“barSync,barBack”(不包括双引号))<br>用英文或中文半角逗号,即\",\"或\",\"隔开。<br>选项:<br><table id=\"siyuan_rmv_btn_setting_table\"><thead><tr><th>要隐藏的项目</th><th>输入的字符串(双击选中)</th></tr></thead><tbody><tr><th><svg><use xlink:href=\"#iconCloudSucc\"></use></svg> 同步按钮</th><td>barSync</td></tr><tr><th><svg><use xlink:href=\"#iconBack\"></use></svg> 返回按钮</th><td>barBack</td></tr><tr><th><svg><use xlink:href=\"#iconForward\"></use></svg> 前进按钮</th><td>barForward</td></tr><tr><th><svg><use xlink:href=\"#iconPlugin\"></use></svg> 插件按钮</th><td>barPlugins</td></tr><tr><th><svg><use xlink:href=\"#iconSearch\"></use></svg> 搜索按钮</th><td>barSearch</td></tr><tr><th><svg><use xlink:href=\"#iconLight\"></use></svg><svg><use xlink:href=\"#iconDark\"></use></svg><svg><use xlink:href=\"#iconMode\"></use></svg> 日间 夜间模式按钮</th><td>barMode</td></tr><tr><th><svg><use xlink:href=\"#iconQuit\"></use></svg> 退出按钮(iPad和平板)</th><td>barExit</td></tr><tr><th><svg><use xlink:href=\"#iconClose\"></use></svg><svg><use xlink:href=\"#iconMin\"></use></svg><svg><use xlink:href=\"#iconRestore\"></use></svg> 窗口控制按钮</th><td>windowControls</td></tr><tr><th><svg class=\"ft__error\"><use xlink:href=\"#iconVIP\"></use></svg> 皇冠图标</th><td>toolbarVIP</td></tr><tr><th><svg><use xlink:href=\"#iconHelp\"></use></svg> 底栏帮助按钮</th><td>statusHelp</td></tr><tr><th><svg><use xlink:href=\"#iconHideDock\"></use></svg> 底栏中的隐藏侧栏按钮</th><td>barDock</td></tr></tbody></table><body>",
"rm_top_desc": "<head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><style>#siyuan_rmv_btn_setting_table svg {border: 1px;width: 1em;height: 1em;vertical-align: middle;}#siyuan_rmv_btn_setting_table table {border-collapse: collapse;width: 100%;margin: 0 auto;}#siyuan_rmv_btn_setting_table td {border: 1px;padding: 10px;text-align: right;}#siyuan_rmv_btn_setting_table th {border: 1px;padding: 10px;text-align: left;font-weight: bold;}#siyuan_rmv_btn_setting_table tr:hover {box-shadow: inset 0 0 10px #999;}</style></head><body>❗请勿隐藏功能性图标,如关闭按钮等,除非确实需要❗<br>填写提供的标签名字符串(如“barSync,barBack”(不包括双引号))<br>用英文或中文半角逗号,即\",\"或\",\"隔开。<br>选项:<br><table id=\"siyuan_rmv_btn_setting_table\"><thead><tr><th>要隐藏的项目</th><th>输入的字符串(双击选中)</th></tr></thead><tbody><tr><th><svg><use xlink:href=\"#iconCloudSucc\"></use></svg> 同步按钮</th><td>barSync</td></tr><tr><th><svg><use xlink:href=\"#iconBack\"></use></svg> 返回按钮</th><td>barBack</td></tr><tr><th><svg><use xlink:href=\"#iconForward\"></use></svg> 前进按钮</th><td>barForward</td></tr><tr><th><svg><use xlink:href=\"#iconPlugin\"></use></svg> 插件按钮</th><td>barPlugins</td></tr><tr><th><svg><use xlink:href=\"#iconLayoutBottom\"></use></svg> 命令面板按钮</th><td>barCommand</td></tr><tr><th><svg><use xlink:href=\"#iconSearch\"></use></svg> 搜索按钮</th><td>barSearch</td></tr><tr><th><svg><use xlink:href=\"#iconLight\"></use></svg><svg><use xlink:href=\"#iconDark\"></use></svg><svg><use xlink:href=\"#iconMode\"></use></svg> 日间 夜间模式按钮</th><td>barMode</td></tr><tr><th><svg><use xlink:href=\"#iconQuit\"></use></svg> 退出按钮(iPad和平板)</th><td>barExit</td></tr><tr><th><svg><use xlink:href=\"#iconClose\"></use></svg><svg><use xlink:href=\"#iconMin\"></use></svg><svg><use xlink:href=\"#iconRestore\"></use></svg> 窗口控制按钮</th><td>windowControls</td></tr><tr><th><svg class=\"ft__error\"><use xlink:href=\"#iconVIP\"></use></svg> 皇冠图标</th><td>toolbarVIP</td></tr><tr><th><svg><use xlink:href=\"#iconHelp\"></use></svg> 底栏帮助按钮</th><td>statusHelp</td></tr><tr><th><svg><use xlink:href=\"#iconHideDock\"></use></svg> 底栏中的隐藏侧栏按钮</th><td>barDock</td></tr></tbody></table><body>",
"rm_side_title": "要隐藏的侧栏按钮",
"rm_side_desc": "<head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><style>#siyuan_rmv_btn_setting_table svg {border: 1px;width: 1em;height: 1em;vertical-align: middle;}#siyuan_rmv_btn_setting_table table {border-collapse: collapse;width: 100%;margin: 0 auto;}#siyuan_rmv_btn_setting_table td {border: 1px;padding: 10px;text-align: right;}#siyuan_rmv_btn_setting_table th {border: 1px;padding: 10px;text-align: left;font-weight: bold;}#siyuan_rmv_btn_setting_table tr:hover {box-shadow: inset 0 0 10px #999;}</style></head><body>填写提供的标签名字符串(如“outline,tag”(不包括双引号))<br>用英文或中文半角逗号,即\",\"或\",\"隔开。<br>选项:<br><table id=\"siyuan_rmv_btn_setting_table\"><thead><tr><th>要隐藏的项目</th><th>输入的字符串(双击选中)</th></tr></thead><tbody><tr><th><svg><use xlink:href=\"#iconAlignCenter\"></use></svg> 大纲图标</th><td>outline</td></tr><tr><th><svg><use xlink:href=\"#iconInbox\"></use></svg> 收件箱图标</th><td>inbox</td></tr><tr><th><svg><use xlink:href=\"#iconBookmark\"></use></svg> 书签图标</th><td>bookmark</td></tr><tr><th><svg><use xlink:href=\"#iconTags\"></use></svg> 标签图标</th><td>tag</td></tr><tr><th><svg><use xlink:href=\"#iconLink\"></use></svg> 反链图标</th><td>backlink</td></tr><tr><th><svg><use xlink:href=\"#iconGlobalGraph\"></use></svg> 全局图谱图标</th><td>globalGraph</td></tr><tr><th><svg><use xlink:href=\"#iconGraph\"></use></svg> 单个笔记本图谱图标</th><td>graph</td></tr></tbody></table></body>",
"ignore_warning": "移除按钮插件: 上方的warning是因为您选择了高性能的监听方式,若不喜欢,请在设置页面选择另外两种方式,谢谢",
Expand Down

0 comments on commit c6ffcb1

Please sign in to comment.