1 <?php if (isset($providerData->data)) : ?>
2 <style>.giscus-frame {min-height: 16em;}</style>
4 function giscus_load(button) {
5 let script = document.createElement("script");
6 <?php foreach ($providerData->data as $key => $val) : ?>
7 script.setAttribute("data-<?=$key?>", <?php var_export($val)?>);
10 script.src = "//giscus.app/client.js";
11 button.parentNode.replaceChild(script, button);
14 <button class="activator" onclick="giscus_load(this)">Show Comments from Github Discussions</button>