mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
Delete src/components/Twikoo.astro
This commit is contained in:
@@ -1,26 +0,0 @@
|
|||||||
<div id="tcomment"></div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
document.addEventListener('astro:page-load', () => {
|
|
||||||
function loadTwikoo() {
|
|
||||||
const commentsContainer = document.getElementById('tcomment');
|
|
||||||
if (commentsContainer) {
|
|
||||||
const script = document.createElement('script');
|
|
||||||
script.src = 'https://cdn.staticfile.org/twikoo/1.6.32/twikoo.all.min.js';
|
|
||||||
script.async = true;
|
|
||||||
script.onload = () => {
|
|
||||||
const initScript = document.createElement('script');
|
|
||||||
initScript.innerHTML = `
|
|
||||||
twikoo.init({
|
|
||||||
envId: 'http://47.108.235.131:40063/',
|
|
||||||
el: '#tcomment',
|
|
||||||
});
|
|
||||||
`;
|
|
||||||
document.body.appendChild(initScript);
|
|
||||||
};
|
|
||||||
document.body.appendChild(script);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
loadTwikoo();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
Reference in New Issue
Block a user