Skip to content

Enable or disable all CSS and JS code snippets #9860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Vanessa219 opened this issue Dec 12, 2023 · 7 comments
Closed

Enable or disable all CSS and JS code snippets #9860

Vanessa219 opened this issue Dec 12, 2023 · 7 comments
Assignees
Milestone

Comments

@Vanessa219
Copy link
Member

为 CSS / JS 代码片段添加禁用和启用所用片段功能
https://ld246.com/article/1702140066419

@liao-zh
Copy link

liao-zh commented Dec 12, 2023

要不要再加个导出所有片段的功能?方便编辑和备份。现在设置里的浏览区域只有一两行,不大方便编辑。

@luo-chuan
Copy link

建议做成安全模式

@chenshinshi
Copy link

要不要再加个导出所有片段的功能?方便编辑和备份。现在设置里的浏览区域只有一两行,不大方便编辑。

其实可以拉长的,你把鼠标挪到浏览区域的右下角

@88250
Copy link
Member

88250 commented Dec 12, 2023

建议做成安全模式

这个不一样,一键关闭的话主要是为了某些情况下方便定位问题。安全模式之前有个 issue #8369

@liao-zh
Copy link

liao-zh commented Dec 13, 2023

要不要再加个导出所有片段的功能?方便编辑和备份。现在设置里的浏览区域只有一两行,不大方便编辑。

其实可以拉长的,你把鼠标挪到浏览区域的右下角

原来是这样

@luo-chuan
Copy link

这个不一样,一键关闭的话主要是为了某些情况下方便定位问题。安全模式之前有个 issue #8369

感觉和我想的不是一回事。我的意思是用户自己玩CSS或者JS容易把软件玩崩,比如把所有div都display:none之类的,想撤销都不行了,因为按钮都不显示了。这时候就需要通过安全模式来重启思源,也就是启动时禁用所有代码片段和插件,然后用户自行删除有问题的代码片段和插件。
在PC端,可以通过命令行带参数启动,就像这样“siyuan.exe -safe”。 安卓端的话,就在桌面 APP 图标位置增加长按选项来安全启动,并且可以通过伺服,在浏览器中带 url 参数来安全启动,比如"?safe=true"。

@88250 88250 added this to the 2.11.3 milestone Dec 15, 2023
@88250
Copy link
Member

88250 commented Dec 15, 2023

@luo-chuan 这样太复杂了,如果出现这样的问题,PC 端最简单的方案应该是直接移走 工作空间/data/snippets/conf.json 就行了,移动端的话靠数据同步。

88250 added a commit that referenced this issue Dec 15, 2023

Verified

This commit was signed with the committer’s verified signature.
EightDoor added a commit to EightDoor/siyuan that referenced this issue Dec 15, 2023
* commit '969a8d24fcdc648b3f88d28d47280869f4974396':
  🎨 Improve web page clip code block content conversion siyuan-note#9896
  🐛 Create doc failed on non-Windows siyuan-note#9890
  🐛 fix siyuan-note#9850
  🎨 Add Relation and Rollup column to database table view siyuan-note#9888
  🐛 Do not remove .tmp file when listing doc tree https://ld246.com/article/1702621572239
  ♻️ Refactor database table view
  🐛 fix siyuan-note#9891
  🎨 delete row by keydown
  🎨 fix siyuan-note#9886
  🎨 siyuan-note#9886
  🎨 Enable or disable all CSS and JS code snippets siyuan-note#9860
  🎨 Database table view template columns support reference date columns siyuan-note#9887
  🎨 fix siyuan-note#9878
  ⬆️ Upgrade kernel deps
  🎨 Delete the corresponding data in the database attributes table after deleting the doc siyuan-note#9875
  ⬆️ Upgrade Lute
  🎨 Add internal kernel API `/api/block/getTailChildBlocks` siyuan-note#9884
  🎨 siyuan-note#9882
  🐛
88250 added a commit that referenced this issue Dec 18, 2023

Verified

This commit was signed with the committer’s verified signature.
Vanessa219 added a commit that referenced this issue Dec 18, 2023
Vanessa219 added a commit that referenced this issue Dec 18, 2023
Vanessa219 added a commit that referenced this issue Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants