🤖修复朋友星港提出的通过主页点击会加载不出来的问题
This commit is contained in:
parent
02cd8fd52a
commit
9252a705d3
@ -1,5 +1,10 @@
|
|||||||
function initialize_fc_lite() {
|
function initialize_fc_lite() {
|
||||||
const root = document.getElementById('friend-circle-lite-root');
|
const root = document.getElementById('friend-circle-lite-root');
|
||||||
|
|
||||||
|
if (!root) return; // 确保根元素存在
|
||||||
|
|
||||||
|
// 清除之前的内容
|
||||||
|
root.innerHTML = '';
|
||||||
|
|
||||||
const randomArticleContainer = document.createElement('div');
|
const randomArticleContainer = document.createElement('div');
|
||||||
randomArticleContainer.id = 'random-article';
|
randomArticleContainer.id = 'random-article';
|
||||||
@ -195,9 +200,11 @@ function initialize_fc_lite() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
initialize_fc_lite();
|
setTimeout(initialize_fc_lite, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener('pjax:complete', function() {
|
document.addEventListener('pjax:complete', function() {
|
||||||
initialize_fc_lite();
|
setTimeout(initialize_fc_lite, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setTimeout(initialize_fc_lite, 0);
|
||||||
|
2
main/fclite.min.js
vendored
2
main/fclite.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user