MediaWiki:Common.js:修订间差异
来自生物多样性知识平台
无编辑摘要 |
无编辑摘要 |
||
| 第11行: | 第11行: | ||
var logoLink = document.querySelector('#p-logo .mw-wiki-logo'); | var logoLink = document.querySelector('#p-logo .mw-wiki-logo'); | ||
if (logoLink) { | if (logoLink) { | ||
logoLink.href = "https:// | logoLink.href = "https://www.biodiversity.cern.ac.cn"; | ||
} | } | ||
// 更改标题链接 | // 更改标题链接 | ||
var titleLink = document.querySelector('#p-logo .mw-wiki-title'); | var titleLink = document.querySelector('#p-logo .mw-wiki-title'); | ||
if (titleLink) { | if (titleLink) { | ||
titleLink.href = "https:// | titleLink.href = "https://www.biodiversity.cern.ac.cn"; | ||
} | } | ||
}); | }); | ||
2024年6月18日 (二) 07:14的版本
/* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */
$(document).ready(function() {
$('.gallery a.image').each(function() {
var href = $(this).attr('href');
// 修改链接以指向直接的图片浏览器查看模式
$(this).attr('href', href + '?action=render');
});
// 更改Logo链接
var logoLink = document.querySelector('#p-logo .mw-wiki-logo');
if (logoLink) {
logoLink.href = "https://www.biodiversity.cern.ac.cn";
}
// 更改标题链接
var titleLink = document.querySelector('#p-logo .mw-wiki-title');
if (titleLink) {
titleLink.href = "https://www.biodiversity.cern.ac.cn";
}
});