User:Irukaza/common.js

H萌娘,万物皆可H的百科全书!
< User:Irukaza
imported>=海豚=2021年7月6日 (二) 08:41的版本
跳到导航 跳到搜索

注意:这类代码页面在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • 按住CTRL+SHIFT+DEL 或 ⌘-Shift-R来清除缓存!
  • 或尝试在地址栏的地址最后添加代码?_=1来访问最新页面。
    添加代码后的本页地址如下:-{R|https://hmoegirl.com/User:Irukaza/common.js?_=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;
}