summaryrefslogtreecommitdiff
path: root/layouts/partials/telegram_widget.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/telegram_widget.html')
-rw-r--r--layouts/partials/telegram_widget.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/layouts/partials/telegram_widget.html b/layouts/partials/telegram_widget.html
index 1f614c7..786f19a 100644
--- a/layouts/partials/telegram_widget.html
+++ b/layouts/partials/telegram_widget.html
@@ -1,4 +1,6 @@
-<div class="telegram-widget-container"></div>
+<div class="comments-box">
+ <div id="telegram-widget-container"></div>
+</div>
<script>
(function() {
@@ -22,8 +24,9 @@
s.setAttribute(key, attrs[key]);
}
- const container = document.querySelector('.telegram-widget-container')
+ const container = document.querySelector('#telegram-widget-container')
container.innerHTML = '';
+ // telegram widget script must be added to the position where you want it to be displayed
container.appendChild(s);
})();
</script>
@@ -33,9 +36,6 @@
if (!toggleThemeCallbacks) {
return;
}
- if (document.getElementsByClassName('telegram-widget-container').length === 0) {
- return;
- }
toggleThemeCallbacks.push((isDark) => {
// console.log('window toggle-theme for telegram widget')