Skip to content

Commit

Permalink
switching from jquery to plain js
Browse files Browse the repository at this point in the history
  • Loading branch information
Robpol86 committed Jul 6, 2024
1 parent d3f3119 commit 0a25ae0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sphinx_disqus/_static/disqus.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
var disqus_config; // Accessed by embed.js
const SphinxDisqus = {
init: function () {
let disqus_thread = $("#disqus_thread"); // Disqus <div />
let disqus_shortname = disqus_thread.data('disqus-shortname');
let disqus_identifier = disqus_thread.data('disqus-identifier');
let disqus_thread = document.getElementById('disqus_thread'); // Disqus <div />
let disqus_shortname = disqus_thread.getAttribute('data-disqus-shortname');
let disqus_identifier = disqus_thread.getAttribute('data-disqus-identifier');

// Disqus universal code below: https://disqus.com/admin/install/platforms/universalcode/
disqus_config = function () {
Expand All @@ -16,6 +16,6 @@ const SphinxDisqus = {
},
};

$(document).ready(function () {
document.addEventListener('DOMContentLoaded', function () {
SphinxDisqus.init();
});

0 comments on commit 0a25ae0

Please sign in to comment.