“MediaWiki:Common.js”的版本间差异
来自仁王 wiki
第4行: | 第4行: | ||
div.style.backgroundColor = "steelblue"; | div.style.backgroundColor = "steelblue"; | ||
div.style.opacity = ".7"; | div.style.opacity = ".7"; | ||
− | div.style.width = " | + | div.style.width = "40px"; |
− | div.style.height = " | + | div.style.height = "40px"; |
div.innerHTML = '<a href="#" style="color:white">返回顶部</a>'; | div.innerHTML = '<a href="#" style="color:white">返回顶部</a>'; | ||
document.getElementById("mw-content-container").append(div); | document.getElementById("mw-content-container").append(div); |
2021年2月26日 (五) 12:03的版本
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */ console.log("已触发MediaWiki:Common.js"); var div = document.createElement("div"); div.style.backgroundColor = "steelblue"; div.style.opacity = ".7"; div.style.width = "40px"; div.style.height = "40px"; div.innerHTML = '<a href="#" style="color:white">返回顶部</a>'; document.getElementById("mw-content-container").append(div);