Skip to content

fix issue disqus plugin issue#318

Merged
QingWei-Li merged 2 commits intodocsifyjs:masterfrom
njleonzhang:patch-2
Nov 30, 2017
Merged

fix issue disqus plugin issue#318
QingWei-Li merged 2 commits intodocsifyjs:masterfrom
njleonzhang:patch-2

Conversation

@njleonzhang
Copy link
Copy Markdown
Contributor

@njleonzhang njleonzhang commented Nov 29, 2017

fix #317, disqus plugin make page refresh continuously.

location.href = location.href.replace('/-/', '/#/')

如果打开的是根目录,就会出现/ 会被route改成/#/,然后这句话由把href改回/无限循环了。
我简单做了个保护。。。单由于不太理解这句话的含义,所以也不知道这样改有没有副作用。我在我的环境里没测试出问题。

fix docsifyjs#317, disqus plugin make page refresh continuously.
@QingWei-Li
Copy link
Copy Markdown
Member

QingWei-Li commented Nov 30, 2017

emmm 因为 disqus 不支持 hashRouter 所以传过去的参数我写的是 /-/,点链接跳过来我再强转成 /#/...

@QingWei-Li QingWei-Li merged commit 041b33e into docsifyjs:master Nov 30, 2017
@njleonzhang
Copy link
Copy Markdown
Contributor Author

点链接跳过来, 你指的是disqus那边的链接么?大概明白了啊,呵呵

@njleonzhang njleonzhang deleted the patch-2 branch November 30, 2017 01:46
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 this pull request may close these issues.

2 participants