Skip to content

Commit

Permalink
fix(Disqus): script issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bkapustik committed Apr 22, 2024
1 parent 771a51e commit 276a8cf
Showing 1 changed file with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,25 @@
<div style="position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1000"></div>
<div id="disqus_thread" class="@Model.CssClass"></div>
<script>
var disqus_config = function () {
this.page.url = '@Model.Url';
this.page.identifier = '@Model.Identifier';
if ('@Model.Title' !== '') {
this.page.title = '@Model.Title';
}
};
try {
window.__tcfapi = window.__tcfapi || function () { };
(function () {
var d = document, s = d.createElement('script');
s.src = 'https://@(Model.Site).disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
var disqus_config = function () {
this.page.url = '@Model.Url';
this.page.identifier = '@Model.Identifier';
if ('@Model.Title' !== '') {
this.page.title = '@Model.Title';
}
};
(function () {
var d = document, s = d.createElement('script');
s.src = 'https://' + '@(Model.Site).disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
} catch (e) {
}
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
</div>
Expand All @@ -29,6 +34,8 @@ else
{
<div id="disqus_thread" class="@Model.CssClass"></div>
<script>
window.__tcfapi = window.__tcfapi || function () {
};
var disqus_config = function () {
this.page.url = '@Model.Url';
this.page.identifier = '@Model.Identifier';
Expand Down

0 comments on commit 276a8cf

Please sign in to comment.