Skip to content
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

幾個問題 #105

Closed
jerryc127 opened this issue Sep 6, 2019 · 8 comments · Fixed by thinkwee/thinkwee.github.io#18
Closed

幾個問題 #105

jerryc127 opened this issue Sep 6, 2019 · 8 comments · Fixed by thinkwee/thinkwee.github.io#18

Comments

@jerryc127
Copy link

Issue

Expected Behavior

Actual Behavior

Steps to Reproduce the Problem

  1. _
  2. _
  3. _

Specifications

(The version of the project, operating system, hardware etc.)

  1. 密碼輸入正確后,文章顯示出來
    但是這時console會報問題(雖然不影響使用)
    image

  2. js 是對 toc 進行 display: inline 操作,並只對ID toc_div 進行操作
    但是我的主題有2個地方顯示toc(手機界面和電腦顯示地方不同),這樣會導致js只對一個#toc_div 進行操作,建議改用判斷class

  3. 怎麽覆蓋hexo-blog-encrypt的function? 因爲不想動源文件的關係
    想修改59-60行
    https://github.com/MikeCoder/hexo-blog-encrypt/blob/master/lib/blog-encrypt.js#59

@jerryc127 jerryc127 changed the title 幾個問題? 幾個問題 Sep 6, 2019
@xiazeyu
Copy link
Collaborator

xiazeyu commented Sep 6, 2019

1 坐等3.0坂本更新
2 3.0版本因为hexo给的钩子不够, 若支持toc加密可能导致原文出现在searchdb内, 且不同主题情况差异太大, 故去掉了自带的toc加密功能. 若您想加密toc, 可以自己研究先前别人的解决方案. 我们也提供 诸如 解密后执行原先markdown内js代码的特性.
3. 不动源文件做不到. 建议等3.0版本发布再看

@D0n9X1n
Copy link
Owner

D0n9X1n commented Sep 7, 2019

  1. 已在 v2.2.5 修复。
  2. 可以尝试在 callback 部分加上自己的代码,v2.x 版本可以看 Callback 这边的代码会在解密成功之后运行,可以避免直接修改源码。
  3. 已在 v2.2.5 修复。

D0n9X1n added a commit that referenced this issue Sep 7, 2019
1. fix bug #105
2. update demo page
@D0n9X1n
Copy link
Owner

D0n9X1n commented Sep 7, 2019

@jerryc127 已修改为通过 classname 进行修改,classname 为 toc-div-class.

https://github.com/MikeCoder/hexo-blog-encrypt/blob/0e363cab40ca0769828ec95d32d33724861078d3/lib/blog-encrypt.js#L65

@jerryc127
Copy link
Author

感謝更新
一個小建議
輸入密碼正確后
建議直接顯示文章、
不用跳出彈窗說‘密碼正確’

@D0n9X1n
Copy link
Owner

D0n9X1n commented Sep 8, 2019

Demo page 上是 callback 的测试,实际使用是没有弹窗的。

@D0n9X1n D0n9X1n closed this as completed Sep 8, 2019
@jerryc127
Copy link
Author

@MikeCoder
哦哦
因爲
我在本地http://localhost:4000 測試
有彈窗

@jerryc127
Copy link
Author

那個 應該是bug
沒看清楚彈窗文字
寫的是 ‘錯誤密碼’
但是 密碼是對了
image

@jerryc127
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants