MediaWiki:Common.js:修订间差异

来自pm_wiki
跳转到导航 跳转到搜索
Bot(留言 | 贡献)
隐藏侧边栏工具链接
 
Bot(留言 | 贡献)
隐藏侧边栏工具链接(使用 window.onload)
 
第1行: 第1行:


/* 隐藏侧边栏工具链接 */
/* 隐藏侧边栏工具链接 */
(function() {
window.onload = function() {
     var ids = ['t-whatlinkshere', 't-recentchangeslinked', 't-specialpages', 't-print', 't-permalink', 't-info'];
     var ids = ['t-whatlinkshere', 't-recentchangeslinked', 't-specialpages', 't-print', 't-permalink', 't-info'];
     ids.forEach(function(id) {
     ids.forEach(function(id) {
第7行: 第7行:
         if (el) el.style.display = 'none';
         if (el) el.style.display = 'none';
     });
     });
})();
};

2026年11月3日 (二) 03:19的最新版本


/* 隐藏侧边栏工具链接 */
window.onload = function() {
    var ids = ['t-whatlinkshere', 't-recentchangeslinked', 't-specialpages', 't-print', 't-permalink', 't-info'];
    ids.forEach(function(id) {
        var el = document.getElementById(id);
        if (el) el.style.display = 'none';
    });
};