From 37b5ff7165fb734897eb0a41edf966709b4d43ee Mon Sep 17 00:00:00 2001 From: "D. Rimron-Soutter" Date: Tue, 30 Dec 2025 16:52:12 +0000 Subject: [PATCH] Prevent flashbang on loading darkmode --- includes/Hooks.php | 21 +++++++++++++++++++ .../styles/nextbestnetwork/_loginext.scss | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index ac8609f..92dc638 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -87,6 +87,27 @@ class NextBestNetworkHooks { */ public static function onBeforePageDisplay( OutputPage $out, Skin $skin ) { if( $skin->getSkinName() == 'nextbestnetwork' ) { + $out->addHeadItem( 'nextbestnetwork-darkmode-init', ' + + ' ); + $config = \MediaWiki\MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'nextbestnetwork' ); $styles = []; diff --git a/resources/styles/nextbestnetwork/_loginext.scss b/resources/styles/nextbestnetwork/_loginext.scss index 2b5c698..71c02c2 100644 --- a/resources/styles/nextbestnetwork/_loginext.scss +++ b/resources/styles/nextbestnetwork/_loginext.scss @@ -33,4 +33,4 @@ .dropdown-menu > li#tw-createaccount > a:focus { color:#000; background-color:transparent; -} +} \ No newline at end of file