V-Net 2.0

Version 25.1 by Jiahao Lai on 2026/09/09 10:20
Warning: For security reasons, the document is displayed in restricted mode as it is not the current version. There may be differences and errors due to this.

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:V-Net 2\.0.WebHome]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

FAQ

A frequently asked questions (FAQ) list is often used in articles, websites, email lists, and online forums where common questions tend to recur. More FAQs

Video

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [xwiki:V-Net 2\.0.WebHome]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

 

// 监听DOM变化,聊天组件一旦渲染完成就自动打开
(function() {
    function openChatWidget() {
        const widget = document.getElementById('chat-widget');
        const toggleBtn = document.getElementById('toggle-chat-button');
        if (widget && toggleBtn && widget.style.display === 'none') {
            toggleBtn.click();
            return true;
        }
        return false;
    }

    // 页面完全加载后延迟1秒执行,等组件初始化
    if (document.readyState === 'complete') {
        setTimeout(openChatWidget, 1000);
    } else {
        window.addEventListener('load', () => setTimeout(openChatWidget, 1000));
    }

    // 兜底:监听整个页面DOM变化,异步渲染的组件也能捕获
    const observer = new MutationObserver(() => {
        if (openChatWidget()) observer.disconnect();
    });
    observer.observe(document.body, { childList: true, subtree: true });

    // 10秒后停止监听,避免资源浪费
    setTimeout(() => observer.disconnect(), 10000);
})();