User:Irukaza/common.js:修订间差异

H萌娘,万物皆可H的百科全书!
跳到导航 跳到搜索
imported>=海豚=
无编辑摘要
imported>=海豚=
无编辑摘要
第2行: 第2行:
document.querySelector("#footer-poweredbyico > a > img").srcset='';
document.querySelector("#footer-poweredbyico > a > img").srcset='';
document.querySelector("#footer-poweredbyico > a > img").src='https://hmoegirl.com/resources/assets/poweredby_mediawiki_132x47.png';
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;
}

2021年7月6日 (二) 08:41的版本

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;
}