User:DannyS712 test/shortdesc.js

Today, User:DannyS712 test/shortdesc.js is a topic that remains relevant and of interest to a wide audience. Whether due to its impact on society, its historical relevance, or its influence on popular culture, User:DannyS712 test/shortdesc.js continues to be a topic of constant debate and study. From its origins to the present, User:DannyS712 test/shortdesc.js has marked a milestone in different aspects of human life, and its importance remains undeniable. In this article, we will explore the multiple facets of User:DannyS712 test/shortdesc.js and its impact in various areas, with the intention of offering a complete and enriching look at this significant topic.
if ( mw.config.get( 'wgNamespaceNumber' ) === 0 && mw.config.get( 'wgAction' ) === 'view' ) {
	mw.loader.using( 'mediawiki.api' ).then( function () {
		// Adds a page description just below the "page title"
		// Behaves a lot like the mobile version
		var wgQid = mw.config.get( 'wgWikibaseItemId' ),
			api = new mw.Api(),
			callPromise = api.get( {
				action: 'query',
				titles: mw.config.get( 'wgTitle' ),
				prop: 'description',
				formatversion: 2
			} ),
			isEditor = mw.config.get( 'wgUserGroups' ).indexOf( 'autoconfirmed' ) !== -1;

		$.when( callPromise, $.ready ).then( function ( results ) {
			var pageDescription, $description,
				response = results;
			if (
				response.query &&
				response.query.pages &&
				response.query.pages.description
			) {
				pageDescription = response.query.pages.description;
				$description = $( '<span>' )
					.addClass( 'mw-page-description' )
					.text( pageDescription );
				if ( response.query.pages.descriptionsource !== 'local' && isEditor ) {
					$description.append(
						' (',
						$( '<a>' )
							.attr( 'href', 'https://www.wikidata.orghttps://wikifreehand.com/en/Special:SetLabelDescriptionAliases/' + wgQid + '/' + mw.config.get( 'wgContentLanguage' ) )
							.css( 'color', 'darkorange' )
							.text( 'Wikidata' ),
						')'
					);
				}
				$description.append( '. ' );
			} else if ( isEditor ) {
				$description = $( '<span>' )
					.css( 'color', 'red' )
					.append(
						'Missing ',
						$( '<a>' )
							.attr( 'href', 'https://wikifreehand.com/en/Template:Short_description' )
							.text( 'page description' ),
						'. '
					);
			}
			if ( $description ) {
				$( '#contentSub' ).prepend( $description );
			}
		} );
	} );
}