summaryrefslogtreecommitdiff
path: root/layouts/partials/telegram_widget.html
diff options
context:
space:
mode:
authorReorx <novoreorx@gmail.com>2022-06-01 16:55:45 +0800
committerReorx <novoreorx@gmail.com>2022-06-01 16:55:45 +0800
commit0aa7a35ee0535a0ba5bdde7ed1a6c4fa12b3008d (patch)
treeeed2a48d020fc216f3bbcb9554a4397ae47de018 /layouts/partials/telegram_widget.html
parent66447d9a38d354f80f5dda2cd37a2701bb62d9b1 (diff)
add .comment-box class, comment system use id; remove unused comments_script.html
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')