}
}
- /**
- * Check if the edit page is using OOUI controls
- * @return bool Always true
- * @deprecated since 1.30
- */
- public function isOouiEnabled() {
- wfDeprecated( __METHOD__, '1.30' );
- return true;
- }
-
/**
* Returns if the given content model is editable.
*
$script .= '});';
+ $nonce = $wgOut->getCSPNonce();
+ $wgOut->addScript( ResourceLoader::makeInlineScript( $script, $nonce ) );
+
$toolbar = '<div id="toolbar"></div>';
if ( Hooks::run( 'EditPageBeforeEditToolbar', [ &$toolbar ] ) ) {
// Only add the old toolbar cruft to the page payload if the toolbar has not
// been over-written by a hook caller
- $wgOut->addScript( ResourceLoader::makeInlineScript( $script ) );
+ $wgOut->addScript( ResourceLoader::makeInlineScript( $script, $nonce ) );
};
return $toolbar;