diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c6ec4e..e424003 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,5 +21,8 @@ now can remove almost all the buttons ## 0.1.5 2023.12.17 - add more buttons - ## 1.0.0 2023.12.23 - - refactor entire plugin, support more listening implementation \ No newline at end of file +## 1.0.0 2023.12.23 + - refactor entire plugin, support more listening implementation + +## 1.0.1 2023.12.23 + - fix mobile side bar doesn't hide correctly \ No newline at end of file diff --git a/package.json b/package.json index 823eeb8..b284b56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "siyuan_rmv_btn", - "version": "1.0.0", + "version": "1.0.1", "type": "module", "description": "A plugin to remove menu items you don't really need.", "repository": "https://github.com/zxkmm/siyuan_rmv_btn", diff --git a/plugin.json b/plugin.json index 0bcac0c..91a377a 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "name": "siyuan_rmv_btn", "author": "zxkmm", "url": "https://github.com/zxkmm/siyuan_rmv_btn", - "version": "1.0.0", + "version": "1.0.1", "minAppVersion": "2.10.14", "backends": [ "windows", diff --git a/src/i18n/en_US.json b/src/i18n/en_US.json index c129f34..3a39eb1 100644 --- a/src/i18n/en_US.json +++ b/src/i18n/en_US.json @@ -1,6 +1,6 @@ { "totalSwitch": "Total Switch", - "totalSwitchdesc": "If the items you want to hide are related to the commercial part of Source, please consider donating to @D and @V (not me) as they live by writing open-source code.
v1.0.0", + "totalSwitchdesc": "If the items you want to hide are related to the commercial part of Source, please consider donating to @D and @V (not me) as they live by writing open-source code.
v1.0.1", "listenImplementation": "Listen Implementation", "listenImplementationdesc": "It is recommended to choose the DOMNodeInserted option for the best overall performance, but this option will output a warning in the terminal. If you cannot accept this, please choose one of the other two implementations.", "reload_hint": "Reload the interface to apply the latest changes.", diff --git a/src/i18n/zh_CN.json b/src/i18n/zh_CN.json index 57da1ca..a32ebf1 100644 --- a/src/i18n/zh_CN.json +++ b/src/i18n/zh_CN.json @@ -1,6 +1,6 @@ { "totalSwitch":"总开关", - "totalSwitchdesc":"如果您要隐藏的项目与思源的商业部分有关,请考虑向@D和@V捐赠(不是我),因为他们以编写开源代码生活。
v1.0.0", + "totalSwitchdesc":"如果您要隐藏的项目与思源的商业部分有关,请考虑向@D和@V捐赠(不是我),因为他们以编写开源代码生活。
v1.0.1", "listenImplementation": "监听实现", "listenImplementationdesc":"建议首选综合性能最佳的DOMNodeInserted, 但是这个选项会在终端输出一个warning,如果您无法接受,请选择另外两个实现", "reload_hint":"重载界面以应用最新更改", diff --git a/src/index.ts b/src/index.ts index f7a9f56..5152b02 100644 --- a/src/index.ts +++ b/src/index.ts @@ -110,6 +110,7 @@ export default class siyuan_rmv_btn extends Plugin { } rmvSideBarIcons(_toRemoveListArray_){ + //pc view _toRemoveListArray_.forEach(elementType => { const styleElement = document.createElement('style'); styleElement.textContent = ` @@ -119,6 +120,20 @@ export default class siyuan_rmv_btn extends Plugin { `; document.head.appendChild(styleElement); }); + //mobile view + + + //mobile + _toRemoveListArray_.forEach(elementType => { + const styleElement = document.createElement('style'); + styleElement.textContent = ` + .toolbar__icon[data-type="sidebar-${elementType}-tab"] { + display: none; + } + `; + + document.head.appendChild(styleElement); + }); } checkOldComfigExist(){ //old trash detect