[object HTMLHeadElement]

“MediaWiki:Common.js”的版本间的差异

删除403字节 、 2024年10月24日 (四) 11:32
无编辑摘要
第1行: 第1行:
/* 这里的任何JavaScript将为所有档案员在每次页面载入时加载。 */
function appendCSS(){
    var head = document.head || document.getElementsByTagName('head')[0];
    head += '<link rel="stylesheet" href="/extensions/Whiteverse/font/stylesheet.css" />';
    document.getElementsByTagName('head')[0].innerHTML += head;
}
appendCSS();


// 引入 Vis Timeline 库
// 引入 Vis Timeline 库
function appendTimeline(){
function appendTimeline() {
     var head = document.head || document.getElementsByTagName('head')[0];
     var script = document.createElement('script');
     head += '<script src="https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js"></script>';
     script.src = 'https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js';
     document.getElementsByTagName('head')[0].innerHTML += head;
     document.head.appendChild(script);
}
}
appendTimeline();
appendTimeline();
第27行: 第19行:
             return { id: index + 1, content: content.trim(), start: start.trim() };
             return { id: index + 1, content: content.trim(), start: start.trim() };
         }));
         }));
 
       
         // Configuration for the Timeline
         // Configuration for the Timeline
         const options = {};
         const options = {};
 
       
         // Create a Timeline
         // Create a Timeline
         const timeline = new vis.Timeline(container, items, options);
         const timeline = new vis.Timeline(container, items, options);
     }
     }
});
});
Copyright © 2014-2025 whiteverse.com,fandao.fun All Rights Reserved
Whiteverse Culture Creativity Co.,Ltd.
鲁ICP备16006260号