Source code
Revision control
Copy as Markdown
Other Tools
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
/* globals browser, embedHelperLib */
if (!window.smartblockDisqusShimInitialized) {
// Guard against this script running multiple times
window.smartblockDisqusShimInitialized = true;
// Get the script URL from the page. We can't hardcode it because the
// subdomain is site specific.
let scriptURL = document.querySelector(
'script[src*=".disqus.com/embed.js"]'
)?.src;
if (scriptURL) {
embedHelperLib.initEmbedShim({
shimId: "DisqusEmbed",
scriptURL,
embedSelector: "#disqus_thread",
isTestShim: false,
});
}
}