MediaWiki:Common.js:修订间差异
跳到导航
跳到搜索
无编辑摘要 |
无编辑摘要 |
||
第17行: | 第17行: | ||
if (welement) { | if (welement) { | ||
// 在元素中添加内容 | // 在元素中添加内容 | ||
welement.innerHTML += '<p>BubbleStudy | welement.innerHTML += '<p>BubbleStudy</p>'; | ||
} | } |
2024年9月4日 (三) 13:54的版本
/* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?3eb94dcc5d2d6e98d585d38032cf3b47";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
// 定位class为"my-class"的元素
const welement = document.querySelector('.mw-parser-output');
if (welement) {
// 在元素中添加内容
welement.innerHTML += '<p>BubbleStudy</p>';
}