MediaWiki:Common.js:修订间差异

来自泡泡学习笔记
跳到导航 跳到搜索
无编辑摘要
无编辑摘要
第16行: 第16行:


console.log('Hello, World!');
console.log('Hello, World!');
if(welement){
  element.innerHTML += '<p>BubbleStudy</p>';
}

2024年9月4日 (三) 13:58的版本

/* 这里的任何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"的元素
var welement = document.querySelector('.mw-parser-output');

console.log('Hello, World!');

if(welement){
  element.innerHTML += '<p>BubbleStudy</p>';
}