-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 [fix] modify replacement rule for disqus short-name
Signed-off-by: chenxuanzzy <chenxsuan019@gmail.com>
- Loading branch information
1 parent
ce1b1cc
commit 07cfb29
Showing
1 changed file
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
<div id="disqus_thread"></div> | ||
<script nonce="<%= cspNonce %>"> | ||
var disqus_config = function () { | ||
this.page.identifier = window.location.pathname.split('/').slice(-1)[0]; | ||
}; | ||
(function() { | ||
var d = document, s = d.createElement('script'); | ||
s.src = 'https://<%= disqus.replace(/[^A-Za-z0-9]+/g, '') %>.disqus.com/embed.js'; | ||
s.setAttribute('data-timestamp', +new Date()); | ||
(d.head || d.body).appendChild(s); | ||
})(); | ||
var disqus_config = function () { | ||
this.page.identifier = window.location.pathname.split('/').slice(-1)[0]; | ||
}; | ||
(function() { | ||
var d = document, s = d.createElement('script'); | ||
s.src = 'https://<%= disqus.replace(/[^A-Za-z0-9-]+/g, '') %>.disqus.com/embed.js'; | ||
s.setAttribute('data-timestamp', +new Date()); | ||
(d.head || d.body).appendChild(s); | ||
})(); | ||
</script> | ||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> | ||
<noscript | ||
>Please enable JavaScript to view the | ||
<a href="https://disqus.com/?ref_noscript" | ||
>comments powered by Disqus.</a | ||
></noscript | ||
> |