User:XiaoZhou/p-logo.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
$(function() {
var plogo = document.getElementById("p-logo");
if (logoimageurl == null)
{
logoimageurl = "http://upload.wikimedia.org/wikipedia/"
+ wgULS("zh/6/62/Wiki_zh-hans.png", "zh/b/bc/Wiki.png");
}
if ( navigator.appName == "Microsoft Internet Explorer" ) {
if ( navigator.appVersion.match("MSIE 7.0") == null) {
plogo.getElementsByTagName("span")[0].style.filter = "progid:DXImageTransform."
+ "Microsoft.AlphaImageLoader(src="
+ logoimageurl + ")";
}
else {
var a = plogo.firstChild;
a.style.backgroundImage = "url("
+ logoimageurl + ")";
}
}
else {
var a = plogo.getElementsByTagName("A")[0];
a.style.backgroundImage = "url("
+ logoimageurl + ")";
}
});