mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-28 19:43:31 +08:00
Merge 758dc250c2
into 9e6b7b22a9
This commit is contained in:
commit
a7b28aee44
@ -21,8 +21,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function lazyLoadDisqusJS() {
|
function lazyLoadDisqusJS() {
|
||||||
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
|
const excludedHosts = ["localhost", "127.0.0.1"];
|
||||||
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
|
const hostname = window.location.hostname;
|
||||||
|
|
||||||
|
if (excludedHosts.includes(hostname)) {
|
||||||
|
document.getElementById('disqus_thread').innerHTML =
|
||||||
|
'Disqus comments not available by default when the website is previewed locally.';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,9 +18,10 @@
|
|||||||
proxy: {{- .proxy -}},
|
proxy: {{- .proxy -}},
|
||||||
});
|
});
|
||||||
(function () {
|
(function () {
|
||||||
if (
|
const excludedHosts = ["localhost", "127.0.0.1"];
|
||||||
["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1
|
const hostname = window.location.hostname;
|
||||||
) {
|
|
||||||
|
if (excludedHosts.includes(hostname)) {
|
||||||
document.getElementById("gitalk-container").innerHTML =
|
document.getElementById("gitalk-container").innerHTML =
|
||||||
"Gitalk comments not available by default when the website is previewed locally.";
|
"Gitalk comments not available by default when the website is previewed locally.";
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user