User:Irukaza/common.js
跳到导航
跳到搜索
注意:这类代码页面在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- 按住
CTRL+SHIFT+DEL 或 ⌘-Shift-R
来清除缓存! - 或尝试在地址栏的地址最后添加代码
?_=1
来访问最新页面。 - 你还可以在设置中勾选小工具在页面右上角添加清除缓存按钮!
mw.loader.load('https://www.hmoegirl.com/index.php?title=User:AT/js/UserStatus.js&action=raw&ctype=text/javascript');
document.querySelector("#footer-poweredbyico > a > img").srcset='';
document.querySelector("#footer-poweredbyico > a > img").src='https://hmoegirl.com/resources/assets/poweredby_mediawiki_132x47.png';
function buildSidebar() {
global $wgEnableSidebarCache, $wgSidebarCacheExpiry;
$that = $this;
$callback = function () use ( $that ) {
$bar = [];
//$that->addToSidebar( $bar, 'sidebar' );
Hooks::run( 'SkinBuildSidebar', [ $that, &$bar ] );
return $bar;
};
if ( $wgEnableSidebarCache ) {
$cache = ObjectCache::getMainWANInstance();
$sidebar = $cache->getWithSetCallback(
$cache->makeKey( 'sidebar', $this->getLanguage()->getCode() ),
MessageCache::singleton()->isDisabled()
? $cache::TTL_UNCACHEABLE // bug T133069
: $wgSidebarCacheExpiry,
$callback,
[ 'lockTSE' => 30 ]
);
} else {
$sidebar = $callback();
}
// Apply post-processing to the cached value
Hooks::run( 'SidebarBeforeOutput', [ $this, &$sidebar ] );
return $sidebar;
}