跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
随机页面
特殊页面
参与编写
搜索
搜索
外观
登录
个人工具
登录
查看“︁MediaWiki:Citizen.js”︁的源代码
系统消息
讨论
English
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
刷新
常规
链入页面
相关更改
页面信息
外观
移至侧栏
隐藏
←
MediaWiki:Citizen.js
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
此页面为本wiki上的软件提供界面文本,并受到保护以防止滥用。 如欲修改所有wiki的翻译,请访问
translatewiki.net
上的MediaWiki本地化项目。
您无权编辑此JavaScript页面,因为编辑此页面可能会影响所有访问者。
您可以查看和复制此页面的源代码。
/* 这里所有JavaScript都会加载给Citizen皮肤的用户 */ // 添加powered by logo $(function () { // 插入 Citizen footer 图标 function ensureCitizenFooterIcon() { if ($('#footer-poweredbycitizenico').length) return; var $smw = $('#footer-poweredbysmwico'); if ($smw.length) { $smw.after( '<li id="footer-poweredbycitizenico">' + '<a href="https://github.com/StarCitizenTools/mediawiki-skins-Citizen" ' + 'class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled" ' + 'target="_blank">' + '<img src="/resources/assets/poweredby-citizen-dark.svg" alt="Powered by Citizen" width="88" height="31" loading="lazy">' + '</a>' + '</li>' ); } } ensureCitizenFooterIcon(); // 监听主题切换,更新图标 function updateCitizenIcon() { var theme = document.documentElement.classList.contains('skin-theme-clientpref-night') ? 'dark' : 'light'; var src = theme === 'dark' ? '/resources/assets/poweredby-citizen-dark.svg' : '/resources/assets/poweredby-citizen.svg'; $('#footer-poweredbycitizenico img').attr('src', src); } updateCitizenIcon(); var htmlObserver = new MutationObserver(updateCitizenIcon); htmlObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] }); });
返回
MediaWiki:Citizen.js
。
搜索
搜索
查看“︁MediaWiki:Citizen.js”︁的源代码
添加话题