<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://demo.wikimedia.ch/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Valerio+Bozzolan</id>
	<title>Minipedia - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://demo.wikimedia.ch/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Valerio+Bozzolan"/>
	<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/wiki/Special:Contributions/Valerio_Bozzolan"/>
	<updated>2026-05-25T22:59:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini_advanced:Sun&amp;diff=115</id>
		<title>Mini advanced:Sun</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini_advanced:Sun&amp;diff=115"/>
		<updated>2025-05-16T16:48:28Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Cassini-science-br.jpg|thumb|Graphical representation of the deflection by the Sun's gravitational field of a radio wave sent by the Cassini probe.]]&lt;br /&gt;
[[File:The Sun by the Atmospheric Imaging Assembly of NASA's Solar Dynamics Observatory - 20100819.jpg|thumb|The Sun, by the Atmospheric imagery.]]&lt;br /&gt;
The Sun is the predominant star at the center of our Solar System, characterized as a massive, nearly perfect sphere of hot plasma. Its energy is generated through nuclear fusion reactions occurring in its core, where hydrogen nuclei combine to form helium, releasing vast amounts of energy in the process. This energy radiates from the Sun's surface primarily as visible light and infrared radiation, with approximately 10% emitted as ultraviolet radiation. The Sun serves as the essential energy source for life on Earth and has been a significant object of veneration and study across various cultures and scientific disciplines throughout history.&lt;br /&gt;
&lt;br /&gt;
The Sun orbits the Galactic Center at a distance ranging from approximately 24,000 to 28,000 light-years. Its distance from Earth defines the astronomical unit (AU), which is about 93 million miles or roughly 8 light-minutes. The Sun's diameter is approximately 1.39 million kilometers (about 864,000 miles), making it roughly 109 times the diameter of Earth. In terms of mass, the Sun is about 330,000 times that of Earth, constituting approximately 99.86% of the total mass of the Solar System. The composition of the Sun is predominantly hydrogen (around 73%), followed by helium (approximately 25%), with trace amounts of heavier elements such as oxygen, carbon, neon, and iron.&lt;br /&gt;
&lt;br /&gt;
Classified as a G-type main-sequence star (G2V), the Sun is often referred to as a yellow dwarf, although its emitted light is actually white. The formation of the Sun occurred approximately 4.6 billion years ago through the gravitational collapse of matter within a large molecular cloud. Most of this material coalesced at the center, while the remaining matter formed an orbiting protoplanetary disk that eventually gave rise to the Solar System. As the central mass became increasingly hot and dense, it initiated nuclear fusion in its core, a process that fuses about 600 billion kilograms of hydrogen into helium every second, converting approximately 4 billion kilograms of matter into energy.&lt;br /&gt;
&lt;br /&gt;
In an estimated 4 to 7 billion years, as hydrogen fusion in the Sun's core diminishes, the Sun will no longer maintain hydrostatic equilibrium. This will result in a significant increase in core density and temperature, leading to the expansion of its outer layers and the transformation of the Sun into a red giant. Following this red giant phase, theoretical models suggest that the Sun will expel its outer layers, ultimately becoming a dense, cooling remnant known as a white dwarf. Although it will cease to produce energy through fusion, the white dwarf will continue to emit residual heat and light for potentially trillions of years. Eventually, it is hypothesized that the Sun will evolve into a super dense black dwarf, emitting negligible energy.&lt;br /&gt;
&lt;br /&gt;
The Sun is a remarkable and vital component of our universe, playing an indispensable role in the sustenance of life on Earth and serving as a focal point for astronomical research and understanding of stellar evolution.&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.css&amp;diff=114</id>
		<title>MediaWiki:Gadget-minipedia.css</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.css&amp;diff=114"/>
		<updated>2025-05-16T16:46:03Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: apply logo to more namespaces&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/**&lt;br /&gt;
 * Stylesheet applied only if we are on Minipedia pages&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Change the website logo&lt;br /&gt;
 *&lt;br /&gt;
 * This will allow some kind of visual separation between the normal wiki and&lt;br /&gt;
 * its mini version.&lt;br /&gt;
 *&lt;br /&gt;
 * The logo should not differ so much from the original. It should be just&lt;br /&gt;
 * a cosmetic change.&lt;br /&gt;
 *&lt;br /&gt;
 * [[File:MinipediA coconut noun simple logo.png]]&lt;br /&gt;
 */&lt;br /&gt;
.ns-3002 #p-logo .mw-wiki-logo,&lt;br /&gt;
.ns-3003 #p-logo .mw-wiki-logo,&lt;br /&gt;
.ns-3004 #p-logo .mw-wiki-logo,&lt;br /&gt;
.ns-3005 #p-logo .mw-wiki-logo,&lt;br /&gt;
.ns-3006 #p-logo .mw-wiki-logo,&lt;br /&gt;
.ns-3007 #p-logo .mw-wiki-logo&lt;br /&gt;
{&lt;br /&gt;
	background-image: url(&amp;quot;/images/5/57/MinipediA_coconut_noun_simple_logo.png&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Improve accessibility&lt;br /&gt;
 *&lt;br /&gt;
 * The font-size is increased from 0.875em to increase readability.&lt;br /&gt;
 */&lt;br /&gt;
.ns-3002 .mw-body-content {&lt;br /&gt;
	font-size: 1.2em;&lt;br /&gt;
}&lt;br /&gt;
.ns-3003 .mw-body-content {&lt;br /&gt;
	font-size: 1.2em;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=113</id>
		<title>MediaWiki:Gadget-minipedia.js</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=113"/>
		<updated>2025-05-16T16:38:56Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: refactor createTitle()&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/**&lt;br /&gt;
 * Make Minipedia magics&lt;br /&gt;
 *&lt;br /&gt;
 * Dependencies: mediawiki.util&lt;br /&gt;
 * Author: 2020-2025 [[User:ValerioBoz-WMCH]]&lt;br /&gt;
 *&lt;br /&gt;
 * See https://phabricator.wikimedia.org/tag/minipedia/&lt;br /&gt;
 */&lt;br /&gt;
( function ( mw, $ ) {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * CONFIGURATION/LOCALIZATION INSTRUCTIONS&lt;br /&gt;
	 *&lt;br /&gt;
	 * Declare somewhere something like this:&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // assure that you do not overwrite other-people customizations&lt;br /&gt;
	 *   window.MiniPedia      = window.MiniPedia      || {};&lt;br /&gt;
	 *   window.MiniPedia.L10N = window.MiniPedia.L10N || {};&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // then customize something&lt;br /&gt;
 	 *   window.MiniPedia.editIntro      = 'Project:How to create';&lt;br /&gt;
	 *   window.MiniPedia.L10N.minipedia = 'Otherpedia';&lt;br /&gt;
	 */&lt;br /&gt;
&lt;br /&gt;
	// load localization defaults&lt;br /&gt;
	var DEFAULTS = {&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespace: 'Mini',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceNum: 3002,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediate: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediateNum: 3004,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvanced: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvancedNum: 3006,&lt;br /&gt;
&lt;br /&gt;
		// default edit intro page title&lt;br /&gt;
		editIntro: 'Progetto:Minipedia/Creazione voce',&lt;br /&gt;
&lt;br /&gt;
		// how much characters should have a word to be considered too much lon&lt;br /&gt;
		// this somehow help people with dyslexia&lt;br /&gt;
		longWordLen: 13,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of acceptable complex words to help people with dyslexia&lt;br /&gt;
		maxComplexWords: 10,&lt;br /&gt;
&lt;br /&gt;
		// min and max number of suggested words to somehow mitigate attention span problems&lt;br /&gt;
		maxWords: 700,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of suggested newlines&lt;br /&gt;
		maxTotalLines: 180,&lt;br /&gt;
&lt;br /&gt;
		// localization stuff&lt;br /&gt;
		L10N: {&lt;br /&gt;
			minipedia: &amp;quot;Minipedia&amp;quot;,&lt;br /&gt;
			minipediaShort: &amp;quot;Mini&amp;quot;,&lt;br /&gt;
			minipediaShortIntermediate: &amp;quot;Intermediate&amp;quot;,&lt;br /&gt;
			minipediaShortAdvanced: &amp;quot;Advanced&amp;quot;,&lt;br /&gt;
			normalpedia: &amp;quot;Wikipedia Test&amp;quot;,&lt;br /&gt;
			normalpediaShort: &amp;quot;WikipediaTest&amp;quot;,&lt;br /&gt;
			openMinipedia: &amp;quot;Apri Minipedia&amp;quot;,&lt;br /&gt;
			openMinipediaIntermediate: &amp;quot;Open Minipedia Intermediate&amp;quot;,&lt;br /&gt;
			openMinipediaAdvanced: &amp;quot;Open Minipedia Advanced&amp;quot;,&lt;br /&gt;
			openNormalpedia: &amp;quot;Apri Wikipedia Test&amp;quot;,&lt;br /&gt;
			createMinipediaPageTitle: &amp;quot;Accesso Minipedia&amp;quot;,&lt;br /&gt;
			createMinipediaPageBody: &amp;quot;Sii il primo a creare una versione più ridotta e più accessibile di questa voce, in Minipedia!&amp;quot;,&lt;br /&gt;
			statsTitle: &amp;quot;Mini Report&amp;quot;,&lt;br /&gt;
			statsHeadingSubject: &amp;quot;Fattore&amp;quot;,&lt;br /&gt;
			statsHeadingValue: &amp;quot;Valore attuale&amp;quot;,&lt;br /&gt;
			statsHeadingExpected: &amp;quot;Limite consigliato&amp;quot;,&lt;br /&gt;
			statsHeadingSimplicity: &amp;quot;Semplicità&amp;quot;,&lt;br /&gt;
			statsWords: &amp;quot;Parole&amp;quot;,&lt;br /&gt;
			statsLines: &amp;quot;Paragrafi&amp;quot;,&lt;br /&gt;
			statsComplexWords: &amp;quot;Parole complesse&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// global configuration&lt;br /&gt;
	window.MiniPedia = window.MiniPedia || {};&lt;br /&gt;
&lt;br /&gt;
	// shortcut&lt;br /&gt;
	var mp = window.MiniPedia;&lt;br /&gt;
&lt;br /&gt;
	// inherit default configurations&lt;br /&gt;
	$.extend( true, mp, DEFAULTS );&lt;br /&gt;
&lt;br /&gt;
	// another shortcut&lt;br /&gt;
	var L10N = mp.L10N;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Lazy shortcut to obtain just the first API result&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param  {Object} response API Response&lt;br /&gt;
	 * @return {Object} page object&lt;br /&gt;
	 */&lt;br /&gt;
	function justFirstQueryPage( response ) {&lt;br /&gt;
&lt;br /&gt;
		// no response no party&lt;br /&gt;
		if( !response.query || !response.query.pages ) {&lt;br /&gt;
			throw 'no valid API response';&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// the list should contain just one page&lt;br /&gt;
		var pages = response.query.pages;&lt;br /&gt;
		for( var id in pages ) {&lt;br /&gt;
			return pages[ id ];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// no page no party&lt;br /&gt;
		return false;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get a fresh MediaWiki API object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return mw.Api&lt;br /&gt;
	 */&lt;br /&gt;
	function mwApi() {&lt;br /&gt;
		return mw.loader.using( 'mediawiki.api' ).then( function() {&lt;br /&gt;
			return new mw.Api();&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if a page title already exists&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param title Page title&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function pageExists( title ) {&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'info',&lt;br /&gt;
			titles: title,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// eventually load API stuff&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request&lt;br /&gt;
			return api.get( request ).then( function ( response ) {&lt;br /&gt;
&lt;br /&gt;
				// check if it exists&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 ) {&lt;br /&gt;
					return page;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				return false;&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query the current page plain text&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page name (or none for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryPlainText( pageName ) {&lt;br /&gt;
&lt;br /&gt;
		// complete page title with namespace&lt;br /&gt;
		pageName = pageName || mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		// See https://phabricator.wikimedia.org/T259332&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'extracts',&lt;br /&gt;
			titles: pageName,&lt;br /&gt;
			explaintext: 1,&lt;br /&gt;
			exlimit: 1,&lt;br /&gt;
			exsectionformat: 'plain',&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// this will return a Promise resolving the page plain text, returned upstream&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request and return a Promise&lt;br /&gt;
			return api.get( request ).then( function( response ) {&lt;br /&gt;
&lt;br /&gt;
				// resolve the Promise with the page content&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 &amp;amp;&amp;amp; page.extract ) {&lt;br /&gt;
					return page.extract;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// no content&lt;br /&gt;
				return false;&lt;br /&gt;
&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Create a new Mini namespace object.&lt;br /&gt;
	 */&lt;br /&gt;
	function Mini(ns, shortLabel, openLabel, emoji) {&lt;br /&gt;
		this.ns = ns;&lt;br /&gt;
		this.shortLabel = shortLabel;&lt;br /&gt;
		this.openLabel = openLabel;&lt;br /&gt;
		this.emoji = emoji;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if the current namespace is mine.&lt;br /&gt;
	 * @return boolean&lt;br /&gt;
	 */&lt;br /&gt;
	Mini.prototype.isCurrentNamespace = function() {&lt;br /&gt;
		return this.ns == mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @return mw.Title&lt;br /&gt;
	 */&lt;br /&gt;
	Mini.prototype.createTitle = function(pageName) {&lt;br /&gt;
		var pageName = pageName || mw.config.get( 'wgTitle' );&lt;br /&gt;
		return new mw.Title(pageName, this.ns);&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Register a namespace portlet button.&lt;br /&gt;
	 */&lt;br /&gt;
	Mini.prototype.registerPortlet = function() {&lt;br /&gt;
		// Don't load on this very same namespace.&lt;br /&gt;
		if (this.isCurrentNamespace()) {&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// Normal page title and mini version.&lt;br /&gt;
		var mwTitle = this.createTitle();&lt;br /&gt;
		var portlet = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			mwTitle.getUrl(),&lt;br /&gt;
			this.emoji + ' ' + this.shortLabel,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			this.openLabel,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		var that = this;&lt;br /&gt;
		$(portlet).click( function(e) {&lt;br /&gt;
			that.onPortletClick(e);&lt;br /&gt;
		} );&lt;br /&gt;
&lt;br /&gt;
		return portlet;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onPortletClick = function(e) {&lt;br /&gt;
		var pageTitle = this.createTitle();&lt;br /&gt;
		var miniPageName = pageTitle.getPrefixedText();&lt;br /&gt;
		var miniPageUrl = pageTitle.getUrl();&lt;br /&gt;
		var that = this;&lt;br /&gt;
		// wait for multiple information&lt;br /&gt;
		$.when(&lt;br /&gt;
			// check if the page really exists&lt;br /&gt;
			pageExists( miniPageName ),&lt;br /&gt;
&lt;br /&gt;
			   // allow to open OO UI windows&lt;br /&gt;
			   mw.loader.using( 'oojs-ui-windows' )&lt;br /&gt;
&lt;br /&gt;
			   // callback fired when we have all the information&lt;br /&gt;
		).done( function( miniPageExists, loader ) {&lt;br /&gt;
&lt;br /&gt;
			// check if the page already exist&lt;br /&gt;
			if( miniPageExists ) {&lt;br /&gt;
&lt;br /&gt;
				// just redirect to the Minipedia version&lt;br /&gt;
				window.location = miniPageUrl;&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// ask if you want to create the page&lt;br /&gt;
&lt;br /&gt;
				// create message dialog window&lt;br /&gt;
				var messageDialog = new OO.ui.MessageDialog();&lt;br /&gt;
				var windowManager = new OO.ui.WindowManager();&lt;br /&gt;
				$( 'body' ).append( windowManager.$element );&lt;br /&gt;
				windowManager.addWindows( [ messageDialog ] );&lt;br /&gt;
&lt;br /&gt;
				// configure and open dialog&lt;br /&gt;
				var windowInstance = windowManager.openWindow( messageDialog, {&lt;br /&gt;
					title:   L10N.createMinipediaPageTitle,&lt;br /&gt;
					message: L10N.createMinipediaPageBody,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// check if you accepted the page creation&lt;br /&gt;
				windowInstance.closed.then( function ( data ) {&lt;br /&gt;
					// user is confirming the action&lt;br /&gt;
					if( data.action === 'accept' ) {&lt;br /&gt;
						// go go go! to mini&lt;br /&gt;
						that.onMinipediaConfirmation();&lt;br /&gt;
					}&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
			// end if page exists&lt;br /&gt;
		} );&lt;br /&gt;
		// end $.when()&lt;br /&gt;
&lt;br /&gt;
		// avoid scrolling to the top&lt;br /&gt;
		e.preventDefault();&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onMinipediaConfirmation = function() {&lt;br /&gt;
		/**&lt;br /&gt;
		 * Go to the Minipedia page in edit mode&lt;br /&gt;
		 *&lt;br /&gt;
		 * The page in the main namespace will be preloaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 */&lt;br /&gt;
		var mwTitle = this.createTitle();&lt;br /&gt;
		var miniPageName = mwTitle.getPrefixedText();&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Build the query string to edit a page&lt;br /&gt;
		 *&lt;br /&gt;
		 * TODO: eventually add VisualEditor support&lt;br /&gt;
		 */&lt;br /&gt;
		var editPageQueryString = {&lt;br /&gt;
			action: 'edit',&lt;br /&gt;
			title: miniPageName,&lt;br /&gt;
			preload: pageName,&lt;br /&gt;
			editintro: mp.editIntro,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// '/index.php'&lt;br /&gt;
		var wgScript = mw.config.get( 'wgScript' );&lt;br /&gt;
&lt;br /&gt;
		// go to the edit page URL&lt;br /&gt;
		window.location = wgScript + '?' + $.param( editPageQueryString );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the wiki&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareNormalpedia() {&lt;br /&gt;
		var miniElementary = new Mini(&lt;br /&gt;
		  mp.namespaceNum,&lt;br /&gt;
		  L10N.minipediaShort,&lt;br /&gt;
		  L10N.openMinipedia,&lt;br /&gt;
		  '🐣');&lt;br /&gt;
		var miniIntermediate = new Mini(&lt;br /&gt;
		  mp.namespaceIntermediateNum,&lt;br /&gt;
		  L10N.minipediaShortIntermediate,&lt;br /&gt;
		  L10N.openMinipediaIntermediate,&lt;br /&gt;
		  '📚');&lt;br /&gt;
		var miniAdvanced = new Mini(&lt;br /&gt;
		  mp.namespaceAdvancedNum,&lt;br /&gt;
		  L10N.minipediaShortAdvanced,&lt;br /&gt;
		  L10N.openMinipediaAdvanced,&lt;br /&gt;
		  '🔬');&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var miniVersionPortletLink = miniElementary.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Intermediate&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkIntermediate = miniIntermediate.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Advanced&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkAdvanced = miniAdvanced.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareNormalWiki()&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Calculate some stats over a text&lt;br /&gt;
	 */&lt;br /&gt;
	function textStats( text ) {&lt;br /&gt;
&lt;br /&gt;
		var stats = {};&lt;br /&gt;
&lt;br /&gt;
		text = text.trim();&lt;br /&gt;
&lt;br /&gt;
		// count long words&lt;br /&gt;
		var totalLongWords = 0;&lt;br /&gt;
		var word, words = text.split( /\s+/ );&lt;br /&gt;
		for( var i = 0; i &amp;lt; words.length; i++ ) {&lt;br /&gt;
			word = words[i];&lt;br /&gt;
			if( word.length &amp;gt; mp.longWordLen ) {&lt;br /&gt;
				totalLongWords++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// total amount of paragraphs&lt;br /&gt;
		// paragraphs shorter than this comment are discarded&lt;br /&gt;
		var totalLines = 0;&lt;br /&gt;
		var paragraphs = text.split( /\n+/ );&lt;br /&gt;
		var paragraph;&lt;br /&gt;
		for( var i = 0; i &amp;lt; paragraphs.length; i++ ) {&lt;br /&gt;
			paragraph = paragraphs[i].trim();&lt;br /&gt;
			if( paragraph.length &amp;gt; 30 ) {&lt;br /&gt;
				totalLines++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// how much lines?&lt;br /&gt;
		stats.totalLines = totalLines;&lt;br /&gt;
&lt;br /&gt;
		// how much words?&lt;br /&gt;
		stats.totalWords = words.length;&lt;br /&gt;
&lt;br /&gt;
		// how much of these words are so much long?&lt;br /&gt;
		// See 'longWordLen'&lt;br /&gt;
		stats.totalLongWords = totalLongWords;&lt;br /&gt;
&lt;br /&gt;
		return stats;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query content stats of the current page&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page title (or nothing for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryContentStats( pageTitle ) {&lt;br /&gt;
		return queryPlainText( pageTitle ).then( textStats );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Apply a stupid percentage&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {int} a&lt;br /&gt;
	 * @param {int} b&lt;br /&gt;
	 * @return The 'b%' applied to 'a'&lt;br /&gt;
	 */&lt;br /&gt;
	function applyPercentage( a, b ) {&lt;br /&gt;
		return parseInt( a * b / 100 );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia stats box&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipediaStatsBox() {&lt;br /&gt;
&lt;br /&gt;
		// normal page title (non-mini version)&lt;br /&gt;
		var mainPageTitle = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// body container&lt;br /&gt;
		var $contentText = $( '#mw-content-text' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the DOM tree&lt;br /&gt;
		var $container = $( '&amp;lt;div&amp;gt;' );&lt;br /&gt;
		var $table = $( '&amp;lt;table&amp;gt;' );&lt;br /&gt;
		var $thead = $( '&amp;lt;thead&amp;gt;' );&lt;br /&gt;
		var $tbody = $( '&amp;lt;tbody&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the stats container&lt;br /&gt;
		$container.addClass( 'minipedia-stats' );&lt;br /&gt;
&lt;br /&gt;
		// put a title&lt;br /&gt;
		$container.append( $( '&amp;lt;h2&amp;gt;' ).text( L10N.statsTitle ) );&lt;br /&gt;
&lt;br /&gt;
		// put the table&lt;br /&gt;
		$container.append( $table );&lt;br /&gt;
&lt;br /&gt;
		// add table headers&lt;br /&gt;
		$thead.append(&lt;br /&gt;
			$( '&amp;lt;tr&amp;gt;' ).append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSubject    ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingValue      ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingExpected   ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSimplicity ) )&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// prepare the table&lt;br /&gt;
		$table.addClass( 'wikitable' )&lt;br /&gt;
		      .append( $thead )&lt;br /&gt;
		      .append( $tbody );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Append a row (with a label and a value) into a table&lt;br /&gt;
		 *&lt;br /&gt;
		 * The data argument accepts an object with:&lt;br /&gt;
		 *&lt;br /&gt;
		 *   className:        Class name for the row&lt;br /&gt;
		 *   label:            Text displayed in row heading (left)&lt;br /&gt;
		 *   text:             Text displayed in row data (right)&lt;br /&gt;
		 *   value             Value associated to the text of the mini version&lt;br /&gt;
		 *   maxValue          Maximum suggested value&lt;br /&gt;
		 *   upstreamValue     The value of the upstream (main) version&lt;br /&gt;
		 *   upstreamLimitPerc The percentage (0-100) applied to the 'upstreamValue' to inherit a suitable 'maxValue'&lt;br /&gt;
		 *&lt;br /&gt;
		 * Note: this function uses OOUI widgets. Make sure to have them loaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 * @param {Object} jQuery table&lt;br /&gt;
		 * @param {Object} Data information&lt;br /&gt;
		 */&lt;br /&gt;
		function appendTableStatsRow( $table, data ) {&lt;br /&gt;
&lt;br /&gt;
			// read arguments&lt;br /&gt;
			var className = data.className;&lt;br /&gt;
			var label     = data.label;&lt;br /&gt;
			var value     = data.value;&lt;br /&gt;
			var maxValue  = data.maxValue;&lt;br /&gt;
			var text      = data.text || value;&lt;br /&gt;
&lt;br /&gt;
			// eventually calculate the max value&lt;br /&gt;
			if( !maxValue &amp;amp;&amp;amp; data.upstreamValue &amp;amp;&amp;amp; data.upstreamLimitPerc ) {&lt;br /&gt;
				maxValue = applyPercentage( data.upstreamValue, data.upstreamLimitPerc );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// prepare table stats row&lt;br /&gt;
			var $tr         = $( '&amp;lt;tr&amp;gt;' );&lt;br /&gt;
			var $tdLabel    = $( '&amp;lt;td&amp;gt;' ).text( label    );&lt;br /&gt;
			var $tdValue    = $( '&amp;lt;td&amp;gt;' ).text( text     );&lt;br /&gt;
			var $tdMax      = $( '&amp;lt;td&amp;gt;' ).text( maxValue );&lt;br /&gt;
			var $tdProgress = $( '&amp;lt;td&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
			// build the table row&lt;br /&gt;
			$tr.addClass( 'minipedia-stats-row-' + className );&lt;br /&gt;
			$tr.append( $tdLabel    )&lt;br /&gt;
			   .append( $tdValue    )&lt;br /&gt;
			   .append( $tdMax      )&lt;br /&gt;
			   .append( $tdProgress );&lt;br /&gt;
&lt;br /&gt;
			// if possible, plot a cute progress bar&lt;br /&gt;
			if( maxValue ) {&lt;br /&gt;
&lt;br /&gt;
				// calculate a 0-100 progress since the value and maxValue&lt;br /&gt;
				var realPercentage = parseInt( value / maxValue * 100 );&lt;br /&gt;
&lt;br /&gt;
				/**&lt;br /&gt;
				 * Calculate the inverse percentage&lt;br /&gt;
				 *&lt;br /&gt;
				 * This is the final percentage shown to the user.&lt;br /&gt;
				 *&lt;br /&gt;
				 * In short, it's always 100% but if you go over&lt;br /&gt;
				 * the limit it start decreasing and reaching zero,&lt;br /&gt;
				 * to rappresent a kind of 'understanding degradation'.&lt;br /&gt;
				 *&lt;br /&gt;
				 * To do not underrate the work of the user it should not go&lt;br /&gt;
				 * below a certain minimum amount. Example: 10%. :^)&lt;br /&gt;
				 *&lt;br /&gt;
				 * Actually the function is just linear.&lt;br /&gt;
				 */&lt;br /&gt;
				var inversePercentage = 100;&lt;br /&gt;
				if( realPercentage &amp;gt; 100 ) {&lt;br /&gt;
					inversePercentage = Math.max( 10, 200 - realPercentage );&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// generate the progress bar&lt;br /&gt;
				var progressBar = new OO.ui.ProgressBarWidget( {&lt;br /&gt;
					progress: inversePercentage,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// show the progress bar&lt;br /&gt;
				$tdProgress.append( progressBar.$element );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// attach some data to be read by scripts&lt;br /&gt;
			$tr.data( 'ministats', data );&lt;br /&gt;
&lt;br /&gt;
			// eventually emphasize if something is wrong&lt;br /&gt;
			if( value &amp;amp;&amp;amp; maxValue &amp;amp;&amp;amp; value &amp;gt; maxValue ) {&lt;br /&gt;
				$tr.addClass( 'minipedia-stats-row-problem' );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// show the row in the stats table&lt;br /&gt;
			$table.append( $tr );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// request multiple stuff at the same time&lt;br /&gt;
		$.when(&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the current mini page&lt;br /&gt;
			queryContentStats(),&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the related non-mini page&lt;br /&gt;
			queryContentStats( mainPageTitle ),&lt;br /&gt;
&lt;br /&gt;
			// require the progress bar widget&lt;br /&gt;
			mw.loader.using( 'oojs-ui-widgets' )&lt;br /&gt;
&lt;br /&gt;
		// callback fired when we have all the information&lt;br /&gt;
		).done( function( statsMini, statsMain, mwLoader ) {&lt;br /&gt;
&lt;br /&gt;
			// show the stats container at the bottom of the page when we have something&lt;br /&gt;
			$contentText.append( $container );&lt;br /&gt;
&lt;br /&gt;
			// check if we have also some information from the main namespace&lt;br /&gt;
			// in this case we can do a comparison&lt;br /&gt;
			if( statsMain ) {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they can be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'long-words',&lt;br /&gt;
					label:             L10N.statsComplexWords,&lt;br /&gt;
					value:             statsMini.totalLongWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalLongWords,&lt;br /&gt;
					upstreamLimitPerc: 10,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'words',&lt;br /&gt;
					label:             L10N.statsWords,&lt;br /&gt;
					value:             statsMini.totalWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalWords,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'lines',&lt;br /&gt;
					label:             L10N.statsLines,&lt;br /&gt;
					value:             statsMini.totalLines,&lt;br /&gt;
					maxValue:          statsMain.totalLines,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			// there is no the related main page&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they cannot be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'long-words',&lt;br /&gt;
					label:     L10N.statsComplexWords,&lt;br /&gt;
					value:     statsMini.totalLongWords,&lt;br /&gt;
					maxValue:  mp.maxComplexWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'words',&lt;br /&gt;
					label:     L10N.statsWords,&lt;br /&gt;
					value:     statsMini.totalWords,&lt;br /&gt;
					maxValue:  mp.maxStatsWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'lines',&lt;br /&gt;
					label:      L10N.statsLines,&lt;br /&gt;
					value:      statsMini.totalLines,&lt;br /&gt;
					maxValue:   mp.maxTotalLines,&lt;br /&gt;
				} );&lt;br /&gt;
			}&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia namespace&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipedia() {&lt;br /&gt;
&lt;br /&gt;
		// action of the page (edit, view etc.)&lt;br /&gt;
		var action = mw.config.get( 'wgAction' );&lt;br /&gt;
&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Normalpedia title object&lt;br /&gt;
		var normalTitleObject = new mw.Title( pageName );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var normalPageName = normalTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var normalPageUrl = normalTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var normalVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			normalPageUrl,&lt;br /&gt;
			L10N.normalpediaShort,&lt;br /&gt;
			'ca-normalpedia',&lt;br /&gt;
			L10N.openNormalpedia&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// check if we are in view mode&lt;br /&gt;
		if( action === 'view' ) {&lt;br /&gt;
&lt;br /&gt;
			// in view mode we can fetch the stats&lt;br /&gt;
			prepareMinipediaStatsBox();&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareMinipedia()&lt;br /&gt;
&lt;br /&gt;
	// work only in the main namespace&lt;br /&gt;
	var ns = mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	if( ns === 0 ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
	} else if( ns == mp.namespaceNum || ns == mp.namespaceIntermediateNum || ns == mp.namespaceAdvancedNum  ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
		prepareMinipedia();&lt;br /&gt;
	}&lt;br /&gt;
	// end namespace zero check&lt;br /&gt;
&lt;br /&gt;
} )( mw, $ );&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=112</id>
		<title>MediaWiki:Gadget-minipedia.js</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=112"/>
		<updated>2025-05-16T16:28:58Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: show Advanced Portlet also in Medium namespace, etc., show Medium portlet in Advanced namespace, etc.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/**&lt;br /&gt;
 * Make Minipedia magics&lt;br /&gt;
 *&lt;br /&gt;
 * Dependencies: mediawiki.util&lt;br /&gt;
 * Author: 2020-2025 [[User:ValerioBoz-WMCH]]&lt;br /&gt;
 *&lt;br /&gt;
 * See https://phabricator.wikimedia.org/tag/minipedia/&lt;br /&gt;
 */&lt;br /&gt;
( function ( mw, $ ) {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * CONFIGURATION/LOCALIZATION INSTRUCTIONS&lt;br /&gt;
	 *&lt;br /&gt;
	 * Declare somewhere something like this:&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // assure that you do not overwrite other-people customizations&lt;br /&gt;
	 *   window.MiniPedia      = window.MiniPedia      || {};&lt;br /&gt;
	 *   window.MiniPedia.L10N = window.MiniPedia.L10N || {};&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // then customize something&lt;br /&gt;
 	 *   window.MiniPedia.editIntro      = 'Project:How to create';&lt;br /&gt;
	 *   window.MiniPedia.L10N.minipedia = 'Otherpedia';&lt;br /&gt;
	 */&lt;br /&gt;
&lt;br /&gt;
	// load localization defaults&lt;br /&gt;
	var DEFAULTS = {&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespace: 'Mini',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceNum: 3002,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediate: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediateNum: 3004,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvanced: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvancedNum: 3006,&lt;br /&gt;
&lt;br /&gt;
		// default edit intro page title&lt;br /&gt;
		editIntro: 'Progetto:Minipedia/Creazione voce',&lt;br /&gt;
&lt;br /&gt;
		// how much characters should have a word to be considered too much lon&lt;br /&gt;
		// this somehow help people with dyslexia&lt;br /&gt;
		longWordLen: 13,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of acceptable complex words to help people with dyslexia&lt;br /&gt;
		maxComplexWords: 10,&lt;br /&gt;
&lt;br /&gt;
		// min and max number of suggested words to somehow mitigate attention span problems&lt;br /&gt;
		maxWords: 700,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of suggested newlines&lt;br /&gt;
		maxTotalLines: 180,&lt;br /&gt;
&lt;br /&gt;
		// localization stuff&lt;br /&gt;
		L10N: {&lt;br /&gt;
			minipedia: &amp;quot;Minipedia&amp;quot;,&lt;br /&gt;
			minipediaShort: &amp;quot;Mini&amp;quot;,&lt;br /&gt;
			minipediaShortIntermediate: &amp;quot;Intermediate&amp;quot;,&lt;br /&gt;
			minipediaShortAdvanced: &amp;quot;Advanced&amp;quot;,&lt;br /&gt;
			normalpedia: &amp;quot;Wikipedia Test&amp;quot;,&lt;br /&gt;
			normalpediaShort: &amp;quot;WikipediaTest&amp;quot;,&lt;br /&gt;
			openMinipedia: &amp;quot;Apri Minipedia&amp;quot;,&lt;br /&gt;
			openMinipediaIntermediate: &amp;quot;Open Minipedia Intermediate&amp;quot;,&lt;br /&gt;
			openMinipediaAdvanced: &amp;quot;Open Minipedia Advanced&amp;quot;,&lt;br /&gt;
			openNormalpedia: &amp;quot;Apri Wikipedia Test&amp;quot;,&lt;br /&gt;
			createMinipediaPageTitle: &amp;quot;Accesso Minipedia&amp;quot;,&lt;br /&gt;
			createMinipediaPageBody: &amp;quot;Sii il primo a creare una versione più ridotta e più accessibile di questa voce, in Minipedia!&amp;quot;,&lt;br /&gt;
			statsTitle: &amp;quot;Mini Report&amp;quot;,&lt;br /&gt;
			statsHeadingSubject: &amp;quot;Fattore&amp;quot;,&lt;br /&gt;
			statsHeadingValue: &amp;quot;Valore attuale&amp;quot;,&lt;br /&gt;
			statsHeadingExpected: &amp;quot;Limite consigliato&amp;quot;,&lt;br /&gt;
			statsHeadingSimplicity: &amp;quot;Semplicità&amp;quot;,&lt;br /&gt;
			statsWords: &amp;quot;Parole&amp;quot;,&lt;br /&gt;
			statsLines: &amp;quot;Paragrafi&amp;quot;,&lt;br /&gt;
			statsComplexWords: &amp;quot;Parole complesse&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// global configuration&lt;br /&gt;
	window.MiniPedia = window.MiniPedia || {};&lt;br /&gt;
&lt;br /&gt;
	// shortcut&lt;br /&gt;
	var mp = window.MiniPedia;&lt;br /&gt;
&lt;br /&gt;
	// inherit default configurations&lt;br /&gt;
	$.extend( true, mp, DEFAULTS );&lt;br /&gt;
&lt;br /&gt;
	// another shortcut&lt;br /&gt;
	var L10N = mp.L10N;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Lazy shortcut to obtain just the first API result&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param  {Object} response API Response&lt;br /&gt;
	 * @return {Object} page object&lt;br /&gt;
	 */&lt;br /&gt;
	function justFirstQueryPage( response ) {&lt;br /&gt;
&lt;br /&gt;
		// no response no party&lt;br /&gt;
		if( !response.query || !response.query.pages ) {&lt;br /&gt;
			throw 'no valid API response';&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// the list should contain just one page&lt;br /&gt;
		var pages = response.query.pages;&lt;br /&gt;
		for( var id in pages ) {&lt;br /&gt;
			return pages[ id ];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// no page no party&lt;br /&gt;
		return false;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get a fresh MediaWiki API object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return mw.Api&lt;br /&gt;
	 */&lt;br /&gt;
	function mwApi() {&lt;br /&gt;
		return mw.loader.using( 'mediawiki.api' ).then( function() {&lt;br /&gt;
			return new mw.Api();&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if a page title already exists&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param title Page title&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function pageExists( title ) {&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'info',&lt;br /&gt;
			titles: title,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// eventually load API stuff&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request&lt;br /&gt;
			return api.get( request ).then( function ( response ) {&lt;br /&gt;
&lt;br /&gt;
				// check if it exists&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 ) {&lt;br /&gt;
					return page;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				return false;&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query the current page plain text&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page name (or none for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryPlainText( pageName ) {&lt;br /&gt;
&lt;br /&gt;
		// complete page title with namespace&lt;br /&gt;
		pageName = pageName || mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		// See https://phabricator.wikimedia.org/T259332&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'extracts',&lt;br /&gt;
			titles: pageName,&lt;br /&gt;
			explaintext: 1,&lt;br /&gt;
			exlimit: 1,&lt;br /&gt;
			exsectionformat: 'plain',&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// this will return a Promise resolving the page plain text, returned upstream&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request and return a Promise&lt;br /&gt;
			return api.get( request ).then( function( response ) {&lt;br /&gt;
&lt;br /&gt;
				// resolve the Promise with the page content&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 &amp;amp;&amp;amp; page.extract ) {&lt;br /&gt;
					return page.extract;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// no content&lt;br /&gt;
				return false;&lt;br /&gt;
&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Create a new Mini namespace object.&lt;br /&gt;
	 */&lt;br /&gt;
	function Mini(ns, shortLabel, openLabel, emoji) {&lt;br /&gt;
		this.ns = ns;&lt;br /&gt;
		this.shortLabel = shortLabel;&lt;br /&gt;
		this.openLabel = openLabel;&lt;br /&gt;
		this.emoji = emoji;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if the current namespace is mine.&lt;br /&gt;
	 * @return boolean&lt;br /&gt;
	 */&lt;br /&gt;
	Mini.prototype.isCurrentNamespace = function() {&lt;br /&gt;
		return this.ns == mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @return mw.Title&lt;br /&gt;
	 */&lt;br /&gt;
	Mini.prototype.createTitle = function(pageName) {&lt;br /&gt;
		return new mw.Title(pageName,  this.ns);&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Register a namespace portlet button.&lt;br /&gt;
	 */&lt;br /&gt;
	Mini.prototype.registerPortlet = function() {&lt;br /&gt;
		// Don't load on this very same namespace.&lt;br /&gt;
		if (this.isCurrentNamespace()) {&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var mwTitle = this.createTitle(pageName);&lt;br /&gt;
		var portlet = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			mwTitle.getUrl(),&lt;br /&gt;
			this.emoji + ' ' + this.shortLabel,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			this.openLabel,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		var that = this;&lt;br /&gt;
		$(portlet).click( function(e) {&lt;br /&gt;
			that.onPortletClick(e);&lt;br /&gt;
		} );&lt;br /&gt;
&lt;br /&gt;
		return portlet;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onPortletClick = function(e) {&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var pageTitle = this.createTitle(pageName);&lt;br /&gt;
		var miniPageName = pageTitle.getPrefixedText();&lt;br /&gt;
		var miniPageUrl = pageTitle.getUrl();&lt;br /&gt;
		var that = this;&lt;br /&gt;
		// wait for multiple information&lt;br /&gt;
		$.when(&lt;br /&gt;
			// check if the page really exists&lt;br /&gt;
			pageExists( miniPageName ),&lt;br /&gt;
&lt;br /&gt;
			   // allow to open OO UI windows&lt;br /&gt;
			   mw.loader.using( 'oojs-ui-windows' )&lt;br /&gt;
&lt;br /&gt;
			   // callback fired when we have all the information&lt;br /&gt;
		).done( function( miniPageExists, loader ) {&lt;br /&gt;
&lt;br /&gt;
			// check if the page already exist&lt;br /&gt;
			if( miniPageExists ) {&lt;br /&gt;
&lt;br /&gt;
				// just redirect to the Minipedia version&lt;br /&gt;
				window.location = miniPageUrl;&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// ask if you want to create the page&lt;br /&gt;
&lt;br /&gt;
				// create message dialog window&lt;br /&gt;
				var messageDialog = new OO.ui.MessageDialog();&lt;br /&gt;
				var windowManager = new OO.ui.WindowManager();&lt;br /&gt;
				$( 'body' ).append( windowManager.$element );&lt;br /&gt;
				windowManager.addWindows( [ messageDialog ] );&lt;br /&gt;
&lt;br /&gt;
				// configure and open dialog&lt;br /&gt;
				var windowInstance = windowManager.openWindow( messageDialog, {&lt;br /&gt;
					title:   L10N.createMinipediaPageTitle,&lt;br /&gt;
					message: L10N.createMinipediaPageBody,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// check if you accepted the page creation&lt;br /&gt;
				windowInstance.closed.then( function ( data ) {&lt;br /&gt;
					// user is confirming the action&lt;br /&gt;
					if( data.action === 'accept' ) {&lt;br /&gt;
						// go go go! to mini&lt;br /&gt;
						that.onMinipediaConfirmation();&lt;br /&gt;
					}&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
			// end if page exists&lt;br /&gt;
		} );&lt;br /&gt;
		// end $.when()&lt;br /&gt;
&lt;br /&gt;
		// avoid scrolling to the top&lt;br /&gt;
		e.preventDefault();&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onMinipediaConfirmation = function() {&lt;br /&gt;
		/**&lt;br /&gt;
		 * Go to the Minipedia page in edit mode&lt;br /&gt;
		 *&lt;br /&gt;
		 * The page in the main namespace will be preloaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 */&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var mwTitle = this.createTitle(pageName);&lt;br /&gt;
		var miniPageName = mwTitle.getPrefixedText();&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Build the query string to edit a page&lt;br /&gt;
		 *&lt;br /&gt;
		 * TODO: eventually add VisualEditor support&lt;br /&gt;
		 */&lt;br /&gt;
		var editPageQueryString = {&lt;br /&gt;
			action: 'edit',&lt;br /&gt;
			title: miniPageName,&lt;br /&gt;
			preload: pageName,&lt;br /&gt;
			editintro: mp.editIntro,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// '/index.php'&lt;br /&gt;
		var wgScript = mw.config.get( 'wgScript' );&lt;br /&gt;
&lt;br /&gt;
		// go to the edit page URL&lt;br /&gt;
		window.location = wgScript + '?' + $.param( editPageQueryString );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the wiki&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareNormalpedia() {&lt;br /&gt;
		var miniElementary = new Mini(&lt;br /&gt;
		  mp.namespaceNum,&lt;br /&gt;
		  L10N.minipediaShort,&lt;br /&gt;
		  L10N.openMinipedia,&lt;br /&gt;
		  '🐣');&lt;br /&gt;
		var miniIntermediate = new Mini(&lt;br /&gt;
		  mp.namespaceIntermediateNum,&lt;br /&gt;
		  L10N.minipediaShortIntermediate,&lt;br /&gt;
		  L10N.openMinipediaIntermediate,&lt;br /&gt;
		  '📚');&lt;br /&gt;
		var miniAdvanced = new Mini(&lt;br /&gt;
		  mp.namespaceAdvancedNum,&lt;br /&gt;
		  L10N.minipediaShortAdvanced,&lt;br /&gt;
		  L10N.openMinipediaAdvanced,&lt;br /&gt;
		  '🔬');&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var miniVersionPortletLink = miniElementary.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Intermediate&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkIntermediate = miniIntermediate.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Advanced&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkAdvanced = miniAdvanced.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareNormalWiki()&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Calculate some stats over a text&lt;br /&gt;
	 */&lt;br /&gt;
	function textStats( text ) {&lt;br /&gt;
&lt;br /&gt;
		var stats = {};&lt;br /&gt;
&lt;br /&gt;
		text = text.trim();&lt;br /&gt;
&lt;br /&gt;
		// count long words&lt;br /&gt;
		var totalLongWords = 0;&lt;br /&gt;
		var word, words = text.split( /\s+/ );&lt;br /&gt;
		for( var i = 0; i &amp;lt; words.length; i++ ) {&lt;br /&gt;
			word = words[i];&lt;br /&gt;
			if( word.length &amp;gt; mp.longWordLen ) {&lt;br /&gt;
				totalLongWords++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// total amount of paragraphs&lt;br /&gt;
		// paragraphs shorter than this comment are discarded&lt;br /&gt;
		var totalLines = 0;&lt;br /&gt;
		var paragraphs = text.split( /\n+/ );&lt;br /&gt;
		var paragraph;&lt;br /&gt;
		for( var i = 0; i &amp;lt; paragraphs.length; i++ ) {&lt;br /&gt;
			paragraph = paragraphs[i].trim();&lt;br /&gt;
			if( paragraph.length &amp;gt; 30 ) {&lt;br /&gt;
				totalLines++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// how much lines?&lt;br /&gt;
		stats.totalLines = totalLines;&lt;br /&gt;
&lt;br /&gt;
		// how much words?&lt;br /&gt;
		stats.totalWords = words.length;&lt;br /&gt;
&lt;br /&gt;
		// how much of these words are so much long?&lt;br /&gt;
		// See 'longWordLen'&lt;br /&gt;
		stats.totalLongWords = totalLongWords;&lt;br /&gt;
&lt;br /&gt;
		return stats;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query content stats of the current page&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page title (or nothing for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryContentStats( pageTitle ) {&lt;br /&gt;
		return queryPlainText( pageTitle ).then( textStats );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Apply a stupid percentage&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {int} a&lt;br /&gt;
	 * @param {int} b&lt;br /&gt;
	 * @return The 'b%' applied to 'a'&lt;br /&gt;
	 */&lt;br /&gt;
	function applyPercentage( a, b ) {&lt;br /&gt;
		return parseInt( a * b / 100 );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia stats box&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipediaStatsBox() {&lt;br /&gt;
&lt;br /&gt;
		// normal page title (non-mini version)&lt;br /&gt;
		var mainPageTitle = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// body container&lt;br /&gt;
		var $contentText = $( '#mw-content-text' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the DOM tree&lt;br /&gt;
		var $container = $( '&amp;lt;div&amp;gt;' );&lt;br /&gt;
		var $table = $( '&amp;lt;table&amp;gt;' );&lt;br /&gt;
		var $thead = $( '&amp;lt;thead&amp;gt;' );&lt;br /&gt;
		var $tbody = $( '&amp;lt;tbody&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the stats container&lt;br /&gt;
		$container.addClass( 'minipedia-stats' );&lt;br /&gt;
&lt;br /&gt;
		// put a title&lt;br /&gt;
		$container.append( $( '&amp;lt;h2&amp;gt;' ).text( L10N.statsTitle ) );&lt;br /&gt;
&lt;br /&gt;
		// put the table&lt;br /&gt;
		$container.append( $table );&lt;br /&gt;
&lt;br /&gt;
		// add table headers&lt;br /&gt;
		$thead.append(&lt;br /&gt;
			$( '&amp;lt;tr&amp;gt;' ).append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSubject    ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingValue      ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingExpected   ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSimplicity ) )&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// prepare the table&lt;br /&gt;
		$table.addClass( 'wikitable' )&lt;br /&gt;
		      .append( $thead )&lt;br /&gt;
		      .append( $tbody );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Append a row (with a label and a value) into a table&lt;br /&gt;
		 *&lt;br /&gt;
		 * The data argument accepts an object with:&lt;br /&gt;
		 *&lt;br /&gt;
		 *   className:        Class name for the row&lt;br /&gt;
		 *   label:            Text displayed in row heading (left)&lt;br /&gt;
		 *   text:             Text displayed in row data (right)&lt;br /&gt;
		 *   value             Value associated to the text of the mini version&lt;br /&gt;
		 *   maxValue          Maximum suggested value&lt;br /&gt;
		 *   upstreamValue     The value of the upstream (main) version&lt;br /&gt;
		 *   upstreamLimitPerc The percentage (0-100) applied to the 'upstreamValue' to inherit a suitable 'maxValue'&lt;br /&gt;
		 *&lt;br /&gt;
		 * Note: this function uses OOUI widgets. Make sure to have them loaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 * @param {Object} jQuery table&lt;br /&gt;
		 * @param {Object} Data information&lt;br /&gt;
		 */&lt;br /&gt;
		function appendTableStatsRow( $table, data ) {&lt;br /&gt;
&lt;br /&gt;
			// read arguments&lt;br /&gt;
			var className = data.className;&lt;br /&gt;
			var label     = data.label;&lt;br /&gt;
			var value     = data.value;&lt;br /&gt;
			var maxValue  = data.maxValue;&lt;br /&gt;
			var text      = data.text || value;&lt;br /&gt;
&lt;br /&gt;
			// eventually calculate the max value&lt;br /&gt;
			if( !maxValue &amp;amp;&amp;amp; data.upstreamValue &amp;amp;&amp;amp; data.upstreamLimitPerc ) {&lt;br /&gt;
				maxValue = applyPercentage( data.upstreamValue, data.upstreamLimitPerc );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// prepare table stats row&lt;br /&gt;
			var $tr         = $( '&amp;lt;tr&amp;gt;' );&lt;br /&gt;
			var $tdLabel    = $( '&amp;lt;td&amp;gt;' ).text( label    );&lt;br /&gt;
			var $tdValue    = $( '&amp;lt;td&amp;gt;' ).text( text     );&lt;br /&gt;
			var $tdMax      = $( '&amp;lt;td&amp;gt;' ).text( maxValue );&lt;br /&gt;
			var $tdProgress = $( '&amp;lt;td&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
			// build the table row&lt;br /&gt;
			$tr.addClass( 'minipedia-stats-row-' + className );&lt;br /&gt;
			$tr.append( $tdLabel    )&lt;br /&gt;
			   .append( $tdValue    )&lt;br /&gt;
			   .append( $tdMax      )&lt;br /&gt;
			   .append( $tdProgress );&lt;br /&gt;
&lt;br /&gt;
			// if possible, plot a cute progress bar&lt;br /&gt;
			if( maxValue ) {&lt;br /&gt;
&lt;br /&gt;
				// calculate a 0-100 progress since the value and maxValue&lt;br /&gt;
				var realPercentage = parseInt( value / maxValue * 100 );&lt;br /&gt;
&lt;br /&gt;
				/**&lt;br /&gt;
				 * Calculate the inverse percentage&lt;br /&gt;
				 *&lt;br /&gt;
				 * This is the final percentage shown to the user.&lt;br /&gt;
				 *&lt;br /&gt;
				 * In short, it's always 100% but if you go over&lt;br /&gt;
				 * the limit it start decreasing and reaching zero,&lt;br /&gt;
				 * to rappresent a kind of 'understanding degradation'.&lt;br /&gt;
				 *&lt;br /&gt;
				 * To do not underrate the work of the user it should not go&lt;br /&gt;
				 * below a certain minimum amount. Example: 10%. :^)&lt;br /&gt;
				 *&lt;br /&gt;
				 * Actually the function is just linear.&lt;br /&gt;
				 */&lt;br /&gt;
				var inversePercentage = 100;&lt;br /&gt;
				if( realPercentage &amp;gt; 100 ) {&lt;br /&gt;
					inversePercentage = Math.max( 10, 200 - realPercentage );&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// generate the progress bar&lt;br /&gt;
				var progressBar = new OO.ui.ProgressBarWidget( {&lt;br /&gt;
					progress: inversePercentage,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// show the progress bar&lt;br /&gt;
				$tdProgress.append( progressBar.$element );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// attach some data to be read by scripts&lt;br /&gt;
			$tr.data( 'ministats', data );&lt;br /&gt;
&lt;br /&gt;
			// eventually emphasize if something is wrong&lt;br /&gt;
			if( value &amp;amp;&amp;amp; maxValue &amp;amp;&amp;amp; value &amp;gt; maxValue ) {&lt;br /&gt;
				$tr.addClass( 'minipedia-stats-row-problem' );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// show the row in the stats table&lt;br /&gt;
			$table.append( $tr );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// request multiple stuff at the same time&lt;br /&gt;
		$.when(&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the current mini page&lt;br /&gt;
			queryContentStats(),&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the related non-mini page&lt;br /&gt;
			queryContentStats( mainPageTitle ),&lt;br /&gt;
&lt;br /&gt;
			// require the progress bar widget&lt;br /&gt;
			mw.loader.using( 'oojs-ui-widgets' )&lt;br /&gt;
&lt;br /&gt;
		// callback fired when we have all the information&lt;br /&gt;
		).done( function( statsMini, statsMain, mwLoader ) {&lt;br /&gt;
&lt;br /&gt;
			// show the stats container at the bottom of the page when we have something&lt;br /&gt;
			$contentText.append( $container );&lt;br /&gt;
&lt;br /&gt;
			// check if we have also some information from the main namespace&lt;br /&gt;
			// in this case we can do a comparison&lt;br /&gt;
			if( statsMain ) {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they can be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'long-words',&lt;br /&gt;
					label:             L10N.statsComplexWords,&lt;br /&gt;
					value:             statsMini.totalLongWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalLongWords,&lt;br /&gt;
					upstreamLimitPerc: 10,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'words',&lt;br /&gt;
					label:             L10N.statsWords,&lt;br /&gt;
					value:             statsMini.totalWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalWords,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'lines',&lt;br /&gt;
					label:             L10N.statsLines,&lt;br /&gt;
					value:             statsMini.totalLines,&lt;br /&gt;
					maxValue:          statsMain.totalLines,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			// there is no the related main page&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they cannot be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'long-words',&lt;br /&gt;
					label:     L10N.statsComplexWords,&lt;br /&gt;
					value:     statsMini.totalLongWords,&lt;br /&gt;
					maxValue:  mp.maxComplexWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'words',&lt;br /&gt;
					label:     L10N.statsWords,&lt;br /&gt;
					value:     statsMini.totalWords,&lt;br /&gt;
					maxValue:  mp.maxStatsWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'lines',&lt;br /&gt;
					label:      L10N.statsLines,&lt;br /&gt;
					value:      statsMini.totalLines,&lt;br /&gt;
					maxValue:   mp.maxTotalLines,&lt;br /&gt;
				} );&lt;br /&gt;
			}&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia namespace&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipedia() {&lt;br /&gt;
&lt;br /&gt;
		// action of the page (edit, view etc.)&lt;br /&gt;
		var action = mw.config.get( 'wgAction' );&lt;br /&gt;
&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Normalpedia title object&lt;br /&gt;
		var normalTitleObject = new mw.Title( pageName );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var normalPageName = normalTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var normalPageUrl = normalTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var normalVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			normalPageUrl,&lt;br /&gt;
			L10N.normalpediaShort,&lt;br /&gt;
			'ca-normalpedia',&lt;br /&gt;
			L10N.openNormalpedia&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// check if we are in view mode&lt;br /&gt;
		if( action === 'view' ) {&lt;br /&gt;
&lt;br /&gt;
			// in view mode we can fetch the stats&lt;br /&gt;
			prepareMinipediaStatsBox();&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareMinipedia()&lt;br /&gt;
&lt;br /&gt;
	// work only in the main namespace&lt;br /&gt;
	var ns = mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	if( ns === 0 ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
	} else if( ns == mp.namespaceNum || ns == mp.namespaceIntermediateNum || ns == mp.namespaceAdvancedNum  ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
		prepareMinipedia();&lt;br /&gt;
	}&lt;br /&gt;
	// end namespace zero check&lt;br /&gt;
&lt;br /&gt;
} )( mw, $ );&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=111</id>
		<title>MediaWiki:Gadget-minipedia.js</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=111"/>
		<updated>2025-05-16T16:06:34Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: prepareMinipedia() also for other namespaces&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/**&lt;br /&gt;
 * Make Minipedia magics&lt;br /&gt;
 *&lt;br /&gt;
 * Dependencies: mediawiki.util&lt;br /&gt;
 * Author: 2020-2025 [[User:ValerioBoz-WMCH]]&lt;br /&gt;
 *&lt;br /&gt;
 * See https://phabricator.wikimedia.org/tag/minipedia/&lt;br /&gt;
 */&lt;br /&gt;
( function ( mw, $ ) {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * CONFIGURATION/LOCALIZATION INSTRUCTIONS&lt;br /&gt;
	 *&lt;br /&gt;
	 * Declare somewhere something like this:&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // assure that you do not overwrite other-people customizations&lt;br /&gt;
	 *   window.MiniPedia      = window.MiniPedia      || {};&lt;br /&gt;
	 *   window.MiniPedia.L10N = window.MiniPedia.L10N || {};&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // then customize something&lt;br /&gt;
 	 *   window.MiniPedia.editIntro      = 'Project:How to create';&lt;br /&gt;
	 *   window.MiniPedia.L10N.minipedia = 'Otherpedia';&lt;br /&gt;
	 */&lt;br /&gt;
&lt;br /&gt;
	// load localization defaults&lt;br /&gt;
	var DEFAULTS = {&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespace: 'Mini',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceNum: 3002,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediate: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediateNum: 3004,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvanced: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvancedNum: 3006,&lt;br /&gt;
&lt;br /&gt;
		// default edit intro page title&lt;br /&gt;
		editIntro: 'Progetto:Minipedia/Creazione voce',&lt;br /&gt;
&lt;br /&gt;
		// how much characters should have a word to be considered too much lon&lt;br /&gt;
		// this somehow help people with dyslexia&lt;br /&gt;
		longWordLen: 13,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of acceptable complex words to help people with dyslexia&lt;br /&gt;
		maxComplexWords: 10,&lt;br /&gt;
&lt;br /&gt;
		// min and max number of suggested words to somehow mitigate attention span problems&lt;br /&gt;
		maxWords: 700,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of suggested newlines&lt;br /&gt;
		maxTotalLines: 180,&lt;br /&gt;
&lt;br /&gt;
		// localization stuff&lt;br /&gt;
		L10N: {&lt;br /&gt;
			minipedia: &amp;quot;Minipedia&amp;quot;,&lt;br /&gt;
			minipediaShort: &amp;quot;Mini&amp;quot;,&lt;br /&gt;
			minipediaShortIntermediate: &amp;quot;Intermediate&amp;quot;,&lt;br /&gt;
			minipediaShortAdvanced: &amp;quot;Advanced&amp;quot;,&lt;br /&gt;
			normalpedia: &amp;quot;Wikipedia Test&amp;quot;,&lt;br /&gt;
			normalpediaShort: &amp;quot;WikipediaTest&amp;quot;,&lt;br /&gt;
			openMinipedia: &amp;quot;Apri Minipedia&amp;quot;,&lt;br /&gt;
			openMinipediaIntermediate: &amp;quot;Open Minipedia Intermediate&amp;quot;,&lt;br /&gt;
			openMinipediaAdvanced: &amp;quot;Open Minipedia Advanced&amp;quot;,&lt;br /&gt;
			openNormalpedia: &amp;quot;Apri Wikipedia Test&amp;quot;,&lt;br /&gt;
			createMinipediaPageTitle: &amp;quot;Accesso Minipedia&amp;quot;,&lt;br /&gt;
			createMinipediaPageBody: &amp;quot;Sii il primo a creare una versione più ridotta e più accessibile di questa voce, in Minipedia!&amp;quot;,&lt;br /&gt;
			statsTitle: &amp;quot;Mini Report&amp;quot;,&lt;br /&gt;
			statsHeadingSubject: &amp;quot;Fattore&amp;quot;,&lt;br /&gt;
			statsHeadingValue: &amp;quot;Valore attuale&amp;quot;,&lt;br /&gt;
			statsHeadingExpected: &amp;quot;Limite consigliato&amp;quot;,&lt;br /&gt;
			statsHeadingSimplicity: &amp;quot;Semplicità&amp;quot;,&lt;br /&gt;
			statsWords: &amp;quot;Parole&amp;quot;,&lt;br /&gt;
			statsLines: &amp;quot;Paragrafi&amp;quot;,&lt;br /&gt;
			statsComplexWords: &amp;quot;Parole complesse&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// global configuration&lt;br /&gt;
	window.MiniPedia = window.MiniPedia || {};&lt;br /&gt;
&lt;br /&gt;
	// shortcut&lt;br /&gt;
	var mp = window.MiniPedia;&lt;br /&gt;
&lt;br /&gt;
	// inherit default configurations&lt;br /&gt;
	$.extend( true, mp, DEFAULTS );&lt;br /&gt;
&lt;br /&gt;
	// another shortcut&lt;br /&gt;
	var L10N = mp.L10N;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Lazy shortcut to obtain just the first API result&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param  {Object} response API Response&lt;br /&gt;
	 * @return {Object} page object&lt;br /&gt;
	 */&lt;br /&gt;
	function justFirstQueryPage( response ) {&lt;br /&gt;
&lt;br /&gt;
		// no response no party&lt;br /&gt;
		if( !response.query || !response.query.pages ) {&lt;br /&gt;
			throw 'no valid API response';&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// the list should contain just one page&lt;br /&gt;
		var pages = response.query.pages;&lt;br /&gt;
		for( var id in pages ) {&lt;br /&gt;
			return pages[ id ];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// no page no party&lt;br /&gt;
		return false;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get a fresh MediaWiki API object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return mw.Api&lt;br /&gt;
	 */&lt;br /&gt;
	function mwApi() {&lt;br /&gt;
		return mw.loader.using( 'mediawiki.api' ).then( function() {&lt;br /&gt;
			return new mw.Api();&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if a page title already exists&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param title Page title&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function pageExists( title ) {&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'info',&lt;br /&gt;
			titles: title,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// eventually load API stuff&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request&lt;br /&gt;
			return api.get( request ).then( function ( response ) {&lt;br /&gt;
&lt;br /&gt;
				// check if it exists&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 ) {&lt;br /&gt;
					return page;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				return false;&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query the current page plain text&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page name (or none for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryPlainText( pageName ) {&lt;br /&gt;
&lt;br /&gt;
		// complete page title with namespace&lt;br /&gt;
		pageName = pageName || mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		// See https://phabricator.wikimedia.org/T259332&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'extracts',&lt;br /&gt;
			titles: pageName,&lt;br /&gt;
			explaintext: 1,&lt;br /&gt;
			exlimit: 1,&lt;br /&gt;
			exsectionformat: 'plain',&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// this will return a Promise resolving the page plain text, returned upstream&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request and return a Promise&lt;br /&gt;
			return api.get( request ).then( function( response ) {&lt;br /&gt;
&lt;br /&gt;
				// resolve the Promise with the page content&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 &amp;amp;&amp;amp; page.extract ) {&lt;br /&gt;
					return page.extract;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// no content&lt;br /&gt;
				return false;&lt;br /&gt;
&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Create a new Mini namespace object.&lt;br /&gt;
	 */&lt;br /&gt;
	function Mini(ns, shortLabel, openLabel, emoji) {&lt;br /&gt;
		this.ns = ns;&lt;br /&gt;
		this.shortLabel = shortLabel;&lt;br /&gt;
		this.openLabel = openLabel;&lt;br /&gt;
		this.emoji = emoji;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @return mw.Title&lt;br /&gt;
	 */&lt;br /&gt;
	Mini.prototype.createTitle = function(pageName) {&lt;br /&gt;
		return new mw.Title(pageName,  this.ns);&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.registerPortlet = function() {&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var mwTitle = this.createTitle(pageName);&lt;br /&gt;
		var portlet = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			mwTitle.getUrl(),&lt;br /&gt;
			this.emoji + ' ' + this.shortLabel,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			this.openLabel,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		var that = this;&lt;br /&gt;
		$(portlet).click( function(e) {&lt;br /&gt;
			that.onPortletClick(e);&lt;br /&gt;
		} );&lt;br /&gt;
&lt;br /&gt;
		return portlet;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onPortletClick = function(e) {&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var pageTitle = this.createTitle(pageName);&lt;br /&gt;
		var miniPageName = pageTitle.getPrefixedText();&lt;br /&gt;
		var miniPageUrl = pageTitle.getUrl();&lt;br /&gt;
		var that = this;&lt;br /&gt;
		// wait for multiple information&lt;br /&gt;
		$.when(&lt;br /&gt;
			// check if the page really exists&lt;br /&gt;
			pageExists( miniPageName ),&lt;br /&gt;
&lt;br /&gt;
			   // allow to open OO UI windows&lt;br /&gt;
			   mw.loader.using( 'oojs-ui-windows' )&lt;br /&gt;
&lt;br /&gt;
			   // callback fired when we have all the information&lt;br /&gt;
		).done( function( miniPageExists, loader ) {&lt;br /&gt;
&lt;br /&gt;
			// check if the page already exist&lt;br /&gt;
			if( miniPageExists ) {&lt;br /&gt;
&lt;br /&gt;
				// just redirect to the Minipedia version&lt;br /&gt;
				window.location = miniPageUrl;&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// ask if you want to create the page&lt;br /&gt;
&lt;br /&gt;
				// create message dialog window&lt;br /&gt;
				var messageDialog = new OO.ui.MessageDialog();&lt;br /&gt;
				var windowManager = new OO.ui.WindowManager();&lt;br /&gt;
				$( 'body' ).append( windowManager.$element );&lt;br /&gt;
				windowManager.addWindows( [ messageDialog ] );&lt;br /&gt;
&lt;br /&gt;
				// configure and open dialog&lt;br /&gt;
				var windowInstance = windowManager.openWindow( messageDialog, {&lt;br /&gt;
					title:   L10N.createMinipediaPageTitle,&lt;br /&gt;
					message: L10N.createMinipediaPageBody,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// check if you accepted the page creation&lt;br /&gt;
				windowInstance.closed.then( function ( data ) {&lt;br /&gt;
					// user is confirming the action&lt;br /&gt;
					if( data.action === 'accept' ) {&lt;br /&gt;
						// go go go! to mini&lt;br /&gt;
						that.onMinipediaConfirmation();&lt;br /&gt;
					}&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
			// end if page exists&lt;br /&gt;
		} );&lt;br /&gt;
		// end $.when()&lt;br /&gt;
&lt;br /&gt;
		// avoid scrolling to the top&lt;br /&gt;
		e.preventDefault();&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onMinipediaConfirmation = function() {&lt;br /&gt;
		/**&lt;br /&gt;
		 * Go to the Minipedia page in edit mode&lt;br /&gt;
		 *&lt;br /&gt;
		 * The page in the main namespace will be preloaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 */&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var mwTitle = this.createTitle(pageName);&lt;br /&gt;
		var miniPageName = mwTitle.getPrefixedText();&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Build the query string to edit a page&lt;br /&gt;
		 *&lt;br /&gt;
		 * TODO: eventually add VisualEditor support&lt;br /&gt;
		 */&lt;br /&gt;
		var editPageQueryString = {&lt;br /&gt;
			action: 'edit',&lt;br /&gt;
			title: miniPageName,&lt;br /&gt;
			preload: pageName,&lt;br /&gt;
			editintro: mp.editIntro,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// '/index.php'&lt;br /&gt;
		var wgScript = mw.config.get( 'wgScript' );&lt;br /&gt;
&lt;br /&gt;
		// go to the edit page URL&lt;br /&gt;
		window.location = wgScript + '?' + $.param( editPageQueryString );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the wiki&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareNormalpedia() {&lt;br /&gt;
		var miniElementary = new Mini(&lt;br /&gt;
		  mp.namespaceNum,&lt;br /&gt;
		  L10N.minipediaShort,&lt;br /&gt;
		  L10N.openMinipedia,&lt;br /&gt;
		  '🐣');&lt;br /&gt;
		var miniIntermediate = new Mini(&lt;br /&gt;
		  mp.namespaceIntermediateNum,&lt;br /&gt;
		  L10N.minipediaShortIntermediate,&lt;br /&gt;
		  L10N.openMinipediaIntermediate,&lt;br /&gt;
		  '📚');&lt;br /&gt;
		var miniAdvanced = new Mini(&lt;br /&gt;
		  mp.namespaceAdvancedNum,&lt;br /&gt;
		  L10N.minipediaShortAdvanced,&lt;br /&gt;
		  L10N.openMinipediaAdvanced,&lt;br /&gt;
		  '🔬');&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var miniVersionPortletLink = miniElementary.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Intermediate&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkIntermediate = miniIntermediate.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Advanced&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkAdvanced = miniAdvanced.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareNormalWiki()&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Calculate some stats over a text&lt;br /&gt;
	 */&lt;br /&gt;
	function textStats( text ) {&lt;br /&gt;
&lt;br /&gt;
		var stats = {};&lt;br /&gt;
&lt;br /&gt;
		text = text.trim();&lt;br /&gt;
&lt;br /&gt;
		// count long words&lt;br /&gt;
		var totalLongWords = 0;&lt;br /&gt;
		var word, words = text.split( /\s+/ );&lt;br /&gt;
		for( var i = 0; i &amp;lt; words.length; i++ ) {&lt;br /&gt;
			word = words[i];&lt;br /&gt;
			if( word.length &amp;gt; mp.longWordLen ) {&lt;br /&gt;
				totalLongWords++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// total amount of paragraphs&lt;br /&gt;
		// paragraphs shorter than this comment are discarded&lt;br /&gt;
		var totalLines = 0;&lt;br /&gt;
		var paragraphs = text.split( /\n+/ );&lt;br /&gt;
		var paragraph;&lt;br /&gt;
		for( var i = 0; i &amp;lt; paragraphs.length; i++ ) {&lt;br /&gt;
			paragraph = paragraphs[i].trim();&lt;br /&gt;
			if( paragraph.length &amp;gt; 30 ) {&lt;br /&gt;
				totalLines++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// how much lines?&lt;br /&gt;
		stats.totalLines = totalLines;&lt;br /&gt;
&lt;br /&gt;
		// how much words?&lt;br /&gt;
		stats.totalWords = words.length;&lt;br /&gt;
&lt;br /&gt;
		// how much of these words are so much long?&lt;br /&gt;
		// See 'longWordLen'&lt;br /&gt;
		stats.totalLongWords = totalLongWords;&lt;br /&gt;
&lt;br /&gt;
		return stats;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query content stats of the current page&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page title (or nothing for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryContentStats( pageTitle ) {&lt;br /&gt;
		return queryPlainText( pageTitle ).then( textStats );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Apply a stupid percentage&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {int} a&lt;br /&gt;
	 * @param {int} b&lt;br /&gt;
	 * @return The 'b%' applied to 'a'&lt;br /&gt;
	 */&lt;br /&gt;
	function applyPercentage( a, b ) {&lt;br /&gt;
		return parseInt( a * b / 100 );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia stats box&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipediaStatsBox() {&lt;br /&gt;
&lt;br /&gt;
		// normal page title (non-mini version)&lt;br /&gt;
		var mainPageTitle = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// body container&lt;br /&gt;
		var $contentText = $( '#mw-content-text' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the DOM tree&lt;br /&gt;
		var $container = $( '&amp;lt;div&amp;gt;' );&lt;br /&gt;
		var $table = $( '&amp;lt;table&amp;gt;' );&lt;br /&gt;
		var $thead = $( '&amp;lt;thead&amp;gt;' );&lt;br /&gt;
		var $tbody = $( '&amp;lt;tbody&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the stats container&lt;br /&gt;
		$container.addClass( 'minipedia-stats' );&lt;br /&gt;
&lt;br /&gt;
		// put a title&lt;br /&gt;
		$container.append( $( '&amp;lt;h2&amp;gt;' ).text( L10N.statsTitle ) );&lt;br /&gt;
&lt;br /&gt;
		// put the table&lt;br /&gt;
		$container.append( $table );&lt;br /&gt;
&lt;br /&gt;
		// add table headers&lt;br /&gt;
		$thead.append(&lt;br /&gt;
			$( '&amp;lt;tr&amp;gt;' ).append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSubject    ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingValue      ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingExpected   ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSimplicity ) )&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// prepare the table&lt;br /&gt;
		$table.addClass( 'wikitable' )&lt;br /&gt;
		      .append( $thead )&lt;br /&gt;
		      .append( $tbody );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Append a row (with a label and a value) into a table&lt;br /&gt;
		 *&lt;br /&gt;
		 * The data argument accepts an object with:&lt;br /&gt;
		 *&lt;br /&gt;
		 *   className:        Class name for the row&lt;br /&gt;
		 *   label:            Text displayed in row heading (left)&lt;br /&gt;
		 *   text:             Text displayed in row data (right)&lt;br /&gt;
		 *   value             Value associated to the text of the mini version&lt;br /&gt;
		 *   maxValue          Maximum suggested value&lt;br /&gt;
		 *   upstreamValue     The value of the upstream (main) version&lt;br /&gt;
		 *   upstreamLimitPerc The percentage (0-100) applied to the 'upstreamValue' to inherit a suitable 'maxValue'&lt;br /&gt;
		 *&lt;br /&gt;
		 * Note: this function uses OOUI widgets. Make sure to have them loaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 * @param {Object} jQuery table&lt;br /&gt;
		 * @param {Object} Data information&lt;br /&gt;
		 */&lt;br /&gt;
		function appendTableStatsRow( $table, data ) {&lt;br /&gt;
&lt;br /&gt;
			// read arguments&lt;br /&gt;
			var className = data.className;&lt;br /&gt;
			var label     = data.label;&lt;br /&gt;
			var value     = data.value;&lt;br /&gt;
			var maxValue  = data.maxValue;&lt;br /&gt;
			var text      = data.text || value;&lt;br /&gt;
&lt;br /&gt;
			// eventually calculate the max value&lt;br /&gt;
			if( !maxValue &amp;amp;&amp;amp; data.upstreamValue &amp;amp;&amp;amp; data.upstreamLimitPerc ) {&lt;br /&gt;
				maxValue = applyPercentage( data.upstreamValue, data.upstreamLimitPerc );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// prepare table stats row&lt;br /&gt;
			var $tr         = $( '&amp;lt;tr&amp;gt;' );&lt;br /&gt;
			var $tdLabel    = $( '&amp;lt;td&amp;gt;' ).text( label    );&lt;br /&gt;
			var $tdValue    = $( '&amp;lt;td&amp;gt;' ).text( text     );&lt;br /&gt;
			var $tdMax      = $( '&amp;lt;td&amp;gt;' ).text( maxValue );&lt;br /&gt;
			var $tdProgress = $( '&amp;lt;td&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
			// build the table row&lt;br /&gt;
			$tr.addClass( 'minipedia-stats-row-' + className );&lt;br /&gt;
			$tr.append( $tdLabel    )&lt;br /&gt;
			   .append( $tdValue    )&lt;br /&gt;
			   .append( $tdMax      )&lt;br /&gt;
			   .append( $tdProgress );&lt;br /&gt;
&lt;br /&gt;
			// if possible, plot a cute progress bar&lt;br /&gt;
			if( maxValue ) {&lt;br /&gt;
&lt;br /&gt;
				// calculate a 0-100 progress since the value and maxValue&lt;br /&gt;
				var realPercentage = parseInt( value / maxValue * 100 );&lt;br /&gt;
&lt;br /&gt;
				/**&lt;br /&gt;
				 * Calculate the inverse percentage&lt;br /&gt;
				 *&lt;br /&gt;
				 * This is the final percentage shown to the user.&lt;br /&gt;
				 *&lt;br /&gt;
				 * In short, it's always 100% but if you go over&lt;br /&gt;
				 * the limit it start decreasing and reaching zero,&lt;br /&gt;
				 * to rappresent a kind of 'understanding degradation'.&lt;br /&gt;
				 *&lt;br /&gt;
				 * To do not underrate the work of the user it should not go&lt;br /&gt;
				 * below a certain minimum amount. Example: 10%. :^)&lt;br /&gt;
				 *&lt;br /&gt;
				 * Actually the function is just linear.&lt;br /&gt;
				 */&lt;br /&gt;
				var inversePercentage = 100;&lt;br /&gt;
				if( realPercentage &amp;gt; 100 ) {&lt;br /&gt;
					inversePercentage = Math.max( 10, 200 - realPercentage );&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// generate the progress bar&lt;br /&gt;
				var progressBar = new OO.ui.ProgressBarWidget( {&lt;br /&gt;
					progress: inversePercentage,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// show the progress bar&lt;br /&gt;
				$tdProgress.append( progressBar.$element );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// attach some data to be read by scripts&lt;br /&gt;
			$tr.data( 'ministats', data );&lt;br /&gt;
&lt;br /&gt;
			// eventually emphasize if something is wrong&lt;br /&gt;
			if( value &amp;amp;&amp;amp; maxValue &amp;amp;&amp;amp; value &amp;gt; maxValue ) {&lt;br /&gt;
				$tr.addClass( 'minipedia-stats-row-problem' );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// show the row in the stats table&lt;br /&gt;
			$table.append( $tr );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// request multiple stuff at the same time&lt;br /&gt;
		$.when(&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the current mini page&lt;br /&gt;
			queryContentStats(),&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the related non-mini page&lt;br /&gt;
			queryContentStats( mainPageTitle ),&lt;br /&gt;
&lt;br /&gt;
			// require the progress bar widget&lt;br /&gt;
			mw.loader.using( 'oojs-ui-widgets' )&lt;br /&gt;
&lt;br /&gt;
		// callback fired when we have all the information&lt;br /&gt;
		).done( function( statsMini, statsMain, mwLoader ) {&lt;br /&gt;
&lt;br /&gt;
			// show the stats container at the bottom of the page when we have something&lt;br /&gt;
			$contentText.append( $container );&lt;br /&gt;
&lt;br /&gt;
			// check if we have also some information from the main namespace&lt;br /&gt;
			// in this case we can do a comparison&lt;br /&gt;
			if( statsMain ) {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they can be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'long-words',&lt;br /&gt;
					label:             L10N.statsComplexWords,&lt;br /&gt;
					value:             statsMini.totalLongWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalLongWords,&lt;br /&gt;
					upstreamLimitPerc: 10,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'words',&lt;br /&gt;
					label:             L10N.statsWords,&lt;br /&gt;
					value:             statsMini.totalWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalWords,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'lines',&lt;br /&gt;
					label:             L10N.statsLines,&lt;br /&gt;
					value:             statsMini.totalLines,&lt;br /&gt;
					maxValue:          statsMain.totalLines,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			// there is no the related main page&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they cannot be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'long-words',&lt;br /&gt;
					label:     L10N.statsComplexWords,&lt;br /&gt;
					value:     statsMini.totalLongWords,&lt;br /&gt;
					maxValue:  mp.maxComplexWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'words',&lt;br /&gt;
					label:     L10N.statsWords,&lt;br /&gt;
					value:     statsMini.totalWords,&lt;br /&gt;
					maxValue:  mp.maxStatsWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'lines',&lt;br /&gt;
					label:      L10N.statsLines,&lt;br /&gt;
					value:      statsMini.totalLines,&lt;br /&gt;
					maxValue:   mp.maxTotalLines,&lt;br /&gt;
				} );&lt;br /&gt;
			}&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia namespace&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipedia() {&lt;br /&gt;
&lt;br /&gt;
		// action of the page (edit, view etc.)&lt;br /&gt;
		var action = mw.config.get( 'wgAction' );&lt;br /&gt;
&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Normalpedia title object&lt;br /&gt;
		var normalTitleObject = new mw.Title( pageName );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var normalPageName = normalTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var normalPageUrl = normalTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var normalVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			normalPageUrl,&lt;br /&gt;
			L10N.normalpediaShort,&lt;br /&gt;
			'ca-normalpedia',&lt;br /&gt;
			L10N.openNormalpedia&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// check if we are in view mode&lt;br /&gt;
		if( action === 'view' ) {&lt;br /&gt;
&lt;br /&gt;
			// in view mode we can fetch the stats&lt;br /&gt;
			prepareMinipediaStatsBox();&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareMinipedia()&lt;br /&gt;
&lt;br /&gt;
	// work only in the main namespace&lt;br /&gt;
	var ns = mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	if( ns === 0 ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
	} else if( ns == mp.namespaceNum || ns == mp.namespaceIntermediateNum || ns == mp.namespaceAdvancedNum  ) {&lt;br /&gt;
		prepareMinipedia();&lt;br /&gt;
	}&lt;br /&gt;
	// end namespace zero check&lt;br /&gt;
&lt;br /&gt;
} )( mw, $ );&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=110</id>
		<title>MediaWiki:Gadget-minipedia.js</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=110"/>
		<updated>2025-05-16T16:03:47Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: fix access to undefinedVariable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/**&lt;br /&gt;
 * Make Minipedia magics&lt;br /&gt;
 *&lt;br /&gt;
 * Dependencies: mediawiki.util&lt;br /&gt;
 * Author: 2020-2025 [[User:ValerioBoz-WMCH]]&lt;br /&gt;
 *&lt;br /&gt;
 * See https://phabricator.wikimedia.org/tag/minipedia/&lt;br /&gt;
 */&lt;br /&gt;
( function ( mw, $ ) {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * CONFIGURATION/LOCALIZATION INSTRUCTIONS&lt;br /&gt;
	 *&lt;br /&gt;
	 * Declare somewhere something like this:&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // assure that you do not overwrite other-people customizations&lt;br /&gt;
	 *   window.MiniPedia      = window.MiniPedia      || {};&lt;br /&gt;
	 *   window.MiniPedia.L10N = window.MiniPedia.L10N || {};&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // then customize something&lt;br /&gt;
 	 *   window.MiniPedia.editIntro      = 'Project:How to create';&lt;br /&gt;
	 *   window.MiniPedia.L10N.minipedia = 'Otherpedia';&lt;br /&gt;
	 */&lt;br /&gt;
&lt;br /&gt;
	// load localization defaults&lt;br /&gt;
	var DEFAULTS = {&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespace: 'Mini',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceNum: 3002,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediate: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediateNum: 3004,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvanced: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvancedNum: 3006,&lt;br /&gt;
&lt;br /&gt;
		// default edit intro page title&lt;br /&gt;
		editIntro: 'Progetto:Minipedia/Creazione voce',&lt;br /&gt;
&lt;br /&gt;
		// how much characters should have a word to be considered too much lon&lt;br /&gt;
		// this somehow help people with dyslexia&lt;br /&gt;
		longWordLen: 13,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of acceptable complex words to help people with dyslexia&lt;br /&gt;
		maxComplexWords: 10,&lt;br /&gt;
&lt;br /&gt;
		// min and max number of suggested words to somehow mitigate attention span problems&lt;br /&gt;
		maxWords: 700,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of suggested newlines&lt;br /&gt;
		maxTotalLines: 180,&lt;br /&gt;
&lt;br /&gt;
		// localization stuff&lt;br /&gt;
		L10N: {&lt;br /&gt;
			minipedia: &amp;quot;Minipedia&amp;quot;,&lt;br /&gt;
			minipediaShort: &amp;quot;Mini&amp;quot;,&lt;br /&gt;
			minipediaShortIntermediate: &amp;quot;Intermediate&amp;quot;,&lt;br /&gt;
			minipediaShortAdvanced: &amp;quot;Advanced&amp;quot;,&lt;br /&gt;
			normalpedia: &amp;quot;Wikipedia Test&amp;quot;,&lt;br /&gt;
			normalpediaShort: &amp;quot;WikipediaTest&amp;quot;,&lt;br /&gt;
			openMinipedia: &amp;quot;Apri Minipedia&amp;quot;,&lt;br /&gt;
			openMinipediaIntermediate: &amp;quot;Open Minipedia Intermediate&amp;quot;,&lt;br /&gt;
			openMinipediaAdvanced: &amp;quot;Open Minipedia Advanced&amp;quot;,&lt;br /&gt;
			openNormalpedia: &amp;quot;Apri Wikipedia Test&amp;quot;,&lt;br /&gt;
			createMinipediaPageTitle: &amp;quot;Accesso Minipedia&amp;quot;,&lt;br /&gt;
			createMinipediaPageBody: &amp;quot;Sii il primo a creare una versione più ridotta e più accessibile di questa voce, in Minipedia!&amp;quot;,&lt;br /&gt;
			statsTitle: &amp;quot;Mini Report&amp;quot;,&lt;br /&gt;
			statsHeadingSubject: &amp;quot;Fattore&amp;quot;,&lt;br /&gt;
			statsHeadingValue: &amp;quot;Valore attuale&amp;quot;,&lt;br /&gt;
			statsHeadingExpected: &amp;quot;Limite consigliato&amp;quot;,&lt;br /&gt;
			statsHeadingSimplicity: &amp;quot;Semplicità&amp;quot;,&lt;br /&gt;
			statsWords: &amp;quot;Parole&amp;quot;,&lt;br /&gt;
			statsLines: &amp;quot;Paragrafi&amp;quot;,&lt;br /&gt;
			statsComplexWords: &amp;quot;Parole complesse&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// global configuration&lt;br /&gt;
	window.MiniPedia = window.MiniPedia || {};&lt;br /&gt;
&lt;br /&gt;
	// shortcut&lt;br /&gt;
	var mp = window.MiniPedia;&lt;br /&gt;
&lt;br /&gt;
	// inherit default configurations&lt;br /&gt;
	$.extend( true, mp, DEFAULTS );&lt;br /&gt;
&lt;br /&gt;
	// another shortcut&lt;br /&gt;
	var L10N = mp.L10N;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Lazy shortcut to obtain just the first API result&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param  {Object} response API Response&lt;br /&gt;
	 * @return {Object} page object&lt;br /&gt;
	 */&lt;br /&gt;
	function justFirstQueryPage( response ) {&lt;br /&gt;
&lt;br /&gt;
		// no response no party&lt;br /&gt;
		if( !response.query || !response.query.pages ) {&lt;br /&gt;
			throw 'no valid API response';&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// the list should contain just one page&lt;br /&gt;
		var pages = response.query.pages;&lt;br /&gt;
		for( var id in pages ) {&lt;br /&gt;
			return pages[ id ];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// no page no party&lt;br /&gt;
		return false;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get a fresh MediaWiki API object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return mw.Api&lt;br /&gt;
	 */&lt;br /&gt;
	function mwApi() {&lt;br /&gt;
		return mw.loader.using( 'mediawiki.api' ).then( function() {&lt;br /&gt;
			return new mw.Api();&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if a page title already exists&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param title Page title&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function pageExists( title ) {&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'info',&lt;br /&gt;
			titles: title,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// eventually load API stuff&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request&lt;br /&gt;
			return api.get( request ).then( function ( response ) {&lt;br /&gt;
&lt;br /&gt;
				// check if it exists&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 ) {&lt;br /&gt;
					return page;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				return false;&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query the current page plain text&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page name (or none for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryPlainText( pageName ) {&lt;br /&gt;
&lt;br /&gt;
		// complete page title with namespace&lt;br /&gt;
		pageName = pageName || mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		// See https://phabricator.wikimedia.org/T259332&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'extracts',&lt;br /&gt;
			titles: pageName,&lt;br /&gt;
			explaintext: 1,&lt;br /&gt;
			exlimit: 1,&lt;br /&gt;
			exsectionformat: 'plain',&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// this will return a Promise resolving the page plain text, returned upstream&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request and return a Promise&lt;br /&gt;
			return api.get( request ).then( function( response ) {&lt;br /&gt;
&lt;br /&gt;
				// resolve the Promise with the page content&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 &amp;amp;&amp;amp; page.extract ) {&lt;br /&gt;
					return page.extract;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// no content&lt;br /&gt;
				return false;&lt;br /&gt;
&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Create a new Mini namespace object.&lt;br /&gt;
	 */&lt;br /&gt;
	function Mini(ns, shortLabel, openLabel, emoji) {&lt;br /&gt;
		this.ns = ns;&lt;br /&gt;
		this.shortLabel = shortLabel;&lt;br /&gt;
		this.openLabel = openLabel;&lt;br /&gt;
		this.emoji = emoji;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @return mw.Title&lt;br /&gt;
	 */&lt;br /&gt;
	Mini.prototype.createTitle = function(pageName) {&lt;br /&gt;
		return new mw.Title(pageName,  this.ns);&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.registerPortlet = function() {&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var mwTitle = this.createTitle(pageName);&lt;br /&gt;
		var portlet = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			mwTitle.getUrl(),&lt;br /&gt;
			this.emoji + ' ' + this.shortLabel,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			this.openLabel,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		var that = this;&lt;br /&gt;
		$(portlet).click( function(e) {&lt;br /&gt;
			that.onPortletClick(e);&lt;br /&gt;
		} );&lt;br /&gt;
&lt;br /&gt;
		return portlet;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onPortletClick = function(e) {&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var pageTitle = this.createTitle(pageName);&lt;br /&gt;
		var miniPageName = pageTitle.getPrefixedText();&lt;br /&gt;
		var miniPageUrl = pageTitle.getUrl();&lt;br /&gt;
		var that = this;&lt;br /&gt;
		// wait for multiple information&lt;br /&gt;
		$.when(&lt;br /&gt;
			// check if the page really exists&lt;br /&gt;
			pageExists( miniPageName ),&lt;br /&gt;
&lt;br /&gt;
			   // allow to open OO UI windows&lt;br /&gt;
			   mw.loader.using( 'oojs-ui-windows' )&lt;br /&gt;
&lt;br /&gt;
			   // callback fired when we have all the information&lt;br /&gt;
		).done( function( miniPageExists, loader ) {&lt;br /&gt;
&lt;br /&gt;
			// check if the page already exist&lt;br /&gt;
			if( miniPageExists ) {&lt;br /&gt;
&lt;br /&gt;
				// just redirect to the Minipedia version&lt;br /&gt;
				window.location = miniPageUrl;&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// ask if you want to create the page&lt;br /&gt;
&lt;br /&gt;
				// create message dialog window&lt;br /&gt;
				var messageDialog = new OO.ui.MessageDialog();&lt;br /&gt;
				var windowManager = new OO.ui.WindowManager();&lt;br /&gt;
				$( 'body' ).append( windowManager.$element );&lt;br /&gt;
				windowManager.addWindows( [ messageDialog ] );&lt;br /&gt;
&lt;br /&gt;
				// configure and open dialog&lt;br /&gt;
				var windowInstance = windowManager.openWindow( messageDialog, {&lt;br /&gt;
					title:   L10N.createMinipediaPageTitle,&lt;br /&gt;
					message: L10N.createMinipediaPageBody,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// check if you accepted the page creation&lt;br /&gt;
				windowInstance.closed.then( function ( data ) {&lt;br /&gt;
					// user is confirming the action&lt;br /&gt;
					if( data.action === 'accept' ) {&lt;br /&gt;
						// go go go! to mini&lt;br /&gt;
						that.onMinipediaConfirmation();&lt;br /&gt;
					}&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
			// end if page exists&lt;br /&gt;
		} );&lt;br /&gt;
		// end $.when()&lt;br /&gt;
&lt;br /&gt;
		// avoid scrolling to the top&lt;br /&gt;
		e.preventDefault();&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onMinipediaConfirmation = function() {&lt;br /&gt;
		/**&lt;br /&gt;
		 * Go to the Minipedia page in edit mode&lt;br /&gt;
		 *&lt;br /&gt;
		 * The page in the main namespace will be preloaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 */&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var mwTitle = this.createTitle(pageName);&lt;br /&gt;
		var miniPageName = mwTitle.getPrefixedText();&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Build the query string to edit a page&lt;br /&gt;
		 *&lt;br /&gt;
		 * TODO: eventually add VisualEditor support&lt;br /&gt;
		 */&lt;br /&gt;
		var editPageQueryString = {&lt;br /&gt;
			action: 'edit',&lt;br /&gt;
			title: miniPageName,&lt;br /&gt;
			preload: pageName,&lt;br /&gt;
			editintro: mp.editIntro,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// '/index.php'&lt;br /&gt;
		var wgScript = mw.config.get( 'wgScript' );&lt;br /&gt;
&lt;br /&gt;
		// go to the edit page URL&lt;br /&gt;
		window.location = wgScript + '?' + $.param( editPageQueryString );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the wiki&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareNormalpedia() {&lt;br /&gt;
		var miniElementary = new Mini(&lt;br /&gt;
		  mp.namespaceNum,&lt;br /&gt;
		  L10N.minipediaShort,&lt;br /&gt;
		  L10N.openMinipedia,&lt;br /&gt;
		  '🐣');&lt;br /&gt;
		var miniIntermediate = new Mini(&lt;br /&gt;
		  mp.namespaceIntermediateNum,&lt;br /&gt;
		  L10N.minipediaShortIntermediate,&lt;br /&gt;
		  L10N.openMinipediaIntermediate,&lt;br /&gt;
		  '📚');&lt;br /&gt;
		var miniAdvanced = new Mini(&lt;br /&gt;
		  mp.namespaceAdvancedNum,&lt;br /&gt;
		  L10N.minipediaShortAdvanced,&lt;br /&gt;
		  L10N.openMinipediaAdvanced,&lt;br /&gt;
		  '🔬');&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var miniVersionPortletLink = miniElementary.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Intermediate&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkIntermediate = miniIntermediate.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Advanced&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkAdvanced = miniAdvanced.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareNormalWiki()&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Calculate some stats over a text&lt;br /&gt;
	 */&lt;br /&gt;
	function textStats( text ) {&lt;br /&gt;
&lt;br /&gt;
		var stats = {};&lt;br /&gt;
&lt;br /&gt;
		text = text.trim();&lt;br /&gt;
&lt;br /&gt;
		// count long words&lt;br /&gt;
		var totalLongWords = 0;&lt;br /&gt;
		var word, words = text.split( /\s+/ );&lt;br /&gt;
		for( var i = 0; i &amp;lt; words.length; i++ ) {&lt;br /&gt;
			word = words[i];&lt;br /&gt;
			if( word.length &amp;gt; mp.longWordLen ) {&lt;br /&gt;
				totalLongWords++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// total amount of paragraphs&lt;br /&gt;
		// paragraphs shorter than this comment are discarded&lt;br /&gt;
		var totalLines = 0;&lt;br /&gt;
		var paragraphs = text.split( /\n+/ );&lt;br /&gt;
		var paragraph;&lt;br /&gt;
		for( var i = 0; i &amp;lt; paragraphs.length; i++ ) {&lt;br /&gt;
			paragraph = paragraphs[i].trim();&lt;br /&gt;
			if( paragraph.length &amp;gt; 30 ) {&lt;br /&gt;
				totalLines++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// how much lines?&lt;br /&gt;
		stats.totalLines = totalLines;&lt;br /&gt;
&lt;br /&gt;
		// how much words?&lt;br /&gt;
		stats.totalWords = words.length;&lt;br /&gt;
&lt;br /&gt;
		// how much of these words are so much long?&lt;br /&gt;
		// See 'longWordLen'&lt;br /&gt;
		stats.totalLongWords = totalLongWords;&lt;br /&gt;
&lt;br /&gt;
		return stats;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query content stats of the current page&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page title (or nothing for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryContentStats( pageTitle ) {&lt;br /&gt;
		return queryPlainText( pageTitle ).then( textStats );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Apply a stupid percentage&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {int} a&lt;br /&gt;
	 * @param {int} b&lt;br /&gt;
	 * @return The 'b%' applied to 'a'&lt;br /&gt;
	 */&lt;br /&gt;
	function applyPercentage( a, b ) {&lt;br /&gt;
		return parseInt( a * b / 100 );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia stats box&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipediaStatsBox() {&lt;br /&gt;
&lt;br /&gt;
		// normal page title (non-mini version)&lt;br /&gt;
		var mainPageTitle = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// body container&lt;br /&gt;
		var $contentText = $( '#mw-content-text' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the DOM tree&lt;br /&gt;
		var $container = $( '&amp;lt;div&amp;gt;' );&lt;br /&gt;
		var $table = $( '&amp;lt;table&amp;gt;' );&lt;br /&gt;
		var $thead = $( '&amp;lt;thead&amp;gt;' );&lt;br /&gt;
		var $tbody = $( '&amp;lt;tbody&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the stats container&lt;br /&gt;
		$container.addClass( 'minipedia-stats' );&lt;br /&gt;
&lt;br /&gt;
		// put a title&lt;br /&gt;
		$container.append( $( '&amp;lt;h2&amp;gt;' ).text( L10N.statsTitle ) );&lt;br /&gt;
&lt;br /&gt;
		// put the table&lt;br /&gt;
		$container.append( $table );&lt;br /&gt;
&lt;br /&gt;
		// add table headers&lt;br /&gt;
		$thead.append(&lt;br /&gt;
			$( '&amp;lt;tr&amp;gt;' ).append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSubject    ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingValue      ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingExpected   ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSimplicity ) )&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// prepare the table&lt;br /&gt;
		$table.addClass( 'wikitable' )&lt;br /&gt;
		      .append( $thead )&lt;br /&gt;
		      .append( $tbody );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Append a row (with a label and a value) into a table&lt;br /&gt;
		 *&lt;br /&gt;
		 * The data argument accepts an object with:&lt;br /&gt;
		 *&lt;br /&gt;
		 *   className:        Class name for the row&lt;br /&gt;
		 *   label:            Text displayed in row heading (left)&lt;br /&gt;
		 *   text:             Text displayed in row data (right)&lt;br /&gt;
		 *   value             Value associated to the text of the mini version&lt;br /&gt;
		 *   maxValue          Maximum suggested value&lt;br /&gt;
		 *   upstreamValue     The value of the upstream (main) version&lt;br /&gt;
		 *   upstreamLimitPerc The percentage (0-100) applied to the 'upstreamValue' to inherit a suitable 'maxValue'&lt;br /&gt;
		 *&lt;br /&gt;
		 * Note: this function uses OOUI widgets. Make sure to have them loaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 * @param {Object} jQuery table&lt;br /&gt;
		 * @param {Object} Data information&lt;br /&gt;
		 */&lt;br /&gt;
		function appendTableStatsRow( $table, data ) {&lt;br /&gt;
&lt;br /&gt;
			// read arguments&lt;br /&gt;
			var className = data.className;&lt;br /&gt;
			var label     = data.label;&lt;br /&gt;
			var value     = data.value;&lt;br /&gt;
			var maxValue  = data.maxValue;&lt;br /&gt;
			var text      = data.text || value;&lt;br /&gt;
&lt;br /&gt;
			// eventually calculate the max value&lt;br /&gt;
			if( !maxValue &amp;amp;&amp;amp; data.upstreamValue &amp;amp;&amp;amp; data.upstreamLimitPerc ) {&lt;br /&gt;
				maxValue = applyPercentage( data.upstreamValue, data.upstreamLimitPerc );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// prepare table stats row&lt;br /&gt;
			var $tr         = $( '&amp;lt;tr&amp;gt;' );&lt;br /&gt;
			var $tdLabel    = $( '&amp;lt;td&amp;gt;' ).text( label    );&lt;br /&gt;
			var $tdValue    = $( '&amp;lt;td&amp;gt;' ).text( text     );&lt;br /&gt;
			var $tdMax      = $( '&amp;lt;td&amp;gt;' ).text( maxValue );&lt;br /&gt;
			var $tdProgress = $( '&amp;lt;td&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
			// build the table row&lt;br /&gt;
			$tr.addClass( 'minipedia-stats-row-' + className );&lt;br /&gt;
			$tr.append( $tdLabel    )&lt;br /&gt;
			   .append( $tdValue    )&lt;br /&gt;
			   .append( $tdMax      )&lt;br /&gt;
			   .append( $tdProgress );&lt;br /&gt;
&lt;br /&gt;
			// if possible, plot a cute progress bar&lt;br /&gt;
			if( maxValue ) {&lt;br /&gt;
&lt;br /&gt;
				// calculate a 0-100 progress since the value and maxValue&lt;br /&gt;
				var realPercentage = parseInt( value / maxValue * 100 );&lt;br /&gt;
&lt;br /&gt;
				/**&lt;br /&gt;
				 * Calculate the inverse percentage&lt;br /&gt;
				 *&lt;br /&gt;
				 * This is the final percentage shown to the user.&lt;br /&gt;
				 *&lt;br /&gt;
				 * In short, it's always 100% but if you go over&lt;br /&gt;
				 * the limit it start decreasing and reaching zero,&lt;br /&gt;
				 * to rappresent a kind of 'understanding degradation'.&lt;br /&gt;
				 *&lt;br /&gt;
				 * To do not underrate the work of the user it should not go&lt;br /&gt;
				 * below a certain minimum amount. Example: 10%. :^)&lt;br /&gt;
				 *&lt;br /&gt;
				 * Actually the function is just linear.&lt;br /&gt;
				 */&lt;br /&gt;
				var inversePercentage = 100;&lt;br /&gt;
				if( realPercentage &amp;gt; 100 ) {&lt;br /&gt;
					inversePercentage = Math.max( 10, 200 - realPercentage );&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// generate the progress bar&lt;br /&gt;
				var progressBar = new OO.ui.ProgressBarWidget( {&lt;br /&gt;
					progress: inversePercentage,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// show the progress bar&lt;br /&gt;
				$tdProgress.append( progressBar.$element );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// attach some data to be read by scripts&lt;br /&gt;
			$tr.data( 'ministats', data );&lt;br /&gt;
&lt;br /&gt;
			// eventually emphasize if something is wrong&lt;br /&gt;
			if( value &amp;amp;&amp;amp; maxValue &amp;amp;&amp;amp; value &amp;gt; maxValue ) {&lt;br /&gt;
				$tr.addClass( 'minipedia-stats-row-problem' );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// show the row in the stats table&lt;br /&gt;
			$table.append( $tr );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// request multiple stuff at the same time&lt;br /&gt;
		$.when(&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the current mini page&lt;br /&gt;
			queryContentStats(),&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the related non-mini page&lt;br /&gt;
			queryContentStats( mainPageTitle ),&lt;br /&gt;
&lt;br /&gt;
			// require the progress bar widget&lt;br /&gt;
			mw.loader.using( 'oojs-ui-widgets' )&lt;br /&gt;
&lt;br /&gt;
		// callback fired when we have all the information&lt;br /&gt;
		).done( function( statsMini, statsMain, mwLoader ) {&lt;br /&gt;
&lt;br /&gt;
			// show the stats container at the bottom of the page when we have something&lt;br /&gt;
			$contentText.append( $container );&lt;br /&gt;
&lt;br /&gt;
			// check if we have also some information from the main namespace&lt;br /&gt;
			// in this case we can do a comparison&lt;br /&gt;
			if( statsMain ) {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they can be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'long-words',&lt;br /&gt;
					label:             L10N.statsComplexWords,&lt;br /&gt;
					value:             statsMini.totalLongWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalLongWords,&lt;br /&gt;
					upstreamLimitPerc: 10,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'words',&lt;br /&gt;
					label:             L10N.statsWords,&lt;br /&gt;
					value:             statsMini.totalWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalWords,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'lines',&lt;br /&gt;
					label:             L10N.statsLines,&lt;br /&gt;
					value:             statsMini.totalLines,&lt;br /&gt;
					maxValue:          statsMain.totalLines,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			// there is no the related main page&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they cannot be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'long-words',&lt;br /&gt;
					label:     L10N.statsComplexWords,&lt;br /&gt;
					value:     statsMini.totalLongWords,&lt;br /&gt;
					maxValue:  mp.maxComplexWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'words',&lt;br /&gt;
					label:     L10N.statsWords,&lt;br /&gt;
					value:     statsMini.totalWords,&lt;br /&gt;
					maxValue:  mp.maxStatsWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'lines',&lt;br /&gt;
					label:      L10N.statsLines,&lt;br /&gt;
					value:      statsMini.totalLines,&lt;br /&gt;
					maxValue:   mp.maxTotalLines,&lt;br /&gt;
				} );&lt;br /&gt;
			}&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia namespace&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipedia() {&lt;br /&gt;
&lt;br /&gt;
		// action of the page (edit, view etc.)&lt;br /&gt;
		var action = mw.config.get( 'wgAction' );&lt;br /&gt;
&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Normalpedia title object&lt;br /&gt;
		var normalTitleObject = new mw.Title( pageName );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var normalPageName = normalTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var normalPageUrl = normalTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var normalVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			normalPageUrl,&lt;br /&gt;
			L10N.normalpediaShort,&lt;br /&gt;
			'ca-normalpedia',&lt;br /&gt;
			L10N.openNormalpedia&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// check if we are in view mode&lt;br /&gt;
		if( action === 'view' ) {&lt;br /&gt;
&lt;br /&gt;
			// in view mode we can fetch the stats&lt;br /&gt;
			prepareMinipediaStatsBox();&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareMinipedia()&lt;br /&gt;
&lt;br /&gt;
	// work only in the main namespace&lt;br /&gt;
	var ns = mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	if( ns === 0 ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
	} else if( ns == mp.namespaceNum ) {&lt;br /&gt;
		prepareMinipedia();&lt;br /&gt;
	}&lt;br /&gt;
	// end namespace zero check&lt;br /&gt;
&lt;br /&gt;
} )( mw, $ );&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini_advanced:Sun&amp;diff=109</id>
		<title>Mini advanced:Sun</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini_advanced:Sun&amp;diff=109"/>
		<updated>2025-05-10T10:03:51Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: advanced demo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:The Sun by the Atmospheric Imaging Assembly of NASA's Solar Dynamics Observatory - 20100819.jpg|thumb|The Sun, by the Atmospheric imagery.]]&lt;br /&gt;
[[File:Cassini-science-br.jpg|thumb|Graphical representation of the deflection by the Sun's gravitational field of a radio wave sent by the Cassini probe.]]&lt;br /&gt;
The Sun is the predominant star at the center of our Solar System, characterized as a massive, nearly perfect sphere of hot plasma. Its energy is generated through nuclear fusion reactions occurring in its core, where hydrogen nuclei combine to form helium, releasing vast amounts of energy in the process. This energy radiates from the Sun's surface primarily as visible light and infrared radiation, with approximately 10% emitted as ultraviolet radiation. The Sun serves as the essential energy source for life on Earth and has been a significant object of veneration and study across various cultures and scientific disciplines throughout history.&lt;br /&gt;
&lt;br /&gt;
The Sun orbits the Galactic Center at a distance ranging from approximately 24,000 to 28,000 light-years. Its distance from Earth defines the astronomical unit (AU), which is about 93 million miles or roughly 8 light-minutes. The Sun's diameter is approximately 1.39 million kilometers (about 864,000 miles), making it roughly 109 times the diameter of Earth. In terms of mass, the Sun is about 330,000 times that of Earth, constituting approximately 99.86% of the total mass of the Solar System. The composition of the Sun is predominantly hydrogen (around 73%), followed by helium (approximately 25%), with trace amounts of heavier elements such as oxygen, carbon, neon, and iron.&lt;br /&gt;
&lt;br /&gt;
Classified as a G-type main-sequence star (G2V), the Sun is often referred to as a yellow dwarf, although its emitted light is actually white. The formation of the Sun occurred approximately 4.6 billion years ago through the gravitational collapse of matter within a large molecular cloud. Most of this material coalesced at the center, while the remaining matter formed an orbiting protoplanetary disk that eventually gave rise to the Solar System. As the central mass became increasingly hot and dense, it initiated nuclear fusion in its core, a process that fuses about 600 billion kilograms of hydrogen into helium every second, converting approximately 4 billion kilograms of matter into energy.&lt;br /&gt;
&lt;br /&gt;
In an estimated 4 to 7 billion years, as hydrogen fusion in the Sun's core diminishes, the Sun will no longer maintain hydrostatic equilibrium. This will result in a significant increase in core density and temperature, leading to the expansion of its outer layers and the transformation of the Sun into a red giant. Following this red giant phase, theoretical models suggest that the Sun will expel its outer layers, ultimately becoming a dense, cooling remnant known as a white dwarf. Although it will cease to produce energy through fusion, the white dwarf will continue to emit residual heat and light for potentially trillions of years. Eventually, it is hypothesized that the Sun will evolve into a super dense black dwarf, emitting negligible energy.&lt;br /&gt;
&lt;br /&gt;
The Sun is a remarkable and vital component of our universe, playing an indispensable role in the sustenance of life on Earth and serving as a focal point for astronomical research and understanding of stellar evolution.&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini_intermediate:Sun&amp;diff=108</id>
		<title>Mini intermediate:Sun</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini_intermediate:Sun&amp;diff=108"/>
		<updated>2025-05-10T09:59:54Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: intemediate demo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Solar System graphic by NASA (wide).png|thumb|The Sun, and the Solar System.]]&lt;br /&gt;
The '''Sun''' is the star at the center of our Solar System. It is a massive, nearly perfect sphere of hot plasma, heated to incandescence by nuclear fusion reactions occurring in its core. This process radiates energy from its surface primarily as visible light and infrared radiation, with about 10% emitted as ultraviolet energy. The Sun is the most important source of energy for life on Earth and has been revered in many cultures throughout history. It has also been a central focus of astronomical research since ancient times.&lt;br /&gt;
&lt;br /&gt;
The Sun orbits the Galactic Center at a distance of approximately 24,000 to 28,000 light-years. Its distance from Earth defines the astronomical unit, which is about 93 million miles or roughly 8 light-minutes. The Sun's diameter is about 864,000 miles, making it about 109 times wider than Earth. In terms of mass, the Sun is about 330,000 times that of Earth, accounting for about 99.86% of the total mass of the Solar System. Approximately three-quarters of the Sun's mass is hydrogen (around 73%), while the rest is mostly helium (about 25%), along with trace amounts of heavier elements such as oxygen, carbon, neon, and iron.&lt;br /&gt;
&lt;br /&gt;
The Sun is classified as a G-type main-sequence star (G2V), commonly referred to as a yellow dwarf, although its light is actually white. It formed around 4.6 billion years ago from the gravitational collapse of matter within a large molecular cloud. Most of this matter accumulated in the center, while the remaining material flattened into an orbiting disk that eventually became the Solar System. The central mass became so hot and dense that it initiated nuclear fusion in its core. Every second, the Sun fuses about 600 billion kilograms of hydrogen into helium and converts 4 billion kilograms of matter into energy.&lt;br /&gt;
&lt;br /&gt;
In about 4 to 7 billion years, when hydrogen fusion in the Sun's core decreases significantly, the Sun will no longer be in hydrostatic equilibrium. This will lead to an increase in density and temperature in its core, causing its outer layers to expand and transforming the Sun into a red giant. After this red giant phase, models suggest that the Sun will shed its outer layers and become a dense, cooling star known as a white dwarf. Although it will no longer produce energy through fusion, it will continue to glow and emit heat from its previous fusion for potentially trillions of years. Eventually, it is theorized that the Sun will become a super dense black dwarf, giving off negligible energy.&lt;br /&gt;
&lt;br /&gt;
The Sun is a fascinating and vital part of our universe, playing a crucial role in the existence of life on Earth.&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Sun&amp;diff=107</id>
		<title>Mini:Sun</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Sun&amp;diff=107"/>
		<updated>2025-05-10T09:57:43Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: elementary demo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Children in Yard.png|thumb|On the right, the Sun.]]&lt;br /&gt;
&lt;br /&gt;
The '''Sun''' is the big, bright star at the center of our Solar System. It is a huge, round ball made of hot gas, and it shines brightly because of special reactions happening deep inside it. These reactions, called nuclear fusion, create energy that warms our planet and gives us light. The Sun is very important for life on Earth!&lt;br /&gt;
&lt;br /&gt;
Many cultures throughout history have looked up at the Sun and admired it. Scientists have studied the Sun for a long time to learn more about it.&lt;br /&gt;
&lt;br /&gt;
The Sun travels around the center of our galaxy, which is a huge collection of stars. It is about 24,000 to 28,000 light-years away from the center. The distance from the Earth to the Sun is called an astronomical unit, which is about 93 million miles or about 8 light-minutes away! The Sun is really big, with a diameter that is about 109 times wider than Earth. It is also very heavy, weighing about 330,000 times as much as our planet. In fact, the Sun makes up about 99.86% of all the mass in the Solar System!&lt;br /&gt;
&lt;br /&gt;
Most of the Sun is made of hydrogen gas (about 73%), and it also has a lot of helium (about 25%). There are tiny amounts of other elements like oxygen, carbon, neon, and iron.&lt;br /&gt;
&lt;br /&gt;
The Sun is classified as a G-type main-sequence star, which is often called a yellow dwarf, even though its light is actually white. It formed about 4.6 billion years ago when a big cloud of gas and dust came together due to gravity. Most of the material gathered in the center, and the rest formed a disk that eventually became our Solar System. The center of the Sun got so hot and dense that it started nuclear fusion, which is why it shines so brightly. Every second, the Sun turns about 600 billion kilograms of hydrogen into helium and creates a lot of energy!&lt;br /&gt;
&lt;br /&gt;
In about 4 to 7 billion years, the Sun will start to change. When it runs low on hydrogen, it will get hotter and denser, causing it to expand and become a red giant. After this phase, the Sun will lose its outer layers and become a white dwarf, which is a smaller, cooler star. It will no longer create energy through fusion, but it will still glow and give off heat for a very long time—maybe even trillions of years! Eventually, it might become a black dwarf, which would give off very little energy.&lt;br /&gt;
&lt;br /&gt;
The Sun is an amazing part of our universe, and it plays a crucial role in making life possible on Earth!&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=106</id>
		<title>MediaWiki:Gadget-minipedia.js</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=106"/>
		<updated>2025-05-09T16:34:02Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: activate emojis&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/**&lt;br /&gt;
 * Make Minipedia magics&lt;br /&gt;
 *&lt;br /&gt;
 * Dependencies: mediawiki.util&lt;br /&gt;
 * Author: 2020-2025 [[User:ValerioBoz-WMCH]]&lt;br /&gt;
 *&lt;br /&gt;
 * See https://phabricator.wikimedia.org/tag/minipedia/&lt;br /&gt;
 */&lt;br /&gt;
( function ( mw, $ ) {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * CONFIGURATION/LOCALIZATION INSTRUCTIONS&lt;br /&gt;
	 *&lt;br /&gt;
	 * Declare somewhere something like this:&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // assure that you do not overwrite other-people customizations&lt;br /&gt;
	 *   window.MiniPedia      = window.MiniPedia      || {};&lt;br /&gt;
	 *   window.MiniPedia.L10N = window.MiniPedia.L10N || {};&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // then customize something&lt;br /&gt;
 	 *   window.MiniPedia.editIntro      = 'Project:How to create';&lt;br /&gt;
	 *   window.MiniPedia.L10N.minipedia = 'Otherpedia';&lt;br /&gt;
	 */&lt;br /&gt;
&lt;br /&gt;
	// load localization defaults&lt;br /&gt;
	var DEFAULTS = {&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespace: 'Mini',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceNum: 3002,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediate: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediateNum: 3004,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvanced: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvancedNum: 3006,&lt;br /&gt;
&lt;br /&gt;
		// default edit intro page title&lt;br /&gt;
		editIntro: 'Progetto:Minipedia/Creazione voce',&lt;br /&gt;
&lt;br /&gt;
		// how much characters should have a word to be considered too much lon&lt;br /&gt;
		// this somehow help people with dyslexia&lt;br /&gt;
		longWordLen: 13,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of acceptable complex words to help people with dyslexia&lt;br /&gt;
		maxComplexWords: 10,&lt;br /&gt;
&lt;br /&gt;
		// min and max number of suggested words to somehow mitigate attention span problems&lt;br /&gt;
		maxWords: 700,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of suggested newlines&lt;br /&gt;
		maxTotalLines: 180,&lt;br /&gt;
&lt;br /&gt;
		// localization stuff&lt;br /&gt;
		L10N: {&lt;br /&gt;
			minipedia: &amp;quot;Minipedia&amp;quot;,&lt;br /&gt;
			minipediaShort: &amp;quot;Mini&amp;quot;,&lt;br /&gt;
			minipediaShortIntermediate: &amp;quot;Intermediate&amp;quot;,&lt;br /&gt;
			minipediaShortAdvanced: &amp;quot;Advanced&amp;quot;,&lt;br /&gt;
			normalpedia: &amp;quot;Wikipedia Test&amp;quot;,&lt;br /&gt;
			normalpediaShort: &amp;quot;WikipediaTest&amp;quot;,&lt;br /&gt;
			openMinipedia: &amp;quot;Apri Minipedia&amp;quot;,&lt;br /&gt;
			openMinipediaIntermediate: &amp;quot;Open Minipedia Intermediate&amp;quot;,&lt;br /&gt;
			openMinipediaAdvanced: &amp;quot;Open Minipedia Advanced&amp;quot;,&lt;br /&gt;
			openNormalpedia: &amp;quot;Apri Wikipedia Test&amp;quot;,&lt;br /&gt;
			createMinipediaPageTitle: &amp;quot;Accesso Minipedia&amp;quot;,&lt;br /&gt;
			createMinipediaPageBody: &amp;quot;Sii il primo a creare una versione più ridotta e più accessibile di questa voce, in Minipedia!&amp;quot;,&lt;br /&gt;
			statsTitle: &amp;quot;Mini Report&amp;quot;,&lt;br /&gt;
			statsHeadingSubject: &amp;quot;Fattore&amp;quot;,&lt;br /&gt;
			statsHeadingValue: &amp;quot;Valore attuale&amp;quot;,&lt;br /&gt;
			statsHeadingExpected: &amp;quot;Limite consigliato&amp;quot;,&lt;br /&gt;
			statsHeadingSimplicity: &amp;quot;Semplicità&amp;quot;,&lt;br /&gt;
			statsWords: &amp;quot;Parole&amp;quot;,&lt;br /&gt;
			statsLines: &amp;quot;Paragrafi&amp;quot;,&lt;br /&gt;
			statsComplexWords: &amp;quot;Parole complesse&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// global configuration&lt;br /&gt;
	window.MiniPedia = window.MiniPedia || {};&lt;br /&gt;
&lt;br /&gt;
	// shortcut&lt;br /&gt;
	var mp = window.MiniPedia;&lt;br /&gt;
&lt;br /&gt;
	// inherit default configurations&lt;br /&gt;
	$.extend( true, mp, DEFAULTS );&lt;br /&gt;
&lt;br /&gt;
	// another shortcut&lt;br /&gt;
	var L10N = mp.L10N;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Lazy shortcut to obtain just the first API result&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param  {Object} response API Response&lt;br /&gt;
	 * @return {Object} page object&lt;br /&gt;
	 */&lt;br /&gt;
	function justFirstQueryPage( response ) {&lt;br /&gt;
&lt;br /&gt;
		// no response no party&lt;br /&gt;
		if( !response.query || !response.query.pages ) {&lt;br /&gt;
			throw 'no valid API response';&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// the list should contain just one page&lt;br /&gt;
		var pages = response.query.pages;&lt;br /&gt;
		for( var id in pages ) {&lt;br /&gt;
			return pages[ id ];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// no page no party&lt;br /&gt;
		return false;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get a fresh MediaWiki API object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return mw.Api&lt;br /&gt;
	 */&lt;br /&gt;
	function mwApi() {&lt;br /&gt;
		return mw.loader.using( 'mediawiki.api' ).then( function() {&lt;br /&gt;
			return new mw.Api();&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if a page title already exists&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param title Page title&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function pageExists( title ) {&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'info',&lt;br /&gt;
			titles: title,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// eventually load API stuff&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request&lt;br /&gt;
			return api.get( request ).then( function ( response ) {&lt;br /&gt;
&lt;br /&gt;
				// check if it exists&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 ) {&lt;br /&gt;
					return page;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				return false;&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query the current page plain text&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page name (or none for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryPlainText( pageName ) {&lt;br /&gt;
&lt;br /&gt;
		// complete page title with namespace&lt;br /&gt;
		pageName = pageName || mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		// See https://phabricator.wikimedia.org/T259332&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'extracts',&lt;br /&gt;
			titles: pageName,&lt;br /&gt;
			explaintext: 1,&lt;br /&gt;
			exlimit: 1,&lt;br /&gt;
			exsectionformat: 'plain',&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// this will return a Promise resolving the page plain text, returned upstream&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request and return a Promise&lt;br /&gt;
			return api.get( request ).then( function( response ) {&lt;br /&gt;
&lt;br /&gt;
				// resolve the Promise with the page content&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 &amp;amp;&amp;amp; page.extract ) {&lt;br /&gt;
					return page.extract;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// no content&lt;br /&gt;
				return false;&lt;br /&gt;
&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Create a new Mini namespace object.&lt;br /&gt;
	 */&lt;br /&gt;
	function Mini(ns, shortLabel, openLabel, emoji) {&lt;br /&gt;
		this.ns = ns;&lt;br /&gt;
		this.shortLabel = shortLabel;&lt;br /&gt;
		this.openLabel = openLabel;&lt;br /&gt;
		this.emoji = emoji;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @return mw.Title&lt;br /&gt;
	 */&lt;br /&gt;
	Mini.prototype.createTitle = function(pageName) {&lt;br /&gt;
		return new mw.Title(pageName,  this.ns);&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.registerPortlet = function() {&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var mwTitle = this.createTitle(pageName);&lt;br /&gt;
		var portlet = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			mwTitle.getUrl(),&lt;br /&gt;
			this.emoji + ' ' + this.shortLabel,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			this.openLabel,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		var that = this;&lt;br /&gt;
		$(portlet).click( function(e) {&lt;br /&gt;
			that.onPortletClick(e);&lt;br /&gt;
		} );&lt;br /&gt;
&lt;br /&gt;
		return portlet;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onPortletClick = function(e) {&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var miniPageName = this.createTitle(pageName).getPrefixedText();&lt;br /&gt;
		var that = this;&lt;br /&gt;
		// wait for multiple information&lt;br /&gt;
		$.when(&lt;br /&gt;
			// check if the page really exists&lt;br /&gt;
			pageExists( miniPageName ),&lt;br /&gt;
&lt;br /&gt;
			   // allow to open OO UI windows&lt;br /&gt;
			   mw.loader.using( 'oojs-ui-windows' )&lt;br /&gt;
&lt;br /&gt;
			   // callback fired when we have all the information&lt;br /&gt;
		).done( function( miniPageExists, loader ) {&lt;br /&gt;
&lt;br /&gt;
			// check if the page already exist&lt;br /&gt;
			if( miniPageExists ) {&lt;br /&gt;
&lt;br /&gt;
				// just redirect to the Minipedia version&lt;br /&gt;
				window.location = miniPageUrl;&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// ask if you want to create the page&lt;br /&gt;
&lt;br /&gt;
				// create message dialog window&lt;br /&gt;
				var messageDialog = new OO.ui.MessageDialog();&lt;br /&gt;
				var windowManager = new OO.ui.WindowManager();&lt;br /&gt;
				$( 'body' ).append( windowManager.$element );&lt;br /&gt;
				windowManager.addWindows( [ messageDialog ] );&lt;br /&gt;
&lt;br /&gt;
				// configure and open dialog&lt;br /&gt;
				var windowInstance = windowManager.openWindow( messageDialog, {&lt;br /&gt;
					title:   L10N.createMinipediaPageTitle,&lt;br /&gt;
					message: L10N.createMinipediaPageBody,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// check if you accepted the page creation&lt;br /&gt;
				windowInstance.closed.then( function ( data ) {&lt;br /&gt;
					// user is confirming the action&lt;br /&gt;
					if( data.action === 'accept' ) {&lt;br /&gt;
						// go go go! to mini&lt;br /&gt;
						that.onMinipediaConfirmation();&lt;br /&gt;
					}&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
			// end if page exists&lt;br /&gt;
		} );&lt;br /&gt;
		// end $.when()&lt;br /&gt;
&lt;br /&gt;
		// avoid scrolling to the top&lt;br /&gt;
		e.preventDefault();&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onMinipediaConfirmation = function() {&lt;br /&gt;
		/**&lt;br /&gt;
		 * Go to the Minipedia page in edit mode&lt;br /&gt;
		 *&lt;br /&gt;
		 * The page in the main namespace will be preloaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 */&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var mwTitle = this.createTitle(pageName);&lt;br /&gt;
		var miniPageName = mwTitle.getPrefixedText();&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Build the query string to edit a page&lt;br /&gt;
		 *&lt;br /&gt;
		 * TODO: eventually add VisualEditor support&lt;br /&gt;
		 */&lt;br /&gt;
		var editPageQueryString = {&lt;br /&gt;
			action: 'edit',&lt;br /&gt;
			title: miniPageName,&lt;br /&gt;
			preload: pageName,&lt;br /&gt;
			editintro: mp.editIntro,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// '/index.php'&lt;br /&gt;
		var wgScript = mw.config.get( 'wgScript' );&lt;br /&gt;
&lt;br /&gt;
		// go to the edit page URL&lt;br /&gt;
		window.location = wgScript + '?' + $.param( editPageQueryString );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the wiki&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareNormalpedia() {&lt;br /&gt;
		var miniElementary = new Mini(&lt;br /&gt;
		  mp.namespaceNum,&lt;br /&gt;
		  L10N.minipediaShort,&lt;br /&gt;
		  L10N.openMinipedia,&lt;br /&gt;
		  '🐣');&lt;br /&gt;
		var miniIntermediate = new Mini(&lt;br /&gt;
		  mp.namespaceIntermediateNum,&lt;br /&gt;
		  L10N.minipediaShortIntermediate,&lt;br /&gt;
		  L10N.openMinipediaIntermediate,&lt;br /&gt;
		  '📚');&lt;br /&gt;
		var miniAdvanced = new Mini(&lt;br /&gt;
		  mp.namespaceAdvancedNum,&lt;br /&gt;
		  L10N.minipediaShortAdvanced,&lt;br /&gt;
		  L10N.openMinipediaAdvanced,&lt;br /&gt;
		  '🔬');&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var miniVersionPortletLink = miniElementary.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Intermediate&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkIntermediate = miniIntermediate.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Advanced&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkAdvanced = miniAdvanced.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareNormalWiki()&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Calculate some stats over a text&lt;br /&gt;
	 */&lt;br /&gt;
	function textStats( text ) {&lt;br /&gt;
&lt;br /&gt;
		var stats = {};&lt;br /&gt;
&lt;br /&gt;
		text = text.trim();&lt;br /&gt;
&lt;br /&gt;
		// count long words&lt;br /&gt;
		var totalLongWords = 0;&lt;br /&gt;
		var word, words = text.split( /\s+/ );&lt;br /&gt;
		for( var i = 0; i &amp;lt; words.length; i++ ) {&lt;br /&gt;
			word = words[i];&lt;br /&gt;
			if( word.length &amp;gt; mp.longWordLen ) {&lt;br /&gt;
				totalLongWords++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// total amount of paragraphs&lt;br /&gt;
		// paragraphs shorter than this comment are discarded&lt;br /&gt;
		var totalLines = 0;&lt;br /&gt;
		var paragraphs = text.split( /\n+/ );&lt;br /&gt;
		var paragraph;&lt;br /&gt;
		for( var i = 0; i &amp;lt; paragraphs.length; i++ ) {&lt;br /&gt;
			paragraph = paragraphs[i].trim();&lt;br /&gt;
			if( paragraph.length &amp;gt; 30 ) {&lt;br /&gt;
				totalLines++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// how much lines?&lt;br /&gt;
		stats.totalLines = totalLines;&lt;br /&gt;
&lt;br /&gt;
		// how much words?&lt;br /&gt;
		stats.totalWords = words.length;&lt;br /&gt;
&lt;br /&gt;
		// how much of these words are so much long?&lt;br /&gt;
		// See 'longWordLen'&lt;br /&gt;
		stats.totalLongWords = totalLongWords;&lt;br /&gt;
&lt;br /&gt;
		return stats;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query content stats of the current page&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page title (or nothing for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryContentStats( pageTitle ) {&lt;br /&gt;
		return queryPlainText( pageTitle ).then( textStats );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Apply a stupid percentage&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {int} a&lt;br /&gt;
	 * @param {int} b&lt;br /&gt;
	 * @return The 'b%' applied to 'a'&lt;br /&gt;
	 */&lt;br /&gt;
	function applyPercentage( a, b ) {&lt;br /&gt;
		return parseInt( a * b / 100 );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia stats box&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipediaStatsBox() {&lt;br /&gt;
&lt;br /&gt;
		// normal page title (non-mini version)&lt;br /&gt;
		var mainPageTitle = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// body container&lt;br /&gt;
		var $contentText = $( '#mw-content-text' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the DOM tree&lt;br /&gt;
		var $container = $( '&amp;lt;div&amp;gt;' );&lt;br /&gt;
		var $table = $( '&amp;lt;table&amp;gt;' );&lt;br /&gt;
		var $thead = $( '&amp;lt;thead&amp;gt;' );&lt;br /&gt;
		var $tbody = $( '&amp;lt;tbody&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the stats container&lt;br /&gt;
		$container.addClass( 'minipedia-stats' );&lt;br /&gt;
&lt;br /&gt;
		// put a title&lt;br /&gt;
		$container.append( $( '&amp;lt;h2&amp;gt;' ).text( L10N.statsTitle ) );&lt;br /&gt;
&lt;br /&gt;
		// put the table&lt;br /&gt;
		$container.append( $table );&lt;br /&gt;
&lt;br /&gt;
		// add table headers&lt;br /&gt;
		$thead.append(&lt;br /&gt;
			$( '&amp;lt;tr&amp;gt;' ).append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSubject    ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingValue      ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingExpected   ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSimplicity ) )&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// prepare the table&lt;br /&gt;
		$table.addClass( 'wikitable' )&lt;br /&gt;
		      .append( $thead )&lt;br /&gt;
		      .append( $tbody );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Append a row (with a label and a value) into a table&lt;br /&gt;
		 *&lt;br /&gt;
		 * The data argument accepts an object with:&lt;br /&gt;
		 *&lt;br /&gt;
		 *   className:        Class name for the row&lt;br /&gt;
		 *   label:            Text displayed in row heading (left)&lt;br /&gt;
		 *   text:             Text displayed in row data (right)&lt;br /&gt;
		 *   value             Value associated to the text of the mini version&lt;br /&gt;
		 *   maxValue          Maximum suggested value&lt;br /&gt;
		 *   upstreamValue     The value of the upstream (main) version&lt;br /&gt;
		 *   upstreamLimitPerc The percentage (0-100) applied to the 'upstreamValue' to inherit a suitable 'maxValue'&lt;br /&gt;
		 *&lt;br /&gt;
		 * Note: this function uses OOUI widgets. Make sure to have them loaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 * @param {Object} jQuery table&lt;br /&gt;
		 * @param {Object} Data information&lt;br /&gt;
		 */&lt;br /&gt;
		function appendTableStatsRow( $table, data ) {&lt;br /&gt;
&lt;br /&gt;
			// read arguments&lt;br /&gt;
			var className = data.className;&lt;br /&gt;
			var label     = data.label;&lt;br /&gt;
			var value     = data.value;&lt;br /&gt;
			var maxValue  = data.maxValue;&lt;br /&gt;
			var text      = data.text || value;&lt;br /&gt;
&lt;br /&gt;
			// eventually calculate the max value&lt;br /&gt;
			if( !maxValue &amp;amp;&amp;amp; data.upstreamValue &amp;amp;&amp;amp; data.upstreamLimitPerc ) {&lt;br /&gt;
				maxValue = applyPercentage( data.upstreamValue, data.upstreamLimitPerc );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// prepare table stats row&lt;br /&gt;
			var $tr         = $( '&amp;lt;tr&amp;gt;' );&lt;br /&gt;
			var $tdLabel    = $( '&amp;lt;td&amp;gt;' ).text( label    );&lt;br /&gt;
			var $tdValue    = $( '&amp;lt;td&amp;gt;' ).text( text     );&lt;br /&gt;
			var $tdMax      = $( '&amp;lt;td&amp;gt;' ).text( maxValue );&lt;br /&gt;
			var $tdProgress = $( '&amp;lt;td&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
			// build the table row&lt;br /&gt;
			$tr.addClass( 'minipedia-stats-row-' + className );&lt;br /&gt;
			$tr.append( $tdLabel    )&lt;br /&gt;
			   .append( $tdValue    )&lt;br /&gt;
			   .append( $tdMax      )&lt;br /&gt;
			   .append( $tdProgress );&lt;br /&gt;
&lt;br /&gt;
			// if possible, plot a cute progress bar&lt;br /&gt;
			if( maxValue ) {&lt;br /&gt;
&lt;br /&gt;
				// calculate a 0-100 progress since the value and maxValue&lt;br /&gt;
				var realPercentage = parseInt( value / maxValue * 100 );&lt;br /&gt;
&lt;br /&gt;
				/**&lt;br /&gt;
				 * Calculate the inverse percentage&lt;br /&gt;
				 *&lt;br /&gt;
				 * This is the final percentage shown to the user.&lt;br /&gt;
				 *&lt;br /&gt;
				 * In short, it's always 100% but if you go over&lt;br /&gt;
				 * the limit it start decreasing and reaching zero,&lt;br /&gt;
				 * to rappresent a kind of 'understanding degradation'.&lt;br /&gt;
				 *&lt;br /&gt;
				 * To do not underrate the work of the user it should not go&lt;br /&gt;
				 * below a certain minimum amount. Example: 10%. :^)&lt;br /&gt;
				 *&lt;br /&gt;
				 * Actually the function is just linear.&lt;br /&gt;
				 */&lt;br /&gt;
				var inversePercentage = 100;&lt;br /&gt;
				if( realPercentage &amp;gt; 100 ) {&lt;br /&gt;
					inversePercentage = Math.max( 10, 200 - realPercentage );&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// generate the progress bar&lt;br /&gt;
				var progressBar = new OO.ui.ProgressBarWidget( {&lt;br /&gt;
					progress: inversePercentage,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// show the progress bar&lt;br /&gt;
				$tdProgress.append( progressBar.$element );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// attach some data to be read by scripts&lt;br /&gt;
			$tr.data( 'ministats', data );&lt;br /&gt;
&lt;br /&gt;
			// eventually emphasize if something is wrong&lt;br /&gt;
			if( value &amp;amp;&amp;amp; maxValue &amp;amp;&amp;amp; value &amp;gt; maxValue ) {&lt;br /&gt;
				$tr.addClass( 'minipedia-stats-row-problem' );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// show the row in the stats table&lt;br /&gt;
			$table.append( $tr );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// request multiple stuff at the same time&lt;br /&gt;
		$.when(&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the current mini page&lt;br /&gt;
			queryContentStats(),&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the related non-mini page&lt;br /&gt;
			queryContentStats( mainPageTitle ),&lt;br /&gt;
&lt;br /&gt;
			// require the progress bar widget&lt;br /&gt;
			mw.loader.using( 'oojs-ui-widgets' )&lt;br /&gt;
&lt;br /&gt;
		// callback fired when we have all the information&lt;br /&gt;
		).done( function( statsMini, statsMain, mwLoader ) {&lt;br /&gt;
&lt;br /&gt;
			// show the stats container at the bottom of the page when we have something&lt;br /&gt;
			$contentText.append( $container );&lt;br /&gt;
&lt;br /&gt;
			// check if we have also some information from the main namespace&lt;br /&gt;
			// in this case we can do a comparison&lt;br /&gt;
			if( statsMain ) {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they can be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'long-words',&lt;br /&gt;
					label:             L10N.statsComplexWords,&lt;br /&gt;
					value:             statsMini.totalLongWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalLongWords,&lt;br /&gt;
					upstreamLimitPerc: 10,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'words',&lt;br /&gt;
					label:             L10N.statsWords,&lt;br /&gt;
					value:             statsMini.totalWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalWords,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'lines',&lt;br /&gt;
					label:             L10N.statsLines,&lt;br /&gt;
					value:             statsMini.totalLines,&lt;br /&gt;
					maxValue:          statsMain.totalLines,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			// there is no the related main page&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they cannot be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'long-words',&lt;br /&gt;
					label:     L10N.statsComplexWords,&lt;br /&gt;
					value:     statsMini.totalLongWords,&lt;br /&gt;
					maxValue:  mp.maxComplexWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'words',&lt;br /&gt;
					label:     L10N.statsWords,&lt;br /&gt;
					value:     statsMini.totalWords,&lt;br /&gt;
					maxValue:  mp.maxStatsWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'lines',&lt;br /&gt;
					label:      L10N.statsLines,&lt;br /&gt;
					value:      statsMini.totalLines,&lt;br /&gt;
					maxValue:   mp.maxTotalLines,&lt;br /&gt;
				} );&lt;br /&gt;
			}&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia namespace&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipedia() {&lt;br /&gt;
&lt;br /&gt;
		// action of the page (edit, view etc.)&lt;br /&gt;
		var action = mw.config.get( 'wgAction' );&lt;br /&gt;
&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Normalpedia title object&lt;br /&gt;
		var normalTitleObject = new mw.Title( pageName );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var normalPageName = normalTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var normalPageUrl = normalTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var normalVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			normalPageUrl,&lt;br /&gt;
			L10N.normalpediaShort,&lt;br /&gt;
			'ca-normalpedia',&lt;br /&gt;
			L10N.openNormalpedia&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// check if we are in view mode&lt;br /&gt;
		if( action === 'view' ) {&lt;br /&gt;
&lt;br /&gt;
			// in view mode we can fetch the stats&lt;br /&gt;
			prepareMinipediaStatsBox();&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareMinipedia()&lt;br /&gt;
&lt;br /&gt;
	// work only in the main namespace&lt;br /&gt;
	var ns = mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	if( ns === 0 ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
	} else if( ns == mp.namespaceNum ) {&lt;br /&gt;
		prepareMinipedia();&lt;br /&gt;
	}&lt;br /&gt;
	// end namespace zero check&lt;br /&gt;
&lt;br /&gt;
} )( mw, $ );&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=105</id>
		<title>MediaWiki:Gadget-minipedia.js</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=105"/>
		<updated>2025-05-09T16:32:02Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: modernize with class Mini&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/**&lt;br /&gt;
 * Make Minipedia magics&lt;br /&gt;
 *&lt;br /&gt;
 * Dependencies: mediawiki.util&lt;br /&gt;
 * Author: 2020-2025 [[User:ValerioBoz-WMCH]]&lt;br /&gt;
 *&lt;br /&gt;
 * See https://phabricator.wikimedia.org/tag/minipedia/&lt;br /&gt;
 */&lt;br /&gt;
( function ( mw, $ ) {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * CONFIGURATION/LOCALIZATION INSTRUCTIONS&lt;br /&gt;
	 *&lt;br /&gt;
	 * Declare somewhere something like this:&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // assure that you do not overwrite other-people customizations&lt;br /&gt;
	 *   window.MiniPedia      = window.MiniPedia      || {};&lt;br /&gt;
	 *   window.MiniPedia.L10N = window.MiniPedia.L10N || {};&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // then customize something&lt;br /&gt;
 	 *   window.MiniPedia.editIntro      = 'Project:How to create';&lt;br /&gt;
	 *   window.MiniPedia.L10N.minipedia = 'Otherpedia';&lt;br /&gt;
	 */&lt;br /&gt;
&lt;br /&gt;
	// load localization defaults&lt;br /&gt;
	var DEFAULTS = {&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespace: 'Mini',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceNum: 3002,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediate: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediateNum: 3004,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvanced: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvancedNum: 3006,&lt;br /&gt;
&lt;br /&gt;
		// default edit intro page title&lt;br /&gt;
		editIntro: 'Progetto:Minipedia/Creazione voce',&lt;br /&gt;
&lt;br /&gt;
		// how much characters should have a word to be considered too much lon&lt;br /&gt;
		// this somehow help people with dyslexia&lt;br /&gt;
		longWordLen: 13,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of acceptable complex words to help people with dyslexia&lt;br /&gt;
		maxComplexWords: 10,&lt;br /&gt;
&lt;br /&gt;
		// min and max number of suggested words to somehow mitigate attention span problems&lt;br /&gt;
		maxWords: 700,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of suggested newlines&lt;br /&gt;
		maxTotalLines: 180,&lt;br /&gt;
&lt;br /&gt;
		// localization stuff&lt;br /&gt;
		L10N: {&lt;br /&gt;
			minipedia: &amp;quot;Minipedia&amp;quot;,&lt;br /&gt;
			minipediaShort: &amp;quot;Mini&amp;quot;,&lt;br /&gt;
			minipediaShortIntermediate: &amp;quot;Intermediate&amp;quot;,&lt;br /&gt;
			minipediaShortAdvanced: &amp;quot;Advanced&amp;quot;,&lt;br /&gt;
			normalpedia: &amp;quot;Wikipedia Test&amp;quot;,&lt;br /&gt;
			normalpediaShort: &amp;quot;WikipediaTest&amp;quot;,&lt;br /&gt;
			openMinipedia: &amp;quot;Apri Minipedia&amp;quot;,&lt;br /&gt;
			openMinipediaIntermediate: &amp;quot;Open Minipedia Intermediate&amp;quot;,&lt;br /&gt;
			openMinipediaAdvanced: &amp;quot;Open Minipedia Advanced&amp;quot;,&lt;br /&gt;
			openNormalpedia: &amp;quot;Apri Wikipedia Test&amp;quot;,&lt;br /&gt;
			createMinipediaPageTitle: &amp;quot;Accesso Minipedia&amp;quot;,&lt;br /&gt;
			createMinipediaPageBody: &amp;quot;Sii il primo a creare una versione più ridotta e più accessibile di questa voce, in Minipedia!&amp;quot;,&lt;br /&gt;
			statsTitle: &amp;quot;Mini Report&amp;quot;,&lt;br /&gt;
			statsHeadingSubject: &amp;quot;Fattore&amp;quot;,&lt;br /&gt;
			statsHeadingValue: &amp;quot;Valore attuale&amp;quot;,&lt;br /&gt;
			statsHeadingExpected: &amp;quot;Limite consigliato&amp;quot;,&lt;br /&gt;
			statsHeadingSimplicity: &amp;quot;Semplicità&amp;quot;,&lt;br /&gt;
			statsWords: &amp;quot;Parole&amp;quot;,&lt;br /&gt;
			statsLines: &amp;quot;Paragrafi&amp;quot;,&lt;br /&gt;
			statsComplexWords: &amp;quot;Parole complesse&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// global configuration&lt;br /&gt;
	window.MiniPedia = window.MiniPedia || {};&lt;br /&gt;
&lt;br /&gt;
	// shortcut&lt;br /&gt;
	var mp = window.MiniPedia;&lt;br /&gt;
&lt;br /&gt;
	// inherit default configurations&lt;br /&gt;
	$.extend( true, mp, DEFAULTS );&lt;br /&gt;
&lt;br /&gt;
	// another shortcut&lt;br /&gt;
	var L10N = mp.L10N;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Lazy shortcut to obtain just the first API result&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param  {Object} response API Response&lt;br /&gt;
	 * @return {Object} page object&lt;br /&gt;
	 */&lt;br /&gt;
	function justFirstQueryPage( response ) {&lt;br /&gt;
&lt;br /&gt;
		// no response no party&lt;br /&gt;
		if( !response.query || !response.query.pages ) {&lt;br /&gt;
			throw 'no valid API response';&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// the list should contain just one page&lt;br /&gt;
		var pages = response.query.pages;&lt;br /&gt;
		for( var id in pages ) {&lt;br /&gt;
			return pages[ id ];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// no page no party&lt;br /&gt;
		return false;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get a fresh MediaWiki API object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return mw.Api&lt;br /&gt;
	 */&lt;br /&gt;
	function mwApi() {&lt;br /&gt;
		return mw.loader.using( 'mediawiki.api' ).then( function() {&lt;br /&gt;
			return new mw.Api();&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if a page title already exists&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param title Page title&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function pageExists( title ) {&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'info',&lt;br /&gt;
			titles: title,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// eventually load API stuff&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request&lt;br /&gt;
			return api.get( request ).then( function ( response ) {&lt;br /&gt;
&lt;br /&gt;
				// check if it exists&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 ) {&lt;br /&gt;
					return page;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				return false;&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query the current page plain text&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page name (or none for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryPlainText( pageName ) {&lt;br /&gt;
&lt;br /&gt;
		// complete page title with namespace&lt;br /&gt;
		pageName = pageName || mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		// See https://phabricator.wikimedia.org/T259332&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'extracts',&lt;br /&gt;
			titles: pageName,&lt;br /&gt;
			explaintext: 1,&lt;br /&gt;
			exlimit: 1,&lt;br /&gt;
			exsectionformat: 'plain',&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// this will return a Promise resolving the page plain text, returned upstream&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request and return a Promise&lt;br /&gt;
			return api.get( request ).then( function( response ) {&lt;br /&gt;
&lt;br /&gt;
				// resolve the Promise with the page content&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 &amp;amp;&amp;amp; page.extract ) {&lt;br /&gt;
					return page.extract;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// no content&lt;br /&gt;
				return false;&lt;br /&gt;
&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Create a new Mini namespace object.&lt;br /&gt;
	 */&lt;br /&gt;
	function Mini(ns, shortLabel, openLabel, emoji) {&lt;br /&gt;
		this.ns = ns;&lt;br /&gt;
		this.shortLabel = shortLabel;&lt;br /&gt;
		this.openLabel = openLabel;&lt;br /&gt;
		this.emoji = emoji;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @return mw.Title&lt;br /&gt;
	 */&lt;br /&gt;
	Mini.prototype.createTitle = function(pageName) {&lt;br /&gt;
		return new mw.Title(pageName,  this.ns);&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.registerPortlet = function() {&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var mwTitle = this.createTitle(pageName);&lt;br /&gt;
		var portlet = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			mwTitle.getUrl(),&lt;br /&gt;
			this.shortLabel,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			this.openLabel,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		var that = this;&lt;br /&gt;
		$(portlet).click( function(e) {&lt;br /&gt;
			that.onPortletClick(e);&lt;br /&gt;
		} );&lt;br /&gt;
&lt;br /&gt;
		return portlet;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onPortletClick = function(e) {&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var miniPageName = this.createTitle(pageName).getPrefixedText();&lt;br /&gt;
		var that = this;&lt;br /&gt;
		// wait for multiple information&lt;br /&gt;
		$.when(&lt;br /&gt;
			// check if the page really exists&lt;br /&gt;
			pageExists( miniPageName ),&lt;br /&gt;
&lt;br /&gt;
			   // allow to open OO UI windows&lt;br /&gt;
			   mw.loader.using( 'oojs-ui-windows' )&lt;br /&gt;
&lt;br /&gt;
			   // callback fired when we have all the information&lt;br /&gt;
		).done( function( miniPageExists, loader ) {&lt;br /&gt;
&lt;br /&gt;
			// check if the page already exist&lt;br /&gt;
			if( miniPageExists ) {&lt;br /&gt;
&lt;br /&gt;
				// just redirect to the Minipedia version&lt;br /&gt;
				window.location = miniPageUrl;&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// ask if you want to create the page&lt;br /&gt;
&lt;br /&gt;
				// create message dialog window&lt;br /&gt;
				var messageDialog = new OO.ui.MessageDialog();&lt;br /&gt;
				var windowManager = new OO.ui.WindowManager();&lt;br /&gt;
				$( 'body' ).append( windowManager.$element );&lt;br /&gt;
				windowManager.addWindows( [ messageDialog ] );&lt;br /&gt;
&lt;br /&gt;
				// configure and open dialog&lt;br /&gt;
				var windowInstance = windowManager.openWindow( messageDialog, {&lt;br /&gt;
					title:   L10N.createMinipediaPageTitle,&lt;br /&gt;
					message: L10N.createMinipediaPageBody,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// check if you accepted the page creation&lt;br /&gt;
				windowInstance.closed.then( function ( data ) {&lt;br /&gt;
					// user is confirming the action&lt;br /&gt;
					if( data.action === 'accept' ) {&lt;br /&gt;
						// go go go! to mini&lt;br /&gt;
						that.onMinipediaConfirmation();&lt;br /&gt;
					}&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
			// end if page exists&lt;br /&gt;
		} );&lt;br /&gt;
		// end $.when()&lt;br /&gt;
&lt;br /&gt;
		// avoid scrolling to the top&lt;br /&gt;
		e.preventDefault();&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	Mini.prototype.onMinipediaConfirmation = function() {&lt;br /&gt;
		/**&lt;br /&gt;
		 * Go to the Minipedia page in edit mode&lt;br /&gt;
		 *&lt;br /&gt;
		 * The page in the main namespace will be preloaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 */&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
		var mwTitle = this.createTitle(pageName);&lt;br /&gt;
		var miniPageName = mwTitle.getPrefixedText();&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Build the query string to edit a page&lt;br /&gt;
		 *&lt;br /&gt;
		 * TODO: eventually add VisualEditor support&lt;br /&gt;
		 */&lt;br /&gt;
		var editPageQueryString = {&lt;br /&gt;
			action: 'edit',&lt;br /&gt;
			title: miniPageName,&lt;br /&gt;
			preload: pageName,&lt;br /&gt;
			editintro: mp.editIntro,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// '/index.php'&lt;br /&gt;
		var wgScript = mw.config.get( 'wgScript' );&lt;br /&gt;
&lt;br /&gt;
		// go to the edit page URL&lt;br /&gt;
		window.location = wgScript + '?' + $.param( editPageQueryString );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the wiki&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareNormalpedia() {&lt;br /&gt;
		var miniElementary = new Mini(&lt;br /&gt;
		  mp.namespaceNum,&lt;br /&gt;
		  L10N.minipediaShort,&lt;br /&gt;
		  L10N.openMinipedia,&lt;br /&gt;
		  '🐣');&lt;br /&gt;
		var miniIntermediate = new Mini(&lt;br /&gt;
		  mp.namespaceIntermediateNum,&lt;br /&gt;
		  L10N.minipediaShortIntermediate,&lt;br /&gt;
		  L10N.openMinipediaIntermediate,&lt;br /&gt;
		  '📚');&lt;br /&gt;
		var miniAdvanced = new Mini(&lt;br /&gt;
		  mp.namespaceAdvancedNum,&lt;br /&gt;
		  L10N.minipediaShortAdvanced,&lt;br /&gt;
		  L10N.openMinipediaAdvanced,&lt;br /&gt;
		  '🔬');&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var miniVersionPortletLink = miniElementary.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Intermediate&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkIntermediate = miniIntermediate.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Advanced&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkAdvanced = miniAdvanced.registerPortlet();&lt;br /&gt;
&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareNormalWiki()&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Calculate some stats over a text&lt;br /&gt;
	 */&lt;br /&gt;
	function textStats( text ) {&lt;br /&gt;
&lt;br /&gt;
		var stats = {};&lt;br /&gt;
&lt;br /&gt;
		text = text.trim();&lt;br /&gt;
&lt;br /&gt;
		// count long words&lt;br /&gt;
		var totalLongWords = 0;&lt;br /&gt;
		var word, words = text.split( /\s+/ );&lt;br /&gt;
		for( var i = 0; i &amp;lt; words.length; i++ ) {&lt;br /&gt;
			word = words[i];&lt;br /&gt;
			if( word.length &amp;gt; mp.longWordLen ) {&lt;br /&gt;
				totalLongWords++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// total amount of paragraphs&lt;br /&gt;
		// paragraphs shorter than this comment are discarded&lt;br /&gt;
		var totalLines = 0;&lt;br /&gt;
		var paragraphs = text.split( /\n+/ );&lt;br /&gt;
		var paragraph;&lt;br /&gt;
		for( var i = 0; i &amp;lt; paragraphs.length; i++ ) {&lt;br /&gt;
			paragraph = paragraphs[i].trim();&lt;br /&gt;
			if( paragraph.length &amp;gt; 30 ) {&lt;br /&gt;
				totalLines++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// how much lines?&lt;br /&gt;
		stats.totalLines = totalLines;&lt;br /&gt;
&lt;br /&gt;
		// how much words?&lt;br /&gt;
		stats.totalWords = words.length;&lt;br /&gt;
&lt;br /&gt;
		// how much of these words are so much long?&lt;br /&gt;
		// See 'longWordLen'&lt;br /&gt;
		stats.totalLongWords = totalLongWords;&lt;br /&gt;
&lt;br /&gt;
		return stats;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query content stats of the current page&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page title (or nothing for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryContentStats( pageTitle ) {&lt;br /&gt;
		return queryPlainText( pageTitle ).then( textStats );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Apply a stupid percentage&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {int} a&lt;br /&gt;
	 * @param {int} b&lt;br /&gt;
	 * @return The 'b%' applied to 'a'&lt;br /&gt;
	 */&lt;br /&gt;
	function applyPercentage( a, b ) {&lt;br /&gt;
		return parseInt( a * b / 100 );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia stats box&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipediaStatsBox() {&lt;br /&gt;
&lt;br /&gt;
		// normal page title (non-mini version)&lt;br /&gt;
		var mainPageTitle = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// body container&lt;br /&gt;
		var $contentText = $( '#mw-content-text' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the DOM tree&lt;br /&gt;
		var $container = $( '&amp;lt;div&amp;gt;' );&lt;br /&gt;
		var $table = $( '&amp;lt;table&amp;gt;' );&lt;br /&gt;
		var $thead = $( '&amp;lt;thead&amp;gt;' );&lt;br /&gt;
		var $tbody = $( '&amp;lt;tbody&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the stats container&lt;br /&gt;
		$container.addClass( 'minipedia-stats' );&lt;br /&gt;
&lt;br /&gt;
		// put a title&lt;br /&gt;
		$container.append( $( '&amp;lt;h2&amp;gt;' ).text( L10N.statsTitle ) );&lt;br /&gt;
&lt;br /&gt;
		// put the table&lt;br /&gt;
		$container.append( $table );&lt;br /&gt;
&lt;br /&gt;
		// add table headers&lt;br /&gt;
		$thead.append(&lt;br /&gt;
			$( '&amp;lt;tr&amp;gt;' ).append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSubject    ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingValue      ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingExpected   ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSimplicity ) )&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// prepare the table&lt;br /&gt;
		$table.addClass( 'wikitable' )&lt;br /&gt;
		      .append( $thead )&lt;br /&gt;
		      .append( $tbody );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Append a row (with a label and a value) into a table&lt;br /&gt;
		 *&lt;br /&gt;
		 * The data argument accepts an object with:&lt;br /&gt;
		 *&lt;br /&gt;
		 *   className:        Class name for the row&lt;br /&gt;
		 *   label:            Text displayed in row heading (left)&lt;br /&gt;
		 *   text:             Text displayed in row data (right)&lt;br /&gt;
		 *   value             Value associated to the text of the mini version&lt;br /&gt;
		 *   maxValue          Maximum suggested value&lt;br /&gt;
		 *   upstreamValue     The value of the upstream (main) version&lt;br /&gt;
		 *   upstreamLimitPerc The percentage (0-100) applied to the 'upstreamValue' to inherit a suitable 'maxValue'&lt;br /&gt;
		 *&lt;br /&gt;
		 * Note: this function uses OOUI widgets. Make sure to have them loaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 * @param {Object} jQuery table&lt;br /&gt;
		 * @param {Object} Data information&lt;br /&gt;
		 */&lt;br /&gt;
		function appendTableStatsRow( $table, data ) {&lt;br /&gt;
&lt;br /&gt;
			// read arguments&lt;br /&gt;
			var className = data.className;&lt;br /&gt;
			var label     = data.label;&lt;br /&gt;
			var value     = data.value;&lt;br /&gt;
			var maxValue  = data.maxValue;&lt;br /&gt;
			var text      = data.text || value;&lt;br /&gt;
&lt;br /&gt;
			// eventually calculate the max value&lt;br /&gt;
			if( !maxValue &amp;amp;&amp;amp; data.upstreamValue &amp;amp;&amp;amp; data.upstreamLimitPerc ) {&lt;br /&gt;
				maxValue = applyPercentage( data.upstreamValue, data.upstreamLimitPerc );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// prepare table stats row&lt;br /&gt;
			var $tr         = $( '&amp;lt;tr&amp;gt;' );&lt;br /&gt;
			var $tdLabel    = $( '&amp;lt;td&amp;gt;' ).text( label    );&lt;br /&gt;
			var $tdValue    = $( '&amp;lt;td&amp;gt;' ).text( text     );&lt;br /&gt;
			var $tdMax      = $( '&amp;lt;td&amp;gt;' ).text( maxValue );&lt;br /&gt;
			var $tdProgress = $( '&amp;lt;td&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
			// build the table row&lt;br /&gt;
			$tr.addClass( 'minipedia-stats-row-' + className );&lt;br /&gt;
			$tr.append( $tdLabel    )&lt;br /&gt;
			   .append( $tdValue    )&lt;br /&gt;
			   .append( $tdMax      )&lt;br /&gt;
			   .append( $tdProgress );&lt;br /&gt;
&lt;br /&gt;
			// if possible, plot a cute progress bar&lt;br /&gt;
			if( maxValue ) {&lt;br /&gt;
&lt;br /&gt;
				// calculate a 0-100 progress since the value and maxValue&lt;br /&gt;
				var realPercentage = parseInt( value / maxValue * 100 );&lt;br /&gt;
&lt;br /&gt;
				/**&lt;br /&gt;
				 * Calculate the inverse percentage&lt;br /&gt;
				 *&lt;br /&gt;
				 * This is the final percentage shown to the user.&lt;br /&gt;
				 *&lt;br /&gt;
				 * In short, it's always 100% but if you go over&lt;br /&gt;
				 * the limit it start decreasing and reaching zero,&lt;br /&gt;
				 * to rappresent a kind of 'understanding degradation'.&lt;br /&gt;
				 *&lt;br /&gt;
				 * To do not underrate the work of the user it should not go&lt;br /&gt;
				 * below a certain minimum amount. Example: 10%. :^)&lt;br /&gt;
				 *&lt;br /&gt;
				 * Actually the function is just linear.&lt;br /&gt;
				 */&lt;br /&gt;
				var inversePercentage = 100;&lt;br /&gt;
				if( realPercentage &amp;gt; 100 ) {&lt;br /&gt;
					inversePercentage = Math.max( 10, 200 - realPercentage );&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// generate the progress bar&lt;br /&gt;
				var progressBar = new OO.ui.ProgressBarWidget( {&lt;br /&gt;
					progress: inversePercentage,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// show the progress bar&lt;br /&gt;
				$tdProgress.append( progressBar.$element );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// attach some data to be read by scripts&lt;br /&gt;
			$tr.data( 'ministats', data );&lt;br /&gt;
&lt;br /&gt;
			// eventually emphasize if something is wrong&lt;br /&gt;
			if( value &amp;amp;&amp;amp; maxValue &amp;amp;&amp;amp; value &amp;gt; maxValue ) {&lt;br /&gt;
				$tr.addClass( 'minipedia-stats-row-problem' );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// show the row in the stats table&lt;br /&gt;
			$table.append( $tr );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// request multiple stuff at the same time&lt;br /&gt;
		$.when(&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the current mini page&lt;br /&gt;
			queryContentStats(),&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the related non-mini page&lt;br /&gt;
			queryContentStats( mainPageTitle ),&lt;br /&gt;
&lt;br /&gt;
			// require the progress bar widget&lt;br /&gt;
			mw.loader.using( 'oojs-ui-widgets' )&lt;br /&gt;
&lt;br /&gt;
		// callback fired when we have all the information&lt;br /&gt;
		).done( function( statsMini, statsMain, mwLoader ) {&lt;br /&gt;
&lt;br /&gt;
			// show the stats container at the bottom of the page when we have something&lt;br /&gt;
			$contentText.append( $container );&lt;br /&gt;
&lt;br /&gt;
			// check if we have also some information from the main namespace&lt;br /&gt;
			// in this case we can do a comparison&lt;br /&gt;
			if( statsMain ) {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they can be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'long-words',&lt;br /&gt;
					label:             L10N.statsComplexWords,&lt;br /&gt;
					value:             statsMini.totalLongWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalLongWords,&lt;br /&gt;
					upstreamLimitPerc: 10,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'words',&lt;br /&gt;
					label:             L10N.statsWords,&lt;br /&gt;
					value:             statsMini.totalWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalWords,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'lines',&lt;br /&gt;
					label:             L10N.statsLines,&lt;br /&gt;
					value:             statsMini.totalLines,&lt;br /&gt;
					maxValue:          statsMain.totalLines,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
			// there is no the related main page&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they cannot be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'long-words',&lt;br /&gt;
					label:     L10N.statsComplexWords,&lt;br /&gt;
					value:     statsMini.totalLongWords,&lt;br /&gt;
					maxValue:  mp.maxComplexWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'words',&lt;br /&gt;
					label:     L10N.statsWords,&lt;br /&gt;
					value:     statsMini.totalWords,&lt;br /&gt;
					maxValue:  mp.maxStatsWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'lines',&lt;br /&gt;
					label:      L10N.statsLines,&lt;br /&gt;
					value:      statsMini.totalLines,&lt;br /&gt;
					maxValue:   mp.maxTotalLines,&lt;br /&gt;
				} );&lt;br /&gt;
			}&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia namespace&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipedia() {&lt;br /&gt;
&lt;br /&gt;
		// action of the page (edit, view etc.)&lt;br /&gt;
		var action = mw.config.get( 'wgAction' );&lt;br /&gt;
&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Normalpedia title object&lt;br /&gt;
		var normalTitleObject = new mw.Title( pageName );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var normalPageName = normalTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var normalPageUrl = normalTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var normalVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			normalPageUrl,&lt;br /&gt;
			L10N.normalpediaShort,&lt;br /&gt;
			'ca-normalpedia',&lt;br /&gt;
			L10N.openNormalpedia&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// check if we are in view mode&lt;br /&gt;
		if( action === 'view' ) {&lt;br /&gt;
&lt;br /&gt;
			// in view mode we can fetch the stats&lt;br /&gt;
			prepareMinipediaStatsBox();&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareMinipedia()&lt;br /&gt;
&lt;br /&gt;
	// work only in the main namespace&lt;br /&gt;
	var ns = mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	if( ns === 0 ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
	} else if( ns == mp.namespaceNum ) {&lt;br /&gt;
		prepareMinipedia();&lt;br /&gt;
	}&lt;br /&gt;
	// end namespace zero check&lt;br /&gt;
&lt;br /&gt;
} )( mw, $ );&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Sun&amp;diff=104</id>
		<title>Sun</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Sun&amp;diff=104"/>
		<updated>2025-05-08T16:27:44Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: import from wikipedia:en:Special:PermaLink/1287676799 at 21:06, 27 April 2025&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:The Sun in white light.jpg|thumb|The Sun.]]&lt;br /&gt;
The '''Sun''' is the [[star]] at the centre of the [[Solar System]]. It is a massive, nearly perfect sphere of hot [[Plasma (physics)|plasma]], heated to [[incandescence]] by [[nuclear fusion]] reactions in its core, radiating the energy from its [[surface]] mainly as [[visible light]] and [[infrared radiation]] with 10% at [[ultraviolet]] energies. It is by far the most important source of energy for [[life]] on [[Earth]]. The Sun has been an [[The Sun in culture|object of veneration]] in many cultures. It has been a central subject for astronomical research since [[Ancient history|antiquity]].&lt;br /&gt;
&lt;br /&gt;
The Sun orbits the [[Galactic Center]] at a distance of 24,000 to 28,000 [[light-year]]s. Its distance from Earth defines the [[astronomical unit]], which is about {{val|1.496|e=8|u=kilometres}} or about 8 [[light-minute]]s. [[Solar radius|Its diameter]] is about {{val|1391400|u=km|fmt=commas}} ({{val|864600|u=mi|fmt=commas}}), 109 times that of Earth. [[solar mass|The Sun's mass]] is about 330,000 times that of Earth, making up about 99.86% of the total mass of the Solar System. Roughly three-quarters of the Sun's [[mass]] consists of [[hydrogen]] (~73%); the rest is mostly [[helium]] (~25%), with much smaller quantities of heavier elements, including [[oxygen]], [[carbon]], [[neon]], and [[iron]].&lt;br /&gt;
&lt;br /&gt;
The Sun is a [[G-type main-sequence star]] (G2V), informally called a yellow dwarf, though its light is actually white. It formed approximately 4.6&amp;amp;nbsp;billion&amp;lt;ref group=lower-alpha name=short&amp;gt;All numbers in this article are [[short scale]]. One billion is 10&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;, or 1,000,000,000.&amp;lt;/ref&amp;gt; years ago from the [[gravitational collapse]] of matter within a region of a large [[molecular cloud]]. Most of this matter gathered in the centre; the rest flattened into an orbiting disk that [[formation and evolution of the Solar System|became the Solar System]]. The central mass became so hot and dense that it eventually initiated nuclear fusion in [[solar core|its core]]. Every second, the Sun's core fuses about 600&amp;amp;nbsp;billion [[kilograms]] (kg) of hydrogen into helium and converts 4 billion kg of [[mass–energy equivalence|matter into energy]].&lt;br /&gt;
&lt;br /&gt;
About 4 to 7 billion years from now, when [[hydrogen fusion]] in the Sun's core diminishes to the point where the Sun is no longer in [[hydrostatic equilibrium]], its core will undergo a marked increase in density and temperature which will cause its outer layers to expand, eventually transforming the Sun into a [[red giant]]. After the red giant phase, models suggest the Sun will shed its outer layers and become a dense type of cooling star (a [[white dwarf]]), and no longer produce energy by fusion, but will still glow and give off heat from its previous fusion for perhaps trillions of years. After that, it is theorised to become a super dense [[black dwarf]], giving off negligible energy.&lt;br /&gt;
&lt;br /&gt;
== Etymology ==&lt;br /&gt;
The English word ''sun'' developed from [[Old English]] {{lang|ang|sunne}}. Cognates appear in other [[Germanic languages]], including [[West Frisian language|West Frisian]] {{lang|fy|sinne}}, [[Dutch language|Dutch]] {{lang|nl|zon}}, [[Low German]] {{lang|nds|Sünn}}, [[Standard German]] {{lang|de|Sonne}}, [[Bavarian language|Bavarian]] {{lang|bar|Sunna}}, [[Old Norse]] {{lang|non|sunna}}, and [[Gothic language|Gothic]] {{lang|got|sunnō}}. All these words stem from [[Proto-Germanic]] {{lang|gem-x-proto|*sunnōn}}.&amp;lt;ref name=&amp;quot;BARNHART776&amp;quot;&amp;gt;{{Cite book |last=Barnhart |first=R. K. |title=The Barnhart Concise Dictionary of Etymology |year=1995 |publisher=[[HarperCollins]] |isbn=978-0-06-270084-1 |page=776}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Orel&amp;quot;&amp;gt;{{cite book |last=Orel |first=Vladimir |author-link=Vladimir Orel |year=2003 |title=A Handbook of Germanic Etymology |page=[https://archive.org/details/Orel-AHandbookOfGermanicEtymology/mode/2up/search/sun 41] |url=https://archive.org/details/Orel-AHandbookOfGermanicEtymology/mode/2up |via=Internet Archive |publisher=Brill |place=Leiden |isbn=978-9-00-412875-0}}&amp;lt;/ref&amp;gt; This is ultimately related to the word for ''sun'' in other branches of the [[Indo-European language]] family, though in most cases a [[nominative]] stem with an ''l'' is found, rather than the [[genitive]] stem in ''n'', as for example in [[Latin]] {{lang|la|sōl}}, [[ancient Greek]] {{lang|grc|ἥλιος}} ({{transliteration|grc|hēlios}}), [[Welsh language|Welsh]] {{lang|cy|haul}} and [[Czech language|Czech]] {{lang|cs|slunce}}, as well as (with *l &amp;gt; ''r'') Sanskrit {{lang|sa|स्वर्}} ({{transliteration|sa|svár}}) and [[Persian language|Persian]] {{lang|fa|خور}} ({{transliteration|fa|xvar}}). Indeed, the ''l''-stem survived in Proto-Germanic as well, as {{lang|gem-x-proto|*sōwelan}}, which gave rise to Gothic {{lang|got|sauil}} (alongside {{lang|got|sunnō}}) and [[Old Norse]] prosaic {{lang|non|sól}} (alongside poetic {{lang|non|sunna}}), and through it the words for ''sun'' in the modern Scandinavian languages: [[Swedish language|Swedish]] and [[Danish language|Danish]] {{lang|sv|sol}}, [[Icelandic language|Icelandic]] {{lang|is|sól}}, etc.&amp;lt;ref name=Orel /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The principal adjectives for the Sun in English are ''sunny'' for sunlight and, in technical contexts, ''solar'' ({{IPAc-en|ˈ|s|oʊ|l|ər}}),&amp;lt;ref name=&amp;quot;OED2&amp;quot;&amp;gt;{{OED|solar}}&amp;lt;/ref&amp;gt; from Latin {{lang|la|sol}}.&amp;lt;ref&amp;gt;{{cite dictionary |last1=Little |first1=William |dictionary=Oxford Universal Dictionary on Historical Principles |last2=Fowler |first2=H. W. |last3=Coulson |first3=J. |year=1955 |edition=3rd |title=Sol |asin=B000QS3QVQ |url=https://archive.org/details/oxforduniversald07litt |url-access=registration}}&amp;lt;/ref&amp;gt; From the Greek {{transliteration|grc|helios}} comes the rare adjective ''heliac'' ({{IPAc-en|ˈ|h|iː|l|i|æ|k}}).&amp;lt;ref&amp;gt;{{OED|heliac}}&amp;lt;/ref&amp;gt; In English, the Greek and Latin words occur in poetry as personifications of the Sun, [[Helios]] ({{IPAc-en|ˈ|h|iː|l|i|ə|s}}) and [[Sol (Roman mythology)|Sol]] ({{IPAc-en|'|s|ɒ|l}}),&amp;lt;ref name=&amp;quot;Lexico&amp;quot;&amp;gt;{{Cite dictionary |title=Helios |dictionary=[[Lexico]] UK English Dictionary |publisher=[[Oxford University Press]] |url=http://www.lexico.com/definition/Helios |archive-url=https://web.archive.org/web/20200327234645/https://www.lexico.com/definition/helios |archive-date=27 March 2020 |url-status=dead}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;OED&amp;quot;&amp;gt;{{OED|Sol}}&amp;lt;/ref&amp;gt; while in science fiction ''Sol'' may be used to distinguish the Sun from other stars. The term ''[[Sol (day on Mars)|sol]]'' with a lowercase ''s'' is used by planetary astronomers for the duration of a [[solar day]] on another planet such as [[Mars]].&amp;lt;ref&amp;gt;{{Cite web |date=15 November 2006 |title=Opportunity's View, Sol 959 (Vertical) |url=http://www.nasa.gov/mission_pages/mer/images/pia01892.html |url-status=live |archive-url=https://web.archive.org/web/20121022155351/http://www.nasa.gov/mission_pages/mer/images/pia01892.html |archive-date=22 October 2012 |access-date=1 August 2007 |publisher=[[NASA]]}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [[astronomical symbol]] for the Sun is a circle with a central dot, ☉.&amp;lt;ref&amp;gt;{{cite book |last1=Allen |first1=Clabon W. |author-link1=Clabon Allen |last2=Cox |first2=Arthur N. |editor-last=Cox |editor-first=Arthur N. |year=2000 |title=Allen's Astrophysical Quantities |page=2 |publisher=Springer |edition=4th |isbn=978-0-38-798746-0 |url=https://books.google.com/books?id=w8PK2XFLLH8C }}&amp;lt;/ref&amp;gt; It is used for such units as ''M''&amp;lt;sub&amp;gt;☉&amp;lt;/sub&amp;gt; ([[Solar mass]]), ''R''&amp;lt;sub&amp;gt;☉&amp;lt;/sub&amp;gt; ([[Solar radius]]) and ''L''&amp;lt;sub&amp;gt;☉&amp;lt;/sub&amp;gt; ([[Solar luminosity]]).&amp;lt;ref&amp;gt;{{Cite dictionary |title=solar mass |url=https://www.oxfordreference.com/display/10.1093/oi/authority.20110803100516843 |access-date=26 May 2024 |dictionary=Oxford Reference}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite book |last1=Weissman |first1=Paul |url=https://books.google.com/books?id=4gmSOrXIQUEC&amp;amp;dq=%22solar+radius%22&amp;amp;pg=PA349 |title=Encyclopedia of the Solar System |last2=McFadden |first2=Lucy-Ann |last3=Johnson |first3=Torrence |date=18 September 1998 |publisher=[[Academic Press]] |isbn=978-0-08-057313-7 |pages=349, 820}}&amp;lt;/ref&amp;gt; The scientific study of the Sun is called ''heliology''.&amp;lt;ref&amp;gt;{{cite dictionary |url=https://www.collinsdictionary.com/dictionary/english/heliology |title=heliology |publisher=Collins |dictionary=[[Collins Dictionary]] |access-date=24 November 2024}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General characteristics ==&lt;br /&gt;
[[File:Celestial body size comparison horizontal.png|thumb|upright=1.8|Size comparison of the Sun, all eight [[Planets of the solar system|planets of]] the [[Solar System]], other bodies, and some larger stars. The Sun is 1.4 million kilometres (4.643 [[light-second]]s) wide, about 109 times [[List of Solar System objects by size|wider than]] Earth, or four times the [[Lunar distance]], and contains 99.86% of all Solar System [[Solar mass|mass]].]]&lt;br /&gt;
&lt;br /&gt;
The Sun is a [[G-type main-sequence star]] that makes up about 99.86% of the mass of the Solar System.&amp;lt;ref name=&amp;quot;Woolfson00&amp;quot;&amp;gt;{{Cite journal |last=Woolfson |first=M. |date=2000 |title=The origin and evolution of the solar system |url=http://inis.jinr.ru/sl/vol1/_djvu/P_Physics/Woolfson%20M.M.%20Origin%20and%20evolution%20of%20the%20solar%20system%20(IOP)(425s).pdf |url-status=live |journal=[[Astronomy &amp;amp; Geophysics]] |volume=41 |issue=1 |page=12 |bibcode=2000A&amp;amp;G....41a..12W |doi=10.1046/j.1468-4004.2000.00012.x |archive-url=https://web.archive.org/web/20200711133403/http://inis.jinr.ru/sl/vol1/_djvu/P_Physics/Woolfson%20M.M.%20Origin%20and%20evolution%20of%20the%20solar%20system%20(IOP)(425s).pdf |archive-date=11 July 2020 |access-date=12 April 2020 |doi-access=free}}&amp;lt;/ref&amp;gt;&amp;lt;!-- There are several estimations on the mass of the Solar System; for further information please have a look at the talk page. --&amp;gt; It has an [[absolute magnitude]] of +4.83, estimated to be brighter than about 85% of the stars in the [[Milky Way]], most of which are [[red dwarf]]s.&amp;lt;ref&amp;gt;{{Cite news |last=Than |first=K. |date=2006 |title=Astronomers Had it Wrong: Most Stars are Single |publisher=Space.com |url=http://www.space.com/scienceastronomy/060130_mm_single_stars.html |url-status=live |access-date=1 August 2007 |archive-url=https://web.archive.org/web/20101221093125/http://www.space.com/scienceastronomy/060130_mm_single_stars.html |archive-date=21 December 2010}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite journal |last=Lada |first=C. J. |year=2006 |title=Stellar multiplicity and the initial mass function: Most stars are single |journal=[[Astrophysical Journal Letters]] |volume=640 |issue=1 |pages=L63–L66 |arxiv=astro-ph/0601375 |bibcode=2006ApJ...640L..63L |doi=10.1086/503158 |s2cid=8400400}}&amp;lt;/ref&amp;gt; It is more massive than 95% of the stars within {{cvt|7|pc|ly}}.&amp;lt;ref&amp;gt;{{cite journal |last1=Robles |first1=José A. |last2=Lineweaver |first2=Charles H. |last3=Grether |first3=Daniel |last4=Flynn |first4=Chris |last5=Egan |first5=Chas A. |last6=Pracy |first6=Michael B. |last7=Holmberg |first7=Johan |last8=Gardner |first8=Esko |title=A Comprehensive Comparison of the Sun to Other Stars: Searching for Self-Selection Effects |journal=The Astrophysical Journal |date=September 2008 |volume=684 |issue=1 |pages=691–706 |doi=10.1086/589985 |arxiv=0805.2962 |bibcode=2008ApJ...684..691R |hdl=1885/34434 |url=https://iopscience.iop.org/article/10.1086/589985/fulltext/73840.text.html |access-date=24 May 2024}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
The Sun is a [[Population I stars|Population I]], or heavy-element-rich,{{efn|name=heavy elements}} star.&amp;lt;ref name=&amp;quot;zeilik&amp;quot;&amp;gt;{{Cite book |last1=Zeilik |first1=M. A. |title=Introductory Astronomy &amp;amp; Astrophysics |last2=Gregory |first2=S. A. |year=1998 |publisher=Saunders College Publishing |isbn=978-0-03-006228-5 |edition=4th |page=322}}&amp;lt;/ref&amp;gt; Its formation approximately 4.6&amp;amp;nbsp;billion years ago may have been triggered by shockwaves from one or more nearby [[supernova]]e.&amp;lt;ref name=&amp;quot;Connelly2012&amp;quot;&amp;gt;{{Cite journal |last1=Connelly |first1=James N. |last2=Bizzarro |first2=Martin |last3=Krot |first3=Alexander N. |last4=Nordlund |first4=Åke |last5=Wielandt |first5=Daniel |last6=Ivanova |first6=Marina A. |date=2 November 2012 |title=The Absolute Chronology and Thermal Processing of Solids in the Solar Protoplanetary Disk |journal=[[Science (journal)|Science]] |volume=338 |issue=6107 |pages=651–655 |bibcode=2012Sci...338..651C |doi=10.1126/science.1226919 |pmid=23118187 |s2cid=21965292}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Falk&amp;quot;&amp;gt;{{Cite journal |last1=Falk |first1=S. W. |last2=Lattmer |first2=J. M. |last3=Margolis |first3=S. H. |year=1977 |title=Are supernovae sources of presolar grains? |journal=[[Nature (journal)|Nature]] |volume=270 |issue=5639 |pages=700–701 |bibcode=1977Natur.270..700F |doi=10.1038/270700a0 |s2cid=4240932}}&amp;lt;/ref&amp;gt; This is suggested by a high [[Abundance of the chemical elements|abundance]] of heavy elements in the Solar System, such as [[gold]] and [[uranium]], relative to the abundances of these elements in so-called [[Population II]], heavy-element-poor, stars. The heavy elements could most plausibly have been produced by [[endothermic]] nuclear reactions during a supernova, or by [[Nuclear transmutation|transmutation]] through [[neutron absorption]] within a massive second-generation star.&amp;lt;ref name=&amp;quot;zeilik&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Sun is by far the [[List of brightest natural objects in the sky|brightest object in the Earth's sky]], with an [[apparent magnitude]] of −26.74.&amp;lt;ref&amp;gt;{{Cite journal |last=Burton |first=W. B. |date=1986 |title=Stellar parameters |journal=[[Space Science Reviews]] |volume=43 |issue=3–4 |pages=244–250 |doi=10.1007/BF00190626 |s2cid=189796439}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite journal |last1=Bessell |first1=M. S. |last2=Castelli |first2=F. |last3=Plez |first3=B. |date=1998 |title=Model atmospheres broad-band colors, bolometric corrections and temperature calibrations for O–M stars |journal=[[Astronomy and Astrophysics]] |volume=333 |pages=231–250 |bibcode=1998A&amp;amp;A...333..231B}}&amp;lt;/ref&amp;gt; This is about 13&amp;amp;nbsp;billion times brighter than the next brightest star, [[Sirius]], which has an apparent magnitude of −1.46.&amp;lt;ref name=&amp;quot;Hoffleit1991&amp;quot;&amp;gt;{{cite book |chapter=HR 2491 |title=Bright Star Catalogue |edition=5th Revised |last1=Hoffleit |first1=D. |author-link1=Dorrit Hoffleit |display-authors=etal |date=1991 |publisher=[[Centre de Données astronomiques de Strasbourg|CDS]] |url=http://vizier.u-strasbg.fr/viz-bin/VizieR-S?HR%202491 |bibcode=1991bsc..book.....H}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{convert|1|AU|e6km e6mi|lk=in|spell=In|disp=x|abbr=off| (about |)}} is defined as the mean distance between the centres of the Sun and the Earth. The instantaneous distance varies by about {{±}}{{convert|2.5|e6km|abbr=none}} as Earth moves from [[perihelion]] around 3 January to [[aphelion]] around 4 July.&amp;lt;ref name=&amp;quot;USNO&amp;quot;&amp;gt;{{Cite web |date=31 January 2008 |title=Equinoxes, Solstices, Perihelion, and Aphelion, 2000–2020 |url=http://aa.usno.navy.mil/data/docs/EarthSeasons.php |url-status=dead |archive-url=https://web.archive.org/web/20071013000301/http://aa.usno.navy.mil/data/docs/EarthSeasons.php |archive-date=13 October 2007 |access-date=17 July 2009 |publisher=[[US Naval Observatory]]}}&amp;lt;/ref&amp;gt; At its average distance, light travels from the Sun's horizon to Earth's horizon in about 8 minutes and 20 seconds,&amp;lt;ref&amp;gt;{{Cite web |last=Cain |first=Fraser |date=15 April 2013 |title=How long does it take sunlight to reach the Earth? |url=https://phys.org/news/2013-04-sunlight-earth.html |url-status=live |archive-url=https://web.archive.org/web/20220302095547/https://phys.org/news/2013-04-sunlight-earth.html |archive-date=2 March 2022 |access-date=2 March 2022 |website=phys.org}}&amp;lt;/ref&amp;gt; while light from the closest points of the Sun and Earth takes about two seconds less. The energy of this [[sunlight]] supports almost all life&amp;lt;ref group=&amp;quot;lower-alpha&amp;quot;&amp;gt;[[Hydrothermal vent communities]] live so deep under the sea that they have no access to sunlight. Bacteria instead use sulfur compounds as an energy source, via [[chemosynthesis]].&amp;lt;/ref&amp;gt; on Earth by [[photosynthesis]],&amp;lt;ref&amp;gt;{{cite web |title=The Sun's Energy: An Essential Part of the Earth System |url=https://scied.ucar.edu/learning-zone/earth-system/energy-from-sun |website=Center for Science Education |access-date=24 May 2024}}&amp;lt;/ref&amp;gt; and drives [[Earth's climate]] and weather.&amp;lt;ref&amp;gt;{{cite web |title=The Sun's Influence on Climate |url=https://press.princeton.edu/books/hardcover/9780691153834/the-suns-influence-on-climate |date=23 June 2015 |publisher=Princeton University Press |access-date=24 May 2024}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Sun does not have a definite boundary, but its density decreases exponentially with increasing height above the [[photosphere]].&amp;lt;ref name=&amp;quot;Beer et al, 2012-41&amp;quot;&amp;gt;{{Cite book |last1=Beer |first1=J. |title=Cosmogenic Radionuclides: Theory and Applications in the Terrestrial and Space Environments |url=https://books.google.com/books?id=zKA0tZg0HwEC&amp;amp;pg=PA41 |last2=McCracken |first2=K. |last3=von Steiger |first3=R. |date=2012 |publisher=Springer |isbn=978-3-642-14651-0 |page=41}}&amp;lt;/ref&amp;gt; For the purpose of measurement, the Sun's radius is considered to be the distance from its centre to the edge of the photosphere, the apparent visible surface of the Sun.&amp;lt;ref name=&amp;quot;Phillips1995-73&amp;quot;&amp;gt;{{Cite book |last=Phillips |first=K. J. H. |title=Guide to the Sun |date=1995 |publisher=[[Cambridge University Press]] |isbn=978-0-521-39788-9 |url=https://books.google.com/books?id=idwBChjVP0gC&amp;amp;pg=PA73 |page=73}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
The roundness of the Sun is the relative difference between its radius at its equator, &amp;lt;math&amp;gt;R_\textrm{eq}&amp;lt;/math&amp;gt;, and at its pole, &amp;lt;math&amp;gt;R_\textrm{pol}&amp;lt;/math&amp;gt;, called the [[oblateness]],&amp;lt;ref name=Meftah-2015&amp;gt;{{Cite journal |last1=Meftah |first1=M. |last2=Irbah |first2=A. |last3=Hauchecorne |first3=A. |last4=Corbard |first4=T. |last5=Turck-Chièze |first5=S. |last6=Hochedez |first6=J.-F. |last7=Boumier |first7=P. |last8=Chevalier |first8=A. |last9=Dewitte |first9=S. |last10=Mekaoui |first10=S. |last11=Salabert |first11=D. |date=March 2015 |title=On the Determination and Constancy of the Solar Oblateness |url=http://link.springer.com/10.1007/s11207-015-0655-6 |journal=Solar Physics |language=en |volume=290 |issue=3 |pages=673–687 |doi=10.1007/s11207-015-0655-6 |bibcode=2015SoPh..290..673M |issn=0038-0938}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\Delta_\odot = (R_\textrm{eq} -R_\textrm{pol})/R_\textrm{pol}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value is difficult to measure. Atmospheric distortion means the measurement must be done on satellites; the value is very small meaning very precise technique is needed.&amp;lt;ref name=GoughOverview2012&amp;gt;{{Cite journal |last=Gough |first=Douglas |date=28 September 2012 |title=How Oblate Is the Sun? |url=https://www.science.org/doi/10.1126/science.1226988 |journal=Science |language=en |volume=337 |issue=6102 |pages=1611–1612 |doi=10.1126/science.1226988 |pmid=23019636 |bibcode=2012Sci...337.1611G |issn=0036-8075}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The oblateness was once proposed to be sufficient to explain the [[perihelion precession of Mercury]] but Einstein proposed that [[general relativity]] could explain the precession using a spherical Sun.&amp;lt;ref name=GoughOverview2012/&amp;gt; When high precision measurements of the oblateness became available via the [[Solar Dynamics Observatory]]&amp;lt;ref&amp;gt;{{Cite journal |last1=Kuhn |first1=J. R. |last2=Bush |first2=R. |last3=Emilio |first3=M. |last4=Scholl |first4=I. F. |date=28 September 2012 |title=The Precise Solar Shape and Its Variability |url=https://www.science.org/doi/10.1126/science.1223231 |journal=Science |language=en |volume=337 |issue=6102 |pages=1638–1640 |doi=10.1126/science.1223231 |pmid=22903522 |bibcode=2012Sci...337.1638K |issn=0036-8075}}&amp;lt;/ref&amp;gt; and the&lt;br /&gt;
[[Picard (satellite)|Picard]] satellite&amp;lt;ref name=Meftah-2015/&amp;gt; the measured value was even smaller than expected,&amp;lt;ref name=GoughOverview2012/&amp;gt; 8.2 x 10&amp;lt;sup&amp;gt;−6&amp;lt;/sup&amp;gt;, or 8 parts per million.&lt;br /&gt;
These measurements determined the Sun to be the natural object closest to a perfect sphere ever observed.&amp;lt;ref name=&amp;quot;perfect sphere&amp;quot;&amp;gt;{{Cite web |last=Jones |first=G. |date=16 August 2012 |title=Sun is the most perfect sphere ever observed in nature |url=https://www.theguardian.com/science/2012/aug/16/sun-perfect-sphere-nature |url-status=live |archive-url=https://web.archive.org/web/20140303022045/http://www.theguardian.com/science/2012/aug/16/sun-perfect-sphere-nature |archive-date=3 March 2014 |access-date=19 August 2013 |website=The Guardian}}&amp;lt;/ref&amp;gt; The oblateness value remains constant independent of solar irradiation changes.&amp;lt;ref name=Meftah-2015/&amp;gt; The tidal effect of the planets is weak and does not significantly affect the shape of the Sun.&amp;lt;ref name=&amp;quot;Schutz2003&amp;quot;&amp;gt;{{Cite book |last=Schutz |first=B. F. |title=Gravity from the ground up |url=https://books.google.com/books?id=P_T0xxhDcsIC&amp;amp;pg=PA98 |year=2003 |publisher=[[Cambridge University Press]] |isbn=978-0-521-45506-0 |pages=98–99}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Rotation===&lt;br /&gt;
&lt;br /&gt;
The Sun rotates faster at its equator than at its [[poles of astronomical bodies|poles]]. This [[Solar rotation|differential rotation]] is caused by [[convection|convective motion]] due to heat transport and the [[Coriolis effect|Coriolis force]] due to the Sun's rotation. In a frame of reference defined by the stars, the rotational period is approximately 25.6 days at the equator and 33.5 days at the poles. Viewed from Earth as it orbits the Sun, the apparent rotational period of the Sun at its equator is about 28 days.&amp;lt;ref name=&amp;quot;Phillips1995-78&amp;quot;&amp;gt;{{Cite book |last=Phillips |first=K. J. H. |title=Guide to the Sun |year=1995 |publisher=[[Cambridge University Press]] |isbn=978-0-521-39788-9 |url=https://books.google.com/books?id=idwBChjVP0gC&amp;amp;pg=PA78 |pages=78–79}}&amp;lt;/ref&amp;gt; Viewed from a vantage point above its north pole, the Sun rotates [[counterclockwise]] around its axis of spin.{{efn|name=rotation}}&amp;lt;ref name=&amp;quot;spaceacademy&amp;quot;&amp;gt;{{Cite web |title=The Anticlockwise Solar System |url=https://www.spaceacademy.net.au/library/notes/anticlok.htm |url-status=live |archive-url=https://web.archive.org/web/20200807081832/https://www.spaceacademy.net.au/library/notes/anticlok.htm |archive-date=7 August 2020 |access-date=2 July 2020 |publisher=Australian Space Academy}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A survey of [[solar analog]]ues suggests the early Sun was rotating up to ten times faster than it does today. This would have made the surface much more active, with greater X-ray and UV emission. [[Sunspot]]s would have covered 5–30% of the surface.&amp;lt;ref&amp;gt;{{cite conference |title=The Sun in time: age, rotation, and magnetic activity of the Sun and solar-type stars and effects on hosted planets |last1=Guinan |first1=Edward F. |last2=Engle |first2=Scott G. |conference=The Ages of Stars, Proceedings of the International Astronomical Union, IAU Symposium |volume=258 |pages=395–408 |date=June 2009 |doi=10.1017/S1743921309032050 |arxiv=0903.4148 |bibcode=2009IAUS..258..395G}}&amp;lt;/ref&amp;gt; The rotation rate was gradually slowed by [[Magnetic braking (astronomy)|magnetic braking]], as the Sun's magnetic field interacted with the outflowing [[solar wind]].&amp;lt;ref&amp;gt;{{cite journal |title=Magnetic Braking of Sun-like and Low-mass Stars: Dependence on Coronal Temperature |last1=Pantolmos |first1=George |last2=Matt |first2=Sean P. |journal=The Astrophysical Journal |volume=849 |issue=2 |at=id. 83 |date=November 2017 |doi=10.3847/1538-4357/aa9061 |doi-access=free |arxiv=1710.01340 |bibcode=2017ApJ...849...83P}}&amp;lt;/ref&amp;gt; A vestige of this rapid primordial rotation still survives at the Sun's core, which rotates at a rate of once per week; four times the mean surface rotation rate.&amp;lt;ref&amp;gt;{{cite journal |title=Asymptotic g modes: Evidence for a rapid rotation of the solar core |last1=Fossat |first1=E. |last2=Boumier |first2=P. |last3=Corbard |first3=T. |last4=Provost |first4=J. |last5=Salabert |first5=D. |last6=Schmider |first6=F. X. |last7=Gabriel |first7=A. H. |last8=Grec |first8=G. |last9=Renaud |first9=C. | last10=Robillot | first10=J. M. |last11=Roca-Cortés |first11=T. |last12=Turck-Chièze |first12=S. |last13=Ulrich |first13=R. K. |last14=Lazrek |first14=M. |journal=Astronomy &amp;amp; Astrophysics |volume=604 |at=id. A40 |date=August 2017 |doi=10.1051/0004-6361/201730460 |arxiv=1708.00259 |bibcode=2017A&amp;amp;A...604A..40F}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web |title=ESA, NASA's SOHO Reveals Rapidly Rotating Solar Core |first=Susannah |last=Darling |date=1 August 2017 |publisher=[[NASA]] |url=https://www.nasa.gov/science-research/heliophysics/esa-nasas-soho-reveals-rapidly-rotating-solar-core/ |access-date=31 May 2024}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Composition ==&lt;br /&gt;
{{See also|Molecules in stars}}&lt;br /&gt;
The Sun consists mainly of the elements [[hydrogen]] and [[helium]]. At this time in the Sun's life, they account for 74.9% and 23.8%, respectively, of the mass of the Sun in the photosphere.&amp;lt;ref name=lodders&amp;gt;{{cite journal |doi=10.1086/375492 |last=Lodders |first=Katharina |author-link=Katharina Lodders |date=10 July 2003 |title=Solar System Abundances and Condensation Temperatures of the Elements |journal=The Astrophysical Journal |volume=591 |issue=2 |pages=1220–1247 |url=http://weft.astro.washington.edu/courses/astro557/LODDERS.pdf |bibcode=2003ApJ...591.1220L |access-date=1 September 2015 |archive-url=https://web.archive.org/web/20151107043527/http://weft.astro.washington.edu/courses/astro557/LODDERS.pdf |archive-date=7 November 2015 |url-status=dead |citeseerx=10.1.1.666.9351 |s2cid=42498829}}&amp;lt;br /&amp;gt;{{Cite journal |last=Lodders |first=K. |author-link=Katharina Lodders |title=Abundances and Condensation Temperatures of the Elements |url=http://www.lpi.usra.edu/meetings/metsoc2003/pdf/5272.pdf |journal=[[Meteoritics &amp;amp; Planetary Science]] |volume=38 |issue=suppl |page=5272 |date=2003 |bibcode=2003M&amp;amp;PSA..38.5272L |access-date=3 August 2008 |archive-date=13 May 2011 |archive-url=https://web.archive.org/web/20110513163004/http://www.lpi.usra.edu/meetings/metsoc2003/pdf/5272.pdf |url-status=live}}&amp;lt;/ref&amp;gt; All heavier elements, called ''[[metallicity|metals]]'' in astronomy, account for less than 2% of the mass, with [[oxygen]] (roughly 1% of the Sun's mass), [[carbon]] (0.3%), [[neon]] (0.2%), and [[iron]] (0.2%) being the most abundant.&amp;lt;ref name=hkt2004&amp;gt;{{Cite book |last1=Hansen |first1=C. J. |last2=Kawaler |first2=S. A. |last3=Trimble |first3=V. |title=Stellar Interiors: Physical Principles, Structure, and Evolution |pages=19–20 |edition=2nd |publisher=[[Springer Science+Business Media|Springer]] |date=2004 |isbn=978-0-387-20089-7}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Sun's original chemical composition was inherited from the [[interstellar medium]] out of which it formed. Originally it would have been about 71.1% hydrogen, 27.4% helium, and 1.5% heavier elements.&amp;lt;ref name=lodders /&amp;gt; The hydrogen and most of the helium in the Sun would have been produced by [[Big Bang nucleosynthesis]] in the first 20 minutes of the universe, and the heavier elements were [[stellar nucleosynthesis|produced by previous generations of stars]] before the Sun was formed, and spread into the interstellar medium during the [[stellar evolution|final stages of stellar life]] and by events such as [[supernova]]e.&amp;lt;ref name=&amp;quot;hkt2004_78&amp;quot;&amp;gt;{{Cite book |last1=Hansen |first1=C. J. |title=Stellar Interiors: Physical Principles, Structure, and Evolution |last2=Kawaler |first2=S. A. |last3=Trimble |first3=V. |year=2004 |publisher=[[Springer Science+Business Media|Springer]] |isbn=978-0-387-20089-7 |edition=2nd |pages=77–78}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since the Sun formed, the main fusion process has involved fusing hydrogen into helium. Over the past 4.6&amp;amp;nbsp;billion years, the amount of helium and its location within the Sun has gradually changed. The proportion of helium within the core has increased from about 24% to about 60% due to fusion, and some of the helium and heavy elements have settled from the photosphere toward the centre of the Sun because of [[gravity]]. The proportions of heavier elements are unchanged. [[Heat transfer|Heat is transferred]] outward from the Sun's core by radiation rather than by convection (see [[#Radiative zone|Radiative zone]] below), so the fusion products are not lifted outward by heat; they remain in the core,&amp;lt;ref name=hkt2004_9.2.3&amp;gt;{{Cite book |last1=Hansen |first1=C. J. |last2=Kawaler |first2=S. A. |last3=Trimble |first3=V. |title=Stellar Interiors: Physical Principles, Structure, and Evolution |pages=§&amp;amp;nbsp;9.2.3 |no-pp=yes |edition=2nd |publisher=[[Springer Science+Business Media|Springer]] |year=2004 |isbn=978-0-387-20089-7}}&amp;lt;/ref&amp;gt; and gradually an inner core of helium has begun to form that cannot be fused because presently the Sun's core is not hot or dense enough to fuse helium. In the current photosphere, the helium fraction is reduced, and the [[metallicity]] is only 84% of what it was in the [[Protostar|protostellar]] phase (before nuclear fusion in the core started). In the future, helium will continue to accumulate in the core, and in about 5&amp;amp;nbsp;billion years this gradual build-up will eventually cause the Sun to exit the [[main sequence]] and become a [[red giant]].&amp;lt;ref&amp;gt;{{cite journal |last=Iben |first=Icko Jnr. |title=Stellar Evolution. II. The Evolution of a 3 M&amp;lt;sub&amp;gt;☉&amp;lt;/sub&amp;gt; Star from the Main Sequence Through Core Helium Burning |journal=The Astrophysical Journal |volume=142 |page=1447 |date=November 1965 |doi=10.1086/148429 |bibcode=1965ApJ...142.1447I}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chemical composition of the photosphere is normally considered representative of the composition of the primordial Solar System.&amp;lt;ref name=&amp;quot;aller1968&amp;quot;&amp;gt;{{Cite journal |last=Aller |first=L. H. |title=The chemical composition of the Sun and the solar system |journal=Proceedings of the Astronomical Society of Australia |volume=1 |issue=4 |page=133 |date=1968 |bibcode=1968PASA....1..133A |doi=10.1017/S1323358000011048 |s2cid=119759834 |doi-access=free}}&amp;lt;/ref&amp;gt; Typically, the solar heavy-element abundances described above are measured both by using [[astronomical spectroscopy|spectroscopy]] of the Sun's photosphere and by measuring abundances in [[meteorites]] that have never been heated to melting temperatures. These meteorites are thought to retain the composition of the protostellar Sun and are thus not affected by the settling of heavy elements. The two methods generally agree well.&amp;lt;ref name=&amp;quot;basu2008&amp;quot;&amp;gt;{{Cite journal |last1=Basu |first1=S. |last2=Antia |first2=H. M. |year=2008 |title=Helioseismology and Solar Abundances |journal=[[Physics Reports]] |volume=457 |issue=5–6 |pages=217–283 |arxiv=0711.4590 |bibcode=2008PhR...457..217B |doi=10.1016/j.physrep.2007.12.002 |s2cid=119302796}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
[[File:Sun poster.svg|thumb|upright=2.25|left|Illustration of the Sun's structure, in false colour for contrast|alt=See caption]]&lt;br /&gt;
&lt;br /&gt;
=== Core ===&lt;br /&gt;
The core of the Sun extends from the centre to about 20–25% of the solar radius.&amp;lt;ref name=&amp;quot;Garcia2007&amp;quot;&amp;gt;{{Cite journal |last=García |first=R. |date=2007 |title=Tracking solar gravity modes: the dynamics of the solar core |journal=[[Science (journal)|Science]] |volume=316 |issue=5831 |pages=1591–1593 |bibcode=2007Sci...316.1591G |doi=10.1126/science.1140598 |pmid=17478682 |s2cid=35285705 |display-authors=etal}}&amp;lt;/ref&amp;gt; It has a density of up to {{val|150|u=g|up=cm3}}&amp;lt;ref name=&amp;quot;Basu&amp;quot;&amp;gt;{{Cite journal |last1=Basu |first1=Sarbani |last2=Chaplin |first2=William J. |last3=Elsworth |first3=Yvonne |last4=New |first4=Roger |last5=Serenelli |first5=Aldo M. |year=2009 |title=Fresh insights on the structure of the solar core |journal=[[The Astrophysical Journal]] |volume=699 |issue=2 |pages=1403–1417 |arxiv=0905.0651 |bibcode=2009ApJ...699.1403B |doi=10.1088/0004-637X/699/2/1403 |s2cid=11044272}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;NASA1&amp;quot;&amp;gt;{{Cite web |date=18 January 2007 |title=NASA/Marshall Solar Physics |url=http://solarscience.msfc.nasa.gov/interior.shtml |url-status=live |archive-url=https://web.archive.org/web/20190329081742/https://solarscience.msfc.nasa.gov/interior.shtml |archive-date=29 March 2019 |access-date=11 July 2009 |publisher=[[Marshall Space Flight Center]]}}&amp;lt;/ref&amp;gt; (about 150 times the density of water) and a temperature of close to 15.7&amp;amp;nbsp;million [[kelvin]] (K).&amp;lt;ref name=&amp;quot;NASA1&amp;quot; /&amp;gt; By contrast, the Sun's surface temperature is about {{val|5,800|u=K}}. Recent analysis of [[Solar and Heliospheric Observatory|SOHO]] mission data favours the idea that the core is rotating faster than the radiative zone outside it.&amp;lt;ref name=&amp;quot;Garcia2007&amp;quot; /&amp;gt; Through most of the Sun's life, energy has been produced by nuclear fusion in the core region through the [[proton–proton chain]]; this process converts hydrogen into helium.&amp;lt;ref&amp;gt;{{Cite conference |last=Broggini |first=C. |date=2003 |title=Physics in Collision, Proceedings of the XXIII International Conference: Nuclear Processes at Solar Energy |url=http://www.slac.stanford.edu/econf/C030626 |conference=XXIII Physics in Collisions Conference |location=Zeuthen, Germany |page=21 |arxiv=astro-ph/0308537 |bibcode=2003phco.conf...21B |archive-url=https://web.archive.org/web/20170421113407/http://www.slac.stanford.edu/econf/C030626/ |archive-date=21 April 2017 |access-date=12 August 2013 |url-status=live}}&amp;lt;/ref&amp;gt; Currently, 0.8% of the energy generated in the Sun comes from another sequence of fusion reactions called the [[CNO cycle]]; the proportion coming from the CNO cycle is expected to increase as the Sun becomes older and more luminous.&amp;lt;ref name=&amp;quot;jpcs271_1_012031&amp;quot;&amp;gt;{{Cite journal |last1=Goupil |first1=M. J. |last2=Lebreton |first2=Y. |last3=Marques |first3=J. P. |last4=Samadi |first4=R. |last5=Baudin |first5=F. |date=2011 |title=Open issues in probing interiors of solar-like oscillating main sequence stars 1. From the Sun to nearly suns |journal=[[Journal of Physics: Conference Series]] |volume=271 |issue=1 |page=012031 |arxiv=1102.0247 |bibcode=2011JPhCS.271a2031G |doi=10.1088/1742-6596/271/1/012031 |s2cid=4776237}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite journal |last=The Borexino Collaboration |date=2020 |title=Experimental evidence of neutrinos produced in the CNO fusion cycle in the Sun |url=https://www.nature.com/articles/s41586-020-2934-0 |journal=[[Nature (journal)|Nature]] |volume=587 |issue=? |pages=577–582 |arxiv=2006.15115 |bibcode=2020Natur.587..577B |doi=10.1038/s41586-020-2934-0 |pmid=33239797 |s2cid=227174644 |access-date=26 November 2020 |archive-date=27 November 2020 |archive-url=https://web.archive.org/web/20201127093809/https://www.nature.com/articles/s41586-020-2934-0 |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The core is the only region of the Sun that produces an appreciable amount of [[thermal energy]] through fusion; 99% of the Sun's power is generated in the innermost 24% of its radius, and almost no fusion occurs beyond 30% of the radius. The rest of the Sun is heated by this energy as it is transferred outward through many successive layers, finally to the solar photosphere where it escapes into space through radiation (photons) or advection (massive particles).&amp;lt;ref name=&amp;quot;Phillips1995-47&amp;quot;&amp;gt;{{Cite book |last=Phillips |first=K. J. H. |title=Guide to the Sun |year=1995 |publisher=[[Cambridge University Press]] |isbn=978-0-521-39788-9 |url=https://books.google.com/books?id=idwBChjVP0gC&amp;amp;pg=PA47 |pages=47–53}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=Zirker2002-15&amp;gt;{{Cite book |last=Zirker |first=J. B. |date=2002 |title=Journey from the Center of the Sun |pages=[https://archive.org/details/journeyfromcente0000zirk/page/15 15–34] |publisher=[[Princeton University Press]] |isbn=978-0-691-05781-1 |url=https://archive.org/details/journeyfromcente0000zirk/page/15}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
[[File:Proton-proton reaction chain.svg|thumb|Illustration of a proton-proton reaction chain, from hydrogen forming [[deuterium]], [[helium-3]], and regular [[helium-4]]|alt=circles and arrows showing protons combining in a series of fusion reactions yielding helium-3 which breaks down tow helium-4]]&lt;br /&gt;
The proton–proton chain occurs around {{val|9.2|e=37}} times each second in the core, converting about 3.7{{e|38}} protons into [[alpha particle]]s (helium nuclei) every second (out of a total of ~8.9{{e|56}} free protons in the Sun), or about {{val|6.2|e=11|u=kg|up=s}}. However, each proton (on average) takes around 9 billion years to fuse with another using the PP chain.&amp;lt;ref name=&amp;quot;Phillips1995-47&amp;quot; /&amp;gt; Fusing four free [[proton]]s (hydrogen nuclei) into a single alpha particle (helium nucleus) releases around 0.7% of the fused mass as energy,&amp;lt;ref&amp;gt;{{Cite book |last=Shu |first=F. H. |url=https://archive.org/details/physicaluniverse00shuf/page/102 |title=The Physical Universe: An Introduction to Astronomy |year=1982 |publisher=University Science Books |isbn=978-0-935702-05-7 |page=[https://archive.org/details/physicaluniverse00shuf/page/102 102]}}&amp;lt;/ref&amp;gt; so the Sun releases energy at the mass–energy conversion rate of 4.26&amp;amp;nbsp;billion kg/s (which requires 600 billion kg of hydrogen&amp;lt;ref&amp;gt;{{Cite web |year=2012 |title=Ask Us: Sun |url=https://helios.gsfc.nasa.gov/qa_sun.html |url-status=dead |archive-url=https://web.archive.org/web/20180903223810/https://helios.gsfc.nasa.gov/qa_sun.html |archive-date=3 September 2018 |access-date=13 July 2017 |website=Cosmicopia |publisher=NASA}}&amp;lt;/ref&amp;gt;), for 384.6&amp;amp;nbsp;[[Yotta-|yottawatts]] ({{val|3.846|e=26|u=W}}),&amp;lt;ref name=&amp;quot;nssdc&amp;quot; /&amp;gt; or 9.192{{e|10}}&amp;amp;nbsp;[[TNT equivalent|megatons of TNT]] per second. The large power output of the Sun is mainly due to the huge size and density of its core (compared to Earth and objects on Earth), with only a fairly small amount of power being generated per [[cubic metre]]. Theoretical models of the Sun's interior indicate a maximum power density, or energy production, of approximately 276.5 [[watt]]s per cubic metre at the centre of the core,&amp;lt;ref&amp;gt;{{Cite web |last=Cohen |first=H. |date=9 November 1998 |title=Table of temperatures, power densities, luminosities by radius in the Sun |url=http://fusedweb.llnl.gov/CPEP/Chart_Pages/5.Plasmas/Sunlayers.html |archive-url=http://webarchive.loc.gov/all/20011129122524/http%3A//fusedweb%2Ellnl%2Egov/cpep/chart_pages/5%2Eplasmas/sunlayers%2Ehtml |archive-date=29 November 2001 |access-date=30 August 2011 |publisher=Contemporary Physics Education Project}}&amp;lt;/ref&amp;gt; which, according to [[Karl Kruszelnicki]], is about the same power density inside a [[compost pile]].&amp;lt;ref&amp;gt;{{Cite web |date=17 April 2012 |title=Lazy Sun is less energetic than compost |url=http://www.abc.net.au/science/articles/2012/04/17/3478276.htm |url-status=live |archive-url=https://web.archive.org/web/20140306123113/http://www.abc.net.au/science/articles/2012/04/17/3478276.htm |archive-date=6 March 2014 |access-date=25 February 2014 |publisher=Australian Broadcasting Corporation}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The fusion rate in the core is in a self-correcting equilibrium: a slightly higher rate of fusion would cause the core to heat up more and [[thermal expansion|expand]] slightly against the weight of the outer layers, reducing the density and hence the fusion rate and correcting the [[Perturbation (astronomy)|perturbation]]; and a slightly lower rate would cause the core to cool and shrink slightly, increasing the density and increasing the fusion rate and again reverting it to its present rate.&amp;lt;ref&amp;gt;{{Cite journal |last1=Haubold |first1=H. J. |last2=Mathai |first2=A. M. |date=1994 |title=Solar Nuclear Energy Generation &amp;amp; The Chlorine Solar Neutrino Experiment |volume=320 |issue=1994 |pages=102–116 |journal=[[AIP Conference Proceedings]] |arxiv=astro-ph/9405040 |bibcode=1995AIPC..320..102H |doi=10.1063/1.47009 |citeseerx=10.1.1.254.6033 |s2cid=14622069}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |last=Myers |first=S. T. |date=18 February 1999 |title=Lecture 11 – Stellar Structure I: Hydrostatic Equilibrium |url=http://www.aoc.nrao.edu/~smyers/courses/astro12/L11.html |url-status=live |archive-url=https://web.archive.org/web/20110512180052/http://www.aoc.nrao.edu/~smyers/courses/astro12/L11.html |archive-date=12 May 2011 |access-date=15 July 2009 |website=Introduction to Astrophysics II}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Radiative zone ===&lt;br /&gt;
&lt;br /&gt;
[[File:Heat Transfer in Stars.svg|thumb|300x300px|Illustration of different stars' internal structure based on mass. The Sun in the middle has an inner radiating zone and an outer convective zone.|alt=See caption]]&lt;br /&gt;
The radiative zone is the thickest layer of the Sun, at 0.45 solar radii. From the core out to about 0.7 [[Solar radius|solar radii]], [[thermal radiation]] is the primary means of energy transfer.&amp;lt;ref name=&amp;quot;autogenerated1&amp;quot;&amp;gt;{{cite web |url=http://mynasa.nasa.gov/worldbook/sun_worldbook.html |publisher=NASA |title=Sun |website=World Book at NASA |access-date=10 October 2012 |url-status=dead |archive-url=https://web.archive.org/web/20130510142009/http://mynasa.nasa.gov/worldbook/sun_worldbook.html |archive-date=10 May 2013}}&amp;lt;/ref&amp;gt; The temperature drops from approximately 7&amp;amp;nbsp;million to 2&amp;amp;nbsp;million kelvins with increasing distance from the core.&amp;lt;ref name=&amp;quot;NASA1&amp;quot; /&amp;gt; This [[temperature gradient]] is less than the value of the [[adiabatic lapse rate]] and hence cannot drive convection, which explains why the transfer of energy through this zone is by [[radiation]] instead of thermal convection.&amp;lt;ref name=&amp;quot;NASA1&amp;quot; /&amp;gt; [[Ions]] of hydrogen and helium emit photons, which travel only a brief distance before being reabsorbed by other ions.&amp;lt;ref name=&amp;quot;autogenerated1&amp;quot; /&amp;gt; The density drops a hundredfold (from 20,000&amp;amp;nbsp;kg/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; to 200&amp;amp;nbsp;kg/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;) between 0.25 solar radii and 0.7 radii, the top of the radiative zone.&amp;lt;ref name=&amp;quot;autogenerated1&amp;quot; /&amp;gt;&amp;lt;!-- http://adsabs.harvard.edu/abs/2008SoPh..251..101M --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tachocline ===&lt;br /&gt;
&lt;br /&gt;
The radiative zone and the convective zone are separated by a transition layer, the [[tachocline]]. This is a region where the sharp regime change between the uniform rotation of the radiative zone and the differential rotation of the [[convection zone]] results in a large [[shear (fluid)|shear]] between the two—a condition where successive horizontal layers slide past one another.&amp;lt;ref&amp;gt;{{Cite book |last=Tobias |first=S. M. |title=Fluid Dynamics and Dynamos in Astrophysics and Geophysics |date=2005 |publisher=[[CRC Press]] |isbn=978-0-8493-3355-2 |editor-first=A. M. |editor-last=Soward |pages=193–235 |chapter=The solar tachocline: Formation, stability and its role in the solar dynamo |access-date=22 August 2020 |display-editors=etal |chapter-url=https://books.google.com/books?id=PLNwoJ6qFoEC&amp;amp;pg=PA193 |archive-url=https://web.archive.org/web/20201029102001/https://books.google.com/books?id=PLNwoJ6qFoEC&amp;amp;pg=PA193 |archive-date=29 October 2020 |url-status=live}}&amp;lt;/ref&amp;gt; Presently, it is hypothesised that a magnetic dynamo, or [[solar dynamo]], within this layer generates the Sun's [[magnetic field]].&amp;lt;ref name=NASA1 /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Convective zone ===&lt;br /&gt;
&lt;br /&gt;
The Sun's convection zone extends from 0.7 solar radii (500,000&amp;amp;nbsp;km) to near the surface. In this layer, the solar plasma is not dense or hot enough to transfer the heat energy of the interior outward via radiation. Instead, the density of the plasma is low enough to allow convective currents to develop and move the Sun's energy outward towards its surface. Material heated at the tachocline picks up heat and expands, thereby reducing its density and allowing it to rise. As a result, an orderly motion of the mass develops into thermal cells that carry most of the heat outward to the Sun's photosphere above. Once the material diffusively and radiatively cools just beneath the photospheric surface, its density increases, and it sinks to the base of the convection zone, where it again picks up heat from the top of the radiative zone and the convective cycle continues. At the photosphere, the temperature has dropped 350-fold to {{convert|5,700|K|F}} and the density to only 0.2&amp;amp;nbsp;g/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; (about 1/10,000 the density of air at sea level, and 1 millionth that of the inner layer of the convective zone).&amp;lt;ref name=NASA1 /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The thermal columns of the convection zone form an imprint on the surface of the Sun giving it a granular appearance called the [[solar granulation]] at the smallest scale and [[supergranulation]] at larger scales. Turbulent convection in this outer part of the solar interior sustains &amp;quot;small-scale&amp;quot; dynamo action over the near-surface volume of the Sun.&amp;lt;ref name=NASA1 /&amp;gt; The Sun's thermal columns are [[Bénard cells]] and take the shape of roughly hexagonal prisms.&amp;lt;ref&amp;gt;{{Cite book |last=Mullan |first=D. J. |title=From the Sun to the Great Attractor |year=2000 |publisher=[[Springer Science+Business Media|Springer]] |isbn=978-3-540-41064-5 |editor-last=Page |editor-first=D. |page=22 |chapter=Solar Physics: From the Deep Interior to the Hot Corona |access-date=22 August 2020 |editor-last2=Hirsch |editor-first2=J. G. |chapter-url=https://books.google.com/books?id=rk5fxs55_OkC&amp;amp;pg=PA22 |archive-url=https://web.archive.org/web/20210417080656/https://books.google.com/books?id=rk5fxs55_OkC&amp;amp;pg=PA22 |archive-date=17 April 2021 |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atmosphere ===&lt;br /&gt;
&lt;br /&gt;
The solar atmosphere is the region of the Sun that extends from the top of the convection zone to the inner boundary of the [[heliosphere]]. It is often divided into three primary layers: the photosphere, the [[chromosphere]], and the [[Stellar corona|corona]].&amp;lt;ref&amp;gt;{{Cite book |url=http://link.springer.com/10.1007/978-3-540-46315-3_3 |title=Handbook of the Solar-Terrestrial Environment |date=2007 |publisher=Springer Berlin Heidelberg |isbn=978-3-540-46314-6 |editor-last=Kamide |editor-first=Y. |location=Berlin, Heidelberg |pages=55–93 |language=en |doi=10.1007/978-3-540-46315-3_3 |editor-last2=Chian |editor-first2=A.}}&amp;lt;/ref&amp;gt; The chromosphere and corona are separated by a thin [[Solar transition region|transition region]] that is frequently considered as an additional distinct layer.&amp;lt;ref&amp;gt;{{cite book |last1=Cravens |first1=Thomas E. |title=Physics of Solar System Plasmas |date=1997 |publisher=Cambridge University Press |location=Cambridge |isbn=9780511529467 |doi=10.1017/CBO9780511529467}}&amp;lt;/ref&amp;gt;{{rp|173–174}} Some sources consider the heliosphere to be the ''outer'' or ''extended solar atmosphere''.&amp;lt;ref&amp;gt;{{cite web |title=Components of the Heliosphere |url=https://www.nasa.gov/image-article/components-of-heliosphere/ |publisher=NASA |access-date=8 April 2025 |date=25 January 2013}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite journal |last1=Solanki |first1=Sami K |last2=Inhester |first2=Bernd |last3=Schüssler |first3=Manfred |title=The Solar Magnetic Field |journal=Reports on Progress in Physics |date=1 March 2006 |volume=69 |issue=3 |pages=563–668 |doi=10.1088/0034-4885/69/3/R02 |bibcode=2006RPPh...69..563S |arxiv=1008.0771}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Photosphere ====&lt;br /&gt;
&lt;br /&gt;
[[File:Highest resolution photo of Sun (NSF) as of January 20, 2020.jpg|thumb|alt=A false-colour image of the solar photosphere|The photosphere is structured by convection cells referred to as ''[[Solar granule|granules]]''.]]&lt;br /&gt;
&lt;br /&gt;
The visible surface of the Sun, the photosphere, is the layer below which the Sun becomes [[opacity (optics)|opaque]] to visible light.&amp;lt;ref name=Abhyankar1977 /&amp;gt; Photons produced in this layer escape the Sun through the transparent solar atmosphere above it and become solar radiation, sunlight. The change in opacity is due to the decreasing amount of [[Hydrogen anion|H&amp;lt;sup&amp;gt;−&amp;lt;/sup&amp;gt; ions]], which absorb visible light easily.&amp;lt;ref name=Abhyankar1977 /&amp;gt; Conversely, the visible light perceived is produced as electrons react with hydrogen atoms to produce H&amp;lt;sup&amp;gt;−&amp;lt;/sup&amp;gt; ions.&amp;lt;ref name=&amp;quot;Gibson&amp;quot;&amp;gt;{{Cite book |last=Gibson |first=Edward G. |date=1973 |title=The Quiet Sun (NASA SP-303) |publisher=NASA |asin=B0006C7RS0}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Shu&amp;quot;&amp;gt;{{Cite book |last=Shu |first=F. H. |title=The Physics of Astrophysics |volume=1 |publisher=University Science Books |year=1991 |isbn=978-0-935702-64-4}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The photosphere is tens to hundreds of kilometres thick, and is slightly less opaque than air on Earth. Because the upper part of the photosphere is cooler than the lower part, an image of the Sun appears brighter in the centre than on the edge or ''limb'' of the solar disk, in a phenomenon known as ''[[limb darkening]]''.&amp;lt;ref name=&amp;quot;Abhyankar1977&amp;quot; /&amp;gt; The spectrum of sunlight has approximately the spectrum of a [[black-body]] radiating at {{convert|5,772|K|F}},&amp;lt;ref name=&amp;quot;IAU2015resB3&amp;quot;/&amp;gt; interspersed with atomic [[absorption line]]s from the tenuous layers above the photosphere. The photosphere has a particle density of ~10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt;&amp;amp;nbsp;m&amp;lt;sup&amp;gt;−3&amp;lt;/sup&amp;gt; (about 0.37% of the particle number per volume of [[Earth's atmosphere]] at sea level). The photosphere is not fully ionised—the extent of ionisation is about 3%, leaving almost all of the hydrogen in atomic form.&amp;lt;ref&amp;gt;{{cite journal |last1=Rast |first1=M. |last2=Nordlund |first2=Å. |last3=Stein |first3=R. |last4=Toomre |first4=J. |date=1993 |title=Ionization Effects in Three-Dimensional Solar Granulation Simulations |journal=[[The Astrophysical Journal Letters]] |volume=408 |issue=1 |page=L53–L56 |bibcode=1993ApJ...408L..53R |doi=10.1086/186829 |doi-access=free}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The coolest layer of the Sun is a temperature minimum region extending to about {{val|500|u=km}} above the photosphere, and has a temperature of about {{val|4100|u=K|fmt=commas}}.&amp;lt;ref name=&amp;quot;Abhyankar1977&amp;quot;&amp;gt;{{Cite journal |last=Abhyankar |first=K. D. |date=1977 |title=A Survey of the Solar Atmospheric Models |url=http://prints.iiap.res.in/handle/2248/510 |url-status=live |journal=[[Bulletin of the Astronomical Society of India]] |volume=5 |pages=40–44 |bibcode=1977BASI....5...40A |archive-url=https://web.archive.org/web/20200512151641/http://prints.iiap.res.in/handle/2248/510 |archive-date=12 May 2020 |access-date=12 July 2009}}&amp;lt;/ref&amp;gt; This part of the Sun is cool enough to allow for the existence of simple molecules such as [[carbon monoxide]] and water.&amp;lt;ref name=&amp;quot;Solanki1994&amp;quot;&amp;gt;{{Cite journal |last1=Solanki |first1=S. K. |last2=Livingston |first2=W. |last3=Ayres |first3=T. |date=1994 |title=New Light on the Heart of Darkness of the Solar Chromosphere |journal=[[Science (journal)|Science]] |pmid=17748350 |volume=263 |issue=5143 |pages=64–66 |bibcode=1994Sci...263...64S |doi=10.1126/science.263.5143.64 |s2cid=27696504}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Chromosphere ====&lt;br /&gt;
Above the temperature minimum layer is a layer about {{val|2000|u=km|fmt=commas}} thick, dominated by a spectrum of emission and absorption lines.&amp;lt;ref name=&amp;quot;Abhyankar1977&amp;quot; /&amp;gt; It is called the ''chromosphere'' from the Greek root ''chroma'', meaning colour, because the chromosphere is visible as a coloured flash at the beginning and end of total solar eclipses.&amp;lt;ref name=&amp;quot;autogenerated1&amp;quot; /&amp;gt; The temperature of the chromosphere increases gradually with altitude, ranging up to around {{val|20000|u=K|fmt=commas}} near the top.&amp;lt;ref name=&amp;quot;Abhyankar1977&amp;quot; /&amp;gt; In the upper part of the chromosphere helium becomes partially [[ionization|ionised]].&amp;lt;ref name=&amp;quot;Hansteen1997&amp;quot;&amp;gt;{{Cite journal |last1=Hansteen |first1=V. H. |last2=Leer |first2=E. |last3=Holzer |first3=T. E. |date=1997 |title=The role of helium in the outer solar atmosphere |journal=[[The Astrophysical Journal]] |volume=482 |issue=1 |pages=498–509 |bibcode=1997ApJ...482..498H |doi=10.1086/304111 |doi-access=free}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:171879main LimbFlareJan12 lg.jpg|thumb|The Sun's transition region taken by [[Hinode (satellite)|Hinode]]'s Solar Optical Telescope|left|alt=A photograph of the surface of the sun, with flares terminating from the surface on the left.]]&lt;br /&gt;
The chromosphere and overlying corona are separated by a thin (about {{val|200|u=km}}) transition region where the temperature rises rapidly from around {{val|20000|u=K|fmt=commas}} in the upper chromosphere to coronal temperatures closer to {{val|1000000|u=K|fmt=commas}}.&amp;lt;ref name=&amp;quot;Erdelyi2007&amp;quot;&amp;gt;{{Cite journal |last1=Erdèlyi |first1=R. |last2=Ballai |first2=I. |date=2007 |title=Heating of the solar and stellar coronae: a review |journal=Astron. Nachr. |volume=328 |issue=8 |pages=726–733 |bibcode=2007AN....328..726E |doi=10.1002/asna.200710803 |doi-access=free}}&amp;lt;/ref&amp;gt; The temperature increase is facilitated by the full ionisation of helium in the transition region, which significantly reduces radiative cooling of the plasma.&amp;lt;ref name=&amp;quot;Hansteen1997&amp;quot; /&amp;gt; The transition region does not occur at a well-defined altitude, but forms a kind of nimbus around chromospheric features such as [[Solar spicule|spicules]] and [[Solar filament|filaments]], and is in constant, chaotic motion.&amp;lt;ref name=&amp;quot;autogenerated1&amp;quot; /&amp;gt; The transition region is not easily visible from Earth's surface, but is readily observable from space by instruments sensitive to [[extreme ultraviolet]].&amp;lt;ref name=&amp;quot;Dwivedi2006&amp;quot;&amp;gt;{{Cite journal |last=Dwivedi |first=B. N. |date=2006 |title=Our ultraviolet Sun |url=http://www.iisc.ernet.in/currsci/sep102006/587.pdf |url-status=live |journal=[[Current Science]] |volume=91 |issue=5 |pages=587–595 |archive-url=https://web.archive.org/web/20201025001339/http://www.iisc.ernet.in/currsci/sep102006/587.pdf |archive-date=25 October 2020 |access-date=22 March 2015}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Corona====&lt;br /&gt;
[[File:2017 Total Solar Eclipse (35909952653).jpg|thumb|During a [[solar eclipse]] the solar corona can be seen with the naked eye during totality.|alt=A photograph of a solar eclipse]]&lt;br /&gt;
&lt;br /&gt;
The corona is the next layer of the Sun. The low corona, near the surface of the Sun, has a particle density around 10&amp;lt;sup&amp;gt;15&amp;lt;/sup&amp;gt;&amp;amp;nbsp;m&amp;lt;sup&amp;gt;−3&amp;lt;/sup&amp;gt; to 10&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt;&amp;amp;nbsp;m&amp;lt;sup&amp;gt;−3&amp;lt;/sup&amp;gt;.&amp;lt;ref name=Hansteen1997 /&amp;gt;{{efn|name=particle density}} The average temperature of the corona and solar wind is about 1,000,000–2,000,000&amp;amp;nbsp;K; however, in the hottest regions it is 8,000,000–20,000,000 K.&amp;lt;ref name=Erdelyi2007 /&amp;gt; Although no complete theory yet exists to account for the temperature of the corona, at least some of its heat is known to be from [[magnetic reconnection]].&amp;lt;ref name=Erdelyi2007 /&amp;gt;&amp;lt;ref name=&amp;quot;Russell2001&amp;quot;&amp;gt;{{Cite book |last=Russell |first=C. T. |title=Space Weather (Geophysical Monograph) |date=2001 |publisher=[[American Geophysical Union]] |isbn=978-0-87590-984-4 |editor-last=Song |editor-first=Paul |pages=73–88 |chapter=Solar wind and interplanetary magnetic field: A tutorial |access-date=11 July 2009 |editor-last2=Singer |editor-first2=Howard J. |editor-last3=Siscoe |editor-first3=George L. |editor-link3=George Siscoe |chapter-url=http://www-ssc.igpp.ucla.edu/personnel/russell/papers/SolWindTutorial.pdf |archive-url=https://web.archive.org/web/20181001131951/http://www-ssc.igpp.ucla.edu/personnel/russell/papers/SolWindTutorial.pdf |archive-date=1 October 2018 |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The outer boundary of the corona is located where the radially increasing, large-scale [[solar wind]] speed is equal to the radially decreasing [[Alfvén wave|Alfvén wave phase speed]]. This defines a closed, nonspherical surface, referred to as the ''[[Alfvén critical surface]]'', below which coronal flows are [[Alfvén Mach number|sub-Alfvénic]] and above which the solar wind is super-Alfvénic.&amp;lt;ref&amp;gt;{{cite journal |last1=Cranmer |first1=Steven R. |last2=Chhiber |first2=Rohit |last3=Gilly |first3=Chris R. |last4=Cairns |first4=Iver H. |last5=Colaninno |first5=Robin C. |last6=McComas |first6=David J. |last7=Raouafi |first7=Nour E. |last8=Usmanov |first8=Arcadi V. |last9=Gibson |first9=Sarah E. |last10=DeForest |first10=Craig E. |title=The Sun's Alfvén Surface: Recent Insights and Prospects for the Polarimeter to Unify the Corona and Heliosphere (PUNCH) |journal=Solar Physics |date=November 2023 |volume=298 |issue=11 |page=126 |doi=10.1007/s11207-023-02218-2 |bibcode=2023SoPh..298..126C |arxiv=2310.05887}}&amp;lt;/ref&amp;gt; The height at which this transition occurs varies across space and with solar activity, reaching its lowest near solar minimum and its highest near solar maximum. In April 2021 the surface was crossed for the first time at heliocentric distances ranging from 16 to 20&amp;amp;nbsp;solar radii by the [[Parker Solar Probe]].&amp;lt;ref&amp;gt;{{cite journal |last1=Kasper |first1=J. C. |last2=Klein |first2=K. G. |last3=Lichko |first3=E. |last4=Huang |first4=Jia |last5=Chen |first5=C. H. K. |last6=Badman |first6=S. T. |last7=Bonnell |first7=J. |last8=Whittlesey |first8=P. L. |last9=Livi |first9=R. |last10=Larson |first10=D. |last11=Pulupa |first11=M. |last12=Rahmati |first12=A. |last13=Stansby |first13=D. |last14=Korreck |first14=K. E. |last15=Stevens |first15=M. |last16=Case |first16=A. W. |last17=Bale |first17=S. D. |last18=Maksimovic |first18=M. |last19=Moncuquet |first19=M. |last20=Goetz |first20=K. |last21=Halekas |first21=J. S. |last22=Malaspina |first22=D. |last23=Raouafi |first23=Nour E. |last24=Szabo |first24=A. |last25=MacDowall |first25=R. |last26=Velli |first26=Marco |last27=Dudok de Wit |first27=Thierry |last28=Zank |first28=G. P. |title=Parker Solar Probe Enters the Magnetically Dominated Solar Corona |journal=Physical Review Letters |date=14 December 2021 |volume=127 |issue=25 |page=255101 |doi=10.1103/PhysRevLett.127.255101 |pmid=35029449 |bibcode=2021PhRvL.127y5101K}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;touching&amp;quot;&amp;gt;{{cite web |last=Hatfield |first=Miles |title=NASA Enters the Solar Atmosphere for the First Time |url=https://www.nasa.gov/feature/goddard/2021/nasa-enters-the-solar-atmosphere-for-the-first-time-bringing-new-discoveries |website=NASA |date=13 December 2021 |access-date=30 July 2022 |archive-date=27 December 2021 |archive-url=https://web.archive.org/web/20211227093247/https://www.nasa.gov/feature/goddard/2021/nasa-enters-the-solar-atmosphere-for-the-first-time-bringing-new-discoveries/ |url-status=live}}{{PD-notice}}&amp;lt;/ref&amp;gt; Predictions of its full possible extent have placed its full range within 8 to 30&amp;amp;nbsp;solar radii.&amp;lt;ref&amp;gt;{{cite journal |last1=Liu |first1=Ying D. |last2=Chen |first2=Chong |last3=Stevens |first3=Michael L. |last4=Liu |first4=Mingzhe |title=Determination of Solar Wind Angular Momentum and Alfvén Radius from Parker Solar Probe Observations |journal=The Astrophysical Journal Letters |date=1 February 2021 |volume=908 |issue=2 |pages=L41 |doi=10.3847/2041-8213/abe38e |bibcode=2021ApJ...908L..41L |arxiv=2102.03376 |doi-access=free}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite journal |last1=Katsikas |first1=Valadis |last2=Exarhos |first2=George |last3=Moussas |first3=Xenophon |title=Study of the Solar Slow Sonic, Alfvén and Fast Magnetosonic Transition Surfaces |journal=Advances in Space Research |date=August 2010 |volume=46 |issue=4 |pages=382–390 |doi=10.1016/j.asr.2010.05.003 |bibcode=2010AdSpR..46..382K}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite journal |last1=Wexler |first1=David B. |last2=Stevens |first2=Michael L. |last3=Case |first3=Anthony W. |last4=Song |first4=Paul |title=Alfvén Speed Transition Zone in the Solar Corona |journal=The Astrophysical Journal Letters |date=1 October 2021 |volume=919 |issue=2 |pages=L33 |doi=10.3847/2041-8213/ac25fa |bibcode=2021ApJ...919L..33W |doi-access=free}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Heliosphere===&lt;br /&gt;
[[File:PIA22835-VoyagerProgram&amp;amp;Heliosphere-Chart-20181210.png|thumb|left|Depiction of the [[heliosphere]]]]&lt;br /&gt;
The heliosphere is defined as the region of space where the solar wind dominates over the interstellar medium.&amp;lt;ref&amp;gt;{{cite book |last1=Parker |first1=E. N. |author1-link=Eugene Parker |editor1-last=Kamide |editor1-first=Yohsuke |editor2-last=Chian |editor2-first=Abraham C.-L. |title=Handbook of the Solar-Terrestrial Environment |date=2007 |publisher=Springer |location=Berlin |isbn=978-3-540-46315-3 |chapter=Solar Wind |doi=10.1007/978-3-540-46315-3 |bibcode=2007hste.book.....K |url=https://archive.org/details/handbookofsolart0000unse |url-access=registration}}&amp;lt;/ref&amp;gt; Turbulence and dynamic forces in the heliosphere cannot affect the shape of the solar corona within, because the information can only travel at the speed of Alfvén waves. The solar wind travels outward continuously through the heliosphere,&amp;lt;ref&amp;gt;{{Cite web |date=22 April 2003 |title=A Star with two North Poles |url=https://science.nasa.gov/headlines/y2003/22apr_currentsheet.htm |url-status=dead |archive-url=https://web.archive.org/web/20090718014855/https://science.nasa.gov/headlines/y2003/22apr_currentsheet.htm |archive-date=18 July 2009 |website=Science @ NASA |publisher=NASA}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite journal |last1=Riley |first1=P. |last2=Linker |first2=J. A. |last3=Mikić |first3=Z. |date=2002 |title=Modeling the heliospheric current sheet: Solar cycle variations |journal=[[Journal of Geophysical Research]] |volume=107 |issue=A7 |pages=SSH 8–1 |bibcode=2002JGRA..107.1136R |doi=10.1029/2001JA000299 |id=CiteID 1136 |doi-access=free}}&amp;lt;/ref&amp;gt; forming the solar magnetic field into a [[Parker spiral|spiral]] shape,&amp;lt;ref name=Russell2001 /&amp;gt; until it impacts the [[Heliopause (astronomy)|heliopause]] more than {{val|50|u=AU}} from the Sun. In December 2004, the ''[[Voyager 1]]'' probe passed through a shock front that is thought to be part of the heliopause.&amp;lt;ref&amp;gt;{{Cite press release |title=The Distortion of the Heliosphere: Our Interstellar Magnetic Compass |date=2005 |publisher=[[European Space Agency]] |url=http://www.spaceref.com/news/viewpr.html?pid=16394 |access-date=22 March 2006 |url-status=live |archive-url=https://archive.today/20120604110953/http://www.spaceref.com/news/viewpr.html?pid=16394 |archive-date=4 June 2012}}&amp;lt;/ref&amp;gt; In late 2012, ''Voyager 1'' recorded a marked increase in [[cosmic ray]] collisions and a sharp drop in lower energy particles from the solar wind, which suggested that the probe had passed through the heliopause and entered the [[interstellar medium]],&amp;lt;ref&amp;gt;{{Cite press release |last=Landau |first=Elizabeth |url=https://voyager.jpl.nasa.gov/news/details.php?article_id=44 |title=Voyager 1 Helps Solve Interstellar Medium Mystery |publisher=[[Jet Propulsion Laboratory]] |date=29 October 2015 |url-status=live |archive-url=https://web.archive.org/web/20230803125531/https://voyager.jpl.nasa.gov/news/details.php?article_id=44 |archive-date=3 August 2023}}&amp;lt;/ref&amp;gt; and indeed did so on 25 August 2012, at approximately 122 astronomical units (18&amp;amp;nbsp;Tm) from the Sun.&amp;lt;ref&amp;gt;{{Cite web |url=https://voyager.jpl.nasa.gov/mission/interstellar-mission/ |title=Interstellar Mission |publisher=[[Jet Propulsion Laboratory]] |access-date=14 May 2021 |archive-date=14 September 2017 |archive-url=https://web.archive.org/web/20170914060928/https://voyager.jpl.nasa.gov/mission/interstellar-mission/#:~:text=On%20Aug.,billion%20kilometers)%20from%20the%20sun. |url-status=live}}&amp;lt;/ref&amp;gt; The heliosphere has a [[Heliosphere#Heliotail|heliotail]] which stretches out behind it due to the Sun's [[peculiar motion]] through the galaxy.&amp;lt;ref&amp;gt;{{cite web |last1=Dunbar |first1=Brian |title=Components of the Heliosphere |url=https://www.nasa.gov/mission_pages/sunearth/science/heliosphere-components.html |website=NASA |date=2 March 2015 |access-date=20 March 2021 |archive-date=8 August 2021 |archive-url=https://web.archive.org/web/20210808183941/https://www.nasa.gov/mission_pages/sunearth/science/heliosphere-components.html |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Solar radiation ==&lt;br /&gt;
&lt;br /&gt;
[[File:Sun in fog in Lysekil.jpg|right|thumb|The Sun seen through a light fog|alt=A photograph of the sun with a layer of fog visible in front of it.]]&lt;br /&gt;
The Sun emits light across the [[visible spectrum]], so its colour is [[white]], with a [[CIE 1931 color space|CIE]] colour-space index near (0.3, 0.3), when viewed from space or when the Sun is high in the sky. The Solar radiance per wavelength peaks in the green portion of the spectrum when viewed from space.&amp;lt;ref&amp;gt;{{cite news |title=What Color is the Sun? |work=Universe Today |url=http://www.universetoday.com/18689/color-of-the-sun/ |url-status=live |access-date=23 May 2016 |archive-url=https://web.archive.org/web/20160525215525/http://www.universetoday.com/18689/color-of-the-sun/ |archive-date=25 May 2016}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web |title=What Color is the Sun? |url=http://solar-center.stanford.edu/SID/activities/GreenSun.html |url-status=live |archive-url=https://web.archive.org/web/20171030154449/http://solar-center.stanford.edu/SID/activities/GreenSun.html |archive-date=30 October 2017 |access-date=23 May 2016 |publisher=[[Stanford University|Stanford]] Solar Center}}&amp;lt;/ref&amp;gt; When the Sun is very low in the sky, [[Diffuse sky radiation|atmospheric scattering]] renders the Sun yellow, red, orange, or magenta, and in rare occasions even [[Green flash|green or blue]]. Some cultures mentally picture the Sun as yellow and some even red; the cultural reasons for this are debated.&amp;lt;ref name=&amp;quot;yellow sun paradox&amp;quot;&amp;gt;{{Cite journal |last=Wilk |first=S. R. |date=2009 |title=The Yellow Sun Paradox |url=http://www.osa-opn.org/Content/ViewFile.aspx?id=11147 |url-status=dead |journal=[[Optics &amp;amp; Photonics News]] |pages=12–13 |archive-url=https://web.archive.org/web/20120618183229/http://www.osa-opn.org/Content/ViewFile.aspx?id=11147 |archive-date=18 June 2012}}&amp;lt;/ref&amp;gt; The Sun is classed as a ''G2'' star,&amp;lt;ref name=&amp;quot;Phillips1995-47&amp;quot; /&amp;gt; meaning it is a [[G-type star]], with ''2'' indicating its [[effective temperature|surface temperature]] is in the second range of the G class.&lt;br /&gt;
&lt;br /&gt;
The [[solar constant]] is the amount of power that the Sun deposits per unit area that is directly exposed to sunlight. The solar constant is equal to approximately {{val|1368|u=W/m2|fmt=commas}} (watts per square metre) at a distance of one [[astronomical unit]] (AU) from the Sun (that is, at or near Earth's orbit).&amp;lt;ref name=&amp;quot;TSI&amp;quot;&amp;gt;{{cite web |title=Construction of a Composite Total Solar Irradiance (TSI) Time Series from 1978 to present |url=http://www.pmodwrc.ch/pmod.php?topic=tsi/composite/SolarConstant |date=24 May 2006 |website=pmodwrc |url-status=dead |archive-url=https://web.archive.org/web/20110801183920/http://www.pmodwrc.ch/pmod.php?topic=tsi%2Fcomposite%2FSolarConstant |archive-date=1 August 2011 |access-date=5 October 2005}}&amp;lt;/ref&amp;gt; Sunlight on the surface of Earth is [[attenuation (electromagnetic radiation)|attenuated]] by [[Atmosphere of Earth|Earth's atmosphere]], so that less power arrives at the surface (closer to {{val|1000|u=W/m2|fmt=commas}}) in clear conditions when the Sun is near the [[zenith]].&amp;lt;ref name=&amp;quot;El-Sharkawi2005&amp;quot;&amp;gt;{{Cite book |last=El-Sharkawi |first=Mohamed A. |title=Electric energy |date=2005 |publisher=CRC Press |isbn=978-0-8493-3078-0 |url=https://books.google.com/books?id=UokcachsYcYC&amp;amp;pg=PA87 |pages=87–88}}&amp;lt;/ref&amp;gt; Sunlight at the top of Earth's atmosphere is composed (by total energy) of about 50% infrared light, 40% visible light, and 10% ultraviolet light.&amp;lt;ref name=&amp;quot;Solar radiation&amp;quot;&amp;gt;{{cite encyclopedia |entry=Radiation (Solar) |encyclopedia=Encyclopedia of Atmospheric Sciences |year=2003 |last=Fu |first=Qiang |title=Radiation (SOLAR) |editor-last1=Curry |editor-first1=Judith A. |editor-last2=Pyle |editor-first2=John A. |publisher=Elsevier |pages=1859–1863 |doi=10.1016/B0-12-227090-8/00334-1 |isbn=978-0-12-227090-1 |url=http://curry.eas.gatech.edu/Courses/6140/ency/Chapter3/Ency_Atmos/Radiation_Solar.pdf |url-status=dead |archive-url=https://web.archive.org/web/20121101070344/http://curry.eas.gatech.edu/Courses/6140/ency/Chapter3/Ency_Atmos/Radiation_Solar.pdf |archive-date=1 November 2012 |access-date=29 December 2012}}&amp;lt;/ref&amp;gt; The atmosphere filters out over 70% of solar ultraviolet, especially at the shorter wavelengths.&amp;lt;ref&amp;gt;{{cite web |title=Reference Solar Spectral Irradiance: Air Mass 1.5 |url=http://rredc.nrel.gov/solar/spectra/am1.5/ |website=NREL |url-status=live |archive-url=https://web.archive.org/web/20190512190812/https://rredc.nrel.gov/solar//spectra/am1.5/ |archive-date=12 May 2019 |access-date=12 November 2009}}&amp;lt;/ref&amp;gt; Solar [[ultraviolet radiation]] ionises Earth's dayside upper atmosphere, creating the electrically conducting [[ionosphere]].&amp;lt;ref name=&amp;quot;Phillips1995&amp;quot;&amp;gt;{{Cite book |last=Phillips |first=K. J. H. |title=Guide to the Sun |url=https://books.google.com/books?id=idwBChjVP0gC&amp;amp;pg=PA14 |date=1995 |publisher=[[Cambridge University Press]] |isbn=978-0-521-39788-9 |pages=14–15, 34–38}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Ultraviolet]] light from the Sun has [[antiseptic]] properties and can be used to sanitise tools and water. This radiation causes [[sunburn]], and has other biological effects such as the production of [[vitamin D]] and [[sun tanning]]. It is the main cause of [[skin cancer]]. Ultraviolet light is strongly attenuated by Earth's [[ozone layer]], so that the amount of UV varies greatly with [[latitude]] and has been partially responsible for many biological adaptations, including variations in [[human skin colour]].&amp;lt;ref&amp;gt;{{Cite journal |last=Barsh |first=G. S. |date=2003 |title=What Controls Variation in Human Skin Color? |journal=[[PLOS Biology]] |volume=1 |issue=1 |page=e7 |doi=10.1371/journal.pbio.0000027 |pmc=212702 |pmid=14551921 |doi-access=free}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
High-energy [[gamma ray]] [[photon]]s initially released with fusion reactions in the core are almost immediately absorbed by the solar plasma of the radiative zone, usually after travelling only a few millimetres. Re-emission happens in a random direction and usually at slightly lower energy. With this sequence of emissions and absorptions, it takes a long time for radiation to reach the Sun's surface. Estimates of the photon travel time range between 10,000 and 170,000&amp;amp;nbsp;years.&amp;lt;ref name=&amp;quot;NASA&amp;quot;&amp;gt;{{cite web |date=2007 |title=Ancient sunlight |url=http://sunearthday.nasa.gov/2007/locations/ttt_sunlight.php |url-status=dead |archive-url=https://web.archive.org/web/20090515085541/http://sunearthday.nasa.gov/2007/locations/ttt_sunlight.php |archive-date=15 May 2009 |access-date=24 June 2009 |website=Technology Through Time |publisher=NASA |issue=50}}&amp;lt;/ref&amp;gt; In contrast, it takes only 2.3&amp;amp;nbsp;seconds for [[neutrino]]s, which account for about 2% of the total energy production of the Sun, to reach the surface. Because energy transport in the Sun is a process that involves photons in [[Thermodynamics|thermodynamic]] equilibrium with [[matter]], the time scale of energy transport in the Sun is longer, on the order of 30,000,000&amp;amp;nbsp;years. This is the time it would take the Sun to return to a stable state if the rate of energy generation in its core were suddenly changed.&amp;lt;ref&amp;gt;{{Cite journal |last=Stix |first=M. |date=2003 |title=On the time scale of energy transport in the sun |journal=[[Solar Physics (journal)|Solar Physics]] |volume=212 |issue=1 |pages=3–6 |bibcode=2003SoPh..212....3S |doi=10.1023/A:1022952621810 |s2cid=118656812}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Electron neutrino]]s are released by fusion reactions in the core, but, unlike photons, they rarely interact with matter, so almost all are able to escape the Sun immediately. However, measurements of the number of these neutrinos produced in the Sun are [[Solar neutrino problem|lower than theories predict]] by a factor of 3. In 2001, the discovery of [[neutrino oscillation]] resolved the discrepancy: the Sun emits the number of electron neutrinos predicted by the theory, but neutrino detectors were missing {{frac|2|3}} of them because the neutrinos had changed [[flavor (particle physics)|flavor]] by the time they were detected.&amp;lt;ref name=&amp;quot;Schlattl&amp;quot;&amp;gt;{{Cite journal |last=Schlattl |first=H. |date=2001 |title=Three-flavor oscillation solutions for the solar neutrino problem |journal=[[Physical Review D]] |volume=64 |issue=1 |page=013009 |arxiv=hep-ph/0102063 |bibcode=2001PhRvD..64a3009S |doi=10.1103/PhysRevD.64.013009 |s2cid=117848623}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Magnetic activity ==&lt;br /&gt;
&lt;br /&gt;
The Sun has a [[stellar magnetic field]] that varies across its surface. Its polar field is {{convert|1|-|2|G|sigfig=1|lk=on}}, whereas the field is typically {{convert|3000|G|sigfig=1}} in features on the Sun called ''sunspots'' and {{convert|10|-|100|G|sigfig=1}} in [[solar prominence]]s.&amp;lt;ref name=&amp;quot;nssdc&amp;quot; /&amp;gt; The magnetic field varies in time and location. The quasi-periodic 11-year [[solar cycle]] is the most prominent variation in which the number and size of sunspots waxes and wanes.&amp;lt;ref name=&amp;quot;doi10.1146/annurev-astro-081913-040012&amp;quot;&amp;gt;{{Cite journal |doi=10.1146/annurev-astro-081913-040012 |title=Solar Dynamo Theory |journal=Annual Review of Astronomy and Astrophysics |volume=52 |pages=251–290 |year=2014 |last1=Charbonneau |first1=P. |bibcode=2014ARA&amp;amp;A..52..251C |s2cid=17829477 |doi-access=free}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Zirker2002-119&amp;quot;&amp;gt;{{Cite book |last=Zirker |first=J. B. |date=2002 |title=Journey from the Center of the Sun |pages=[https://archive.org/details/journeyfromcente0000zirk/page/119 119–120] |publisher=[[Princeton University Press]] |isbn=978-0-691-05781-1 |url=https://archive.org/details/journeyfromcente0000zirk/page/119}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Lang&amp;quot;&amp;gt;{{Cite book |last=Lang |first=Kenneth R. |date=2008 |title=The Sun from Space |page=75 |publisher=[[Springer-Verlag]] |isbn=978-3-540-76952-1}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The solar magnetic field extends well beyond the Sun itself. The electrically conducting solar wind plasma carries the Sun's magnetic field into space, forming what is called the [[interplanetary magnetic field]].&amp;lt;ref name=&amp;quot;Russell2001&amp;quot; /&amp;gt; In an approximation known as ideal [[magnetohydrodynamics]], plasma particles only move along magnetic field lines. As a result, the outward-flowing solar wind stretches the interplanetary magnetic field outward, forcing it into a roughly radial structure. For a simple dipolar solar magnetic field, with opposite hemispherical polarities on either side of the solar magnetic equator, a thin [[heliospheric current sheet|current sheet]] is formed in the solar wind. At great distances, the rotation of the Sun twists the dipolar magnetic field and corresponding current sheet into an [[Archimedean spiral]] structure called the ''Parker spiral''.&amp;lt;ref name=&amp;quot;Russell2001&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sunspot ===&lt;br /&gt;
[[File:The Largest Sunspot Group (noao0114).tiff|thumb|A large sunspot group observed in white light|alt=A black-and-white photograph of a group of sunspots.]]&lt;br /&gt;
&lt;br /&gt;
Sunspots are visible as dark patches on the Sun's photosphere and correspond to concentrations of magnetic field where convective transport of heat is inhibited from the solar interior to the surface. As a result, sunspots are slightly cooler than the surrounding photosphere, so they appear dark. At a typical [[solar minimum]], few sunspots are visible, and occasionally none can be seen at all. Those that do appear are at high solar latitudes. As the solar cycle progresses toward its [[Solar maximum|maximum]], sunspots tend to form closer to the solar equator, a phenomenon known as ''[[Spörer's law]]''. The largest sunspots can be tens of thousands of kilometres across.&amp;lt;ref name=&amp;quot;Sunspot2001&amp;quot;&amp;gt;{{cite web |date=30 March 2001 |title=The Largest Sunspot in Ten Years |url=http://www.gsfc.nasa.gov/gsfc/spacesci/solarexp/sunspot.htm |publisher=[[Goddard Space Flight Center]] |access-date=10 July 2009 |url-status=dead |archive-url=https://web.archive.org/web/20070823050403/http://www.gsfc.nasa.gov/gsfc/spacesci/solarexp/sunspot.htm |archive-date=23 August 2007}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An 11-year sunspot cycle is half of a 22-year [[Babcock Model|Babcock]]–Leighton [[solar dynamo|dynamo]] cycle, which corresponds to an oscillatory exchange of energy between [[toroidal and poloidal]] solar magnetic fields. At solar-cycle maximum, the external poloidal dipolar magnetic field is near its dynamo-cycle minimum strength; but an internal toroidal quadrupolar field, generated through differential rotation within the tachocline, is near its maximum strength. At this point in the dynamo cycle, buoyant upwelling within the convective zone forces emergence of the toroidal magnetic field through the photosphere, giving rise to pairs of sunspots, roughly aligned east–west and having footprints with opposite magnetic polarities. The magnetic polarity of sunspot pairs alternates every solar cycle, a phenomenon described by [[Hale's law]].&amp;lt;ref&amp;gt;{{Cite journal |last1=Hale |first1=G. E. |last2=Ellerman |first2=F. |last3=Nicholson |first3=S. B. |last4=Joy |first4=A. H. |title=The Magnetic Polarity of Sun-Spots |journal=The Astrophysical Journal |volume=49 |page=153 |year=1919 |doi=10.1086/142452 |bibcode=1919ApJ....49..153H |doi-access=free}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;solarcycle&amp;quot;&amp;gt;{{cite web |date=4 January 2008 |title=NASA Satellites Capture Start of New Solar Cycle |publisher=[[PhysOrg]] |url=http://www.physorg.com/news119271347.html |access-date=10 July 2009 |archive-date=6 April 2008 |archive-url=https://web.archive.org/web/20080406132839/http://www.physorg.com/news119271347.html |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During the solar cycle's declining phase, energy shifts from the internal toroidal magnetic field to the external poloidal field, and sunspots diminish in number and size. At solar-cycle minimum, the toroidal field is, correspondingly, at minimum strength, sunspots are relatively rare, and the poloidal field is at its maximum strength. With the rise of the next 11-year sunspot cycle, differential rotation shifts magnetic energy back from the poloidal to the toroidal field, but with a polarity that is opposite to the previous cycle. The process carries on continuously, and in an idealised, simplified scenario, each 11-year sunspot cycle corresponds to a change, then, in the overall polarity of the Sun's large-scale magnetic field.&amp;lt;ref&amp;gt;{{Cite news |date=16 February 2001 |title=Sun flips magnetic field |url=http://edition.cnn.com/2001/TECH/space/02/16/sun.flips/ |publisher=CNN|access-date=11 July 2009 |archive-date=21 January 2015 |archive-url=https://web.archive.org/web/20150121063331/http://edition.cnn.com/2001/TECH/space/02/16/sun.flips/ |url-status=live}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web |last=Phillips |first=T. |date=15 February 2001 |title=The Sun Does a Flip |url=https://science.nasa.gov/headlines/y2001/ast15feb_1.htm |publisher=NASA |access-date=11 July 2009 |url-status=dead |archive-url=https://web.archive.org/web/20090512121817/https://science.nasa.gov/headlines/y2001/ast15feb_1.htm |archive-date=12 May 2009}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Solar activity ===&lt;br /&gt;
[[File:Solar-cycle-data.png|thumb|Measurements from 2005 of solar cycle variation during the previous 30 years|left|alt=See caption]]&lt;br /&gt;
&lt;br /&gt;
The Sun's magnetic field leads to many effects that are collectively called [[solar variation|solar activity]]. [[Solar flares]] and [[coronal mass ejections]] tend to occur at sunspot groups. Slowly changing high-speed streams of solar wind are emitted from [[coronal holes]] at the photospheric surface. Both coronal mass ejections and high-speed streams of solar wind carry plasma and the interplanetary magnetic field outward into the Solar System.&amp;lt;ref name=Zirker2002&amp;gt;{{Cite book |last=Zirker |first=J. B. |date=2002 |title=Journey from the Center of the Sun |pages=[https://archive.org/details/journeyfromcente0000zirk/page/120 120–127] |publisher=[[Princeton University Press]] |isbn=978-0-691-05781-1 |url=https://archive.org/details/journeyfromcente0000zirk/page/120}}&amp;lt;/ref&amp;gt; The effects of solar activity on Earth include [[aurora (astronomy)|auroras]] at moderate to high latitudes and the disruption of radio communications and [[electric power]]. Solar activity is thought to have played a large role in the [[formation and evolution of the Solar System]].&amp;lt;ref&amp;gt;{{cite journal |last1=Nandy |first1=Dibyendu |last2=Martens |first2=Petrus C. H. |last3=Obridko |first3=Vladimir |last4=Dash |first4=Soumyaranjan |last5=Georgieva |first5=Katya |title=Solar evolution and extrema: current state of understanding of long-term solar variability and its planetary impacts |journal=Progress in Earth and Planetary Science |date=5 July 2021 |volume=8 |issue=1 |pages=40 |doi=10.1186/s40645-021-00430-x |doi-access=free |bibcode=2021PEPS....8...40N |issn=2197-4284}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes in solar irradiance over the 11-year solar cycle have been correlated with changes in sunspot number.&amp;lt;ref&amp;gt;{{cite journal |last1=Willson |first1=R. C. |last2=Hudson |first2=H. S. |date=1991 |title=The Sun's luminosity over a complete solar cycle |journal=[[Nature (journal)|Nature]] |volume=351 |issue=6321 |pages=42–44 |doi=10.1038/351042a0 |bibcode=1991Natur.351...42W |s2cid=4273483}}&amp;lt;/ref&amp;gt; The solar cycle influences [[space weather]] conditions, including those surrounding Earth. For example, in the 17th century, the solar cycle appeared to have stopped entirely for several decades; few sunspots were observed during a period known as the [[Maunder minimum]]. This coincided in time with the era of the [[Little Ice Age]], when Europe experienced unusually cold temperatures.&amp;lt;ref&amp;gt;{{cite journal |author-link=John A. Eddy |last=Eddy |first=John A. |title=The Maunder Minimum |journal=[[Science (journal)|Science]] |volume=192 |issue=4245 |pages=1189–1202 |date=June 1976 |pmid=17771739 |doi=10.1126/science.192.4245.1189 |jstor=1742583 |bibcode=1976Sci...192.1189E |s2cid=33896851}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Lean&amp;quot;&amp;gt;{{Cite journal |last1=Lean |first1=J. |author-link=Judith Lean |last2=Skumanich |first2=A. |last3=White |first3=O. |date=1992 |title=Estimating the Sun's radiative output during the Maunder Minimum |journal=[[Geophysical Research Letters]] |volume=19 |issue=15 |pages=1591–1594 |doi=10.1029/92GL01578 |bibcode=1992GeoRL..19.1591L |url=https://zenodo.org/record/1231321 |access-date=16 December 2019 |archive-date=11 May 2020 |archive-url=https://web.archive.org/web/20200511052658/https://zenodo.org/record/1231321 |url-status=live}}&amp;lt;/ref&amp;gt; Earlier extended minima have been discovered through analysis of [[tree ring]]s and appear to have coincided with lower-than-average global temperatures.&amp;lt;ref&amp;gt;{{Cite book |last1=Mackay |first1=R. M. |last2=Khalil |first2=M. A. K. |chapter=Greenhouse gases and global warming |chapter-url=https://books.google.com/books?id=tQBS3bAX8fUC&amp;amp;q=solar+minimum+dendochronology&amp;amp;pg=PA1 |editor-last=Singh |editor-first=S. N. |date=2000 |title=Trace Gas Emissions and Plants |pages=1–28 |publisher=[[Springer (publisher)|Springer]] |isbn=978-0-7923-6545-7 |access-date=3 November 2020 |archive-date=17 April 2021 |archive-url=https://web.archive.org/web/20210417054703/https://books.google.com/books?id=tQBS3bAX8fUC&amp;amp;q=solar+minimum+dendochronology&amp;amp;pg=PA1 |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Coronal heating ===&lt;br /&gt;
The temperature of the photosphere is approximately 6,000&amp;amp;nbsp;K, whereas the temperature of the corona reaches {{val|1000000|-|2000000|u=K|fmt=commas}}.&amp;lt;ref name=&amp;quot;Erdelyi2007&amp;quot; /&amp;gt; The high temperature of the corona shows that it is heated by something other than direct [[heat conduction]] from the photosphere.&amp;lt;ref name=&amp;quot;Russell2001&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is thought that the energy necessary to heat the corona is provided by turbulent motion in the convection zone below the photosphere, and two main mechanisms have been proposed to explain coronal heating.&amp;lt;ref name=&amp;quot;Erdelyi2007&amp;quot; /&amp;gt; The first is wave heating, in which sound, gravitational or magnetohydrodynamic waves are produced by turbulence in the convection zone.&amp;lt;ref name=&amp;quot;Erdelyi2007&amp;quot; /&amp;gt; These waves travel upward and dissipate in the corona, depositing their energy in the ambient matter in the form of heat.&amp;lt;ref name=&amp;quot;Alfven&amp;quot;&amp;gt;{{Cite journal |last=Alfvén |first=H. |date=1947 |title=Magneto-hydrodynamic waves, and the heating of the solar corona |journal=[[Monthly Notices of the Royal Astronomical Society]] |volume=107 |issue=2 |pages=211–219 |bibcode=1947MNRAS.107..211A |doi=10.1093/mnras/107.2.211 |doi-access=free}}&amp;lt;/ref&amp;gt; The other is magnetic heating, in which magnetic energy is continuously built up by photospheric motion and released through [[magnetic reconnection]] in the form of large solar flares and myriad similar but smaller events—[[nanoflares]].&amp;lt;ref name=&amp;quot;Parker2&amp;quot;&amp;gt;{{Cite journal |last=Parker |first=E. N. |date=1988 |title=Nanoflares and the solar X-ray corona |journal=[[The Astrophysical Journal]] |volume=330 |issue=1 |page=474 |bibcode=1988ApJ...330..474P |doi=10.1086/166485}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently, it is unclear whether waves are an efficient heating mechanism. All waves except Alfvén waves have been found to dissipate or refract before reaching the corona.&amp;lt;ref name=&amp;quot;Sturrock&amp;quot;&amp;gt;{{Cite journal |last1=Sturrock |first1=P. A. |last2=Uchida |first2=Y. |year=1981 |title=Coronal heating by stochastic magnetic pumping |journal=[[The Astrophysical Journal]] |volume=246 |issue=1 |page=331 |bibcode=1981ApJ...246..331S |doi=10.1086/158926 |hdl-access=free |hdl=2060/19800019786}}&amp;lt;/ref&amp;gt; In addition, Alfvén waves do not easily dissipate in the corona. The current research focus has therefore shifted toward flare heating mechanisms.&amp;lt;ref name=&amp;quot;Erdelyi2007&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Life phases ==&lt;br /&gt;
&lt;br /&gt;
[[File:The life cycle of a Sun-like star (annotated).jpg|thumb|upright=1.8|Overview of the evolution of a star like the Sun, from collapsing [[protostar]] at left to [[red giant]] stage at right|alt=See caption]]&lt;br /&gt;
The Sun today is roughly halfway through the main-sequence portion of its life. It has not changed dramatically in over four billion&amp;lt;ref group=lower-alpha name=short /&amp;gt; years and will remain fairly stable for about five billion more. However, after hydrogen fusion in its core has stopped, the Sun will undergo dramatic changes, both internally and externally.&lt;br /&gt;
&lt;br /&gt;
=== Formation ===&lt;br /&gt;
&lt;br /&gt;
The Sun formed about 4.6&amp;amp;nbsp;billion years ago from the collapse of part of a giant [[molecular cloud]] that consisted mostly of hydrogen and helium and that probably gave birth to many other stars.&amp;lt;!-- We would say 4.57, but there may be uncertainty; for example, https://arxiv.org/pdf/1507.05847.pdf seems to suggest 4.587 rather than 4.567 --&amp;gt;&amp;lt;ref name=Zirker2002-7&amp;gt;{{Cite book |last=Zirker |first=Jack B. |title=Journey from the Center of the Sun |date=2002 |publisher=[[Princeton University Press]] |isbn=978-0-691-05781-1 |pages=7–8}}&amp;lt;/ref&amp;gt; This age is estimated using [[computer simulation|computer models]] of [[stellar evolution]] and through [[nucleocosmochronology]].&amp;lt;ref name=&amp;quot;Bonanno&amp;quot; /&amp;gt; The result is consistent with the [[radiometric dating|radiometric date]] of the oldest Solar System material, at 4.567&amp;amp;nbsp;billion years ago.&amp;lt;ref&amp;gt;{{Cite journal |last1=Amelin |first1=Y. |last2=Krot |first2=A. |last3=Hutcheon |first3=I. |last4=Ulyanov |first4=A. |title=Lead isotopic ages of chondrules and calcium-aluminum-rich inclusions |journal=[[Science (journal)|Science]] |volume=297 |issue=5587 |pages=1678–1683 |date=2002 |doi=10.1126/science.1073950 |pmid=12215641 |bibcode=2002Sci...297.1678A |s2cid=24923770}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;nature436&amp;quot;&amp;gt;{{Cite journal |last1=Baker |first1=J. |last2=Bizzarro |first2=M. |last3=Wittig |first3=N. |last4=Connelly |first4=J. |last5=Haack |first5=H. |title=Early planetesimal melting from an age of 4.5662 Gyr for differentiated meteorites |journal=[[Nature (journal)|Nature]] |volume=436 |issue=7054 |pages=1127–1131 |date=2005 |pmid=16121173 |doi=10.1038/nature03882 |bibcode=2005Natur.436.1127B |s2cid=4304613}}&amp;lt;/ref&amp;gt; Studies of ancient [[meteorite]]s reveal traces of stable daughter nuclei of short-lived isotopes, such as [[iron-60]], that form only in exploding, short-lived stars. This indicates that one or more [[supernova]]e must have occurred near the location where the Sun formed. A [[shock wave]] from a nearby supernova would have triggered the formation of the Sun by compressing the matter within the molecular cloud and causing certain regions to collapse under their own gravity.&amp;lt;ref&amp;gt;{{Cite journal |last1=Williams |first1=J. |title=The astrophysical environment of the solar birthplace |journal=Contemporary Physics |volume=51 |issue=5 |pages=381–396 |year=2010 |doi=10.1080/00107511003764725 |bibcode=2010ConPh..51..381W |arxiv=1008.2973 |citeseerx=10.1.1.740.2876 |s2cid=118354201}}&amp;lt;/ref&amp;gt; As one fragment of the cloud collapsed it also began to rotate due to [[conservation of angular momentum]] and heat up with the increasing pressure.&amp;lt;ref&amp;gt;{{Cite web |last=Glozman |first=Igor |date=2022 |title=Formation of the Solar System |url=https://people.highline.edu/iglozman/classes/astronotes/solsys_form.htm |access-date=16 January 2022 |website=[[Highline College]] |publication-place=Des Moines, WA |archive-date=26 March 2023 |archive-url=https://web.archive.org/web/20230326035535/https://people.highline.edu/iglozman/classes/astronotes/solsys_form.htm |url-status=live}}&amp;lt;/ref&amp;gt; Much of the mass became concentrated in the centre, whereas the rest flattened out into a disk that would become the planets and other Solar System bodies.&amp;lt;ref&amp;gt;{{cite journal |last1=D'Angelo |first1=G. |last2=Lubow |first2=S. H. |title=Three-dimensional Disk-Planet Torques in a Locally Isothermal Disk |journal=The Astrophysical Journal |date=2010 |volume=724 |issue=1 |pages=730–747 |doi=10.1088/0004-637X/724/1/730 |arxiv=1009.4148 |bibcode=2010ApJ...724..730D |s2cid=119204765}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite book |last1=Lubow |first1=S. H. |last2=Ida |first2=S. |chapter=Planet Migration |bibcode=2010exop.book..347L |title=Exoplanets |publisher=University of Arizona Press |location=Tucson |editor-first=S. |editor-last=Seager |pages=347–371 |year=2011 |arxiv=1004.4137}}&amp;lt;/ref&amp;gt; Gravity and pressure within the core of the cloud generated a lot of heat as it accumulated more matter from the surrounding disk, eventually triggering [[stellar nucleosynthesis|nuclear fusion]].&amp;lt;ref&amp;gt;{{Cite web |last=Jones |first=Andrew Zimmerman |date=30 May 2019 |title=How Stars Make All of the Elements |url=https://www.thoughtco.com/stellar-nucleosynthesis-2699311 |access-date=16 January 2023 |website=[[ThoughtCo]] |archive-date=11 July 2023 |archive-url=https://web.archive.org/web/20230711191648/https://www.thoughtco.com/stellar-nucleosynthesis-2699311 |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The stars [[HD 162826]] and [[HD 186302]] share similarities with the Sun and are hypothesised to be its stellar siblings, formed in the same molecular cloud.&amp;lt;ref&amp;gt;{{cite web |url=http://www.natureworldnews.com/articles/6974/20140509/astronomers-find-suns-sibling-called-hd-162826.htm |title=Astronomers Find Sun's Sibling 'HD 162826' |date=9 May 2014 |publisher=Nature World News |access-date=16 January 2022 |archive-date=3 March 2016 |archive-url=https://web.archive.org/web/20160303235530/http://www.natureworldnews.com/articles/6974/20140509/astronomers-find-suns-sibling-called-hd-162826.htm |url-status=live}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web |url=https://www.universetoday.com/140598/astronomers-find-one-of-the-suns-sibling-stars-born-from-the-same-solar-nebula-billion-of-years-ago/ |title=Astronomers Find One of the Sun's Sibling Stars. Born From the Same Solar Nebula Billions of Years Ago |first=Matt |last=Williams |date=21 November 2018 |website=[[Universe Today]] |access-date=7 October 2022 |archive-date=26 March 2023 |archive-url=https://web.archive.org/web/20230326035623/https://www.universetoday.com/140598/astronomers-find-one-of-the-suns-sibling-stars-born-from-the-same-solar-nebula-billion-of-years-ago/ |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Main sequence ===&lt;br /&gt;
&lt;br /&gt;
[[File:Evolution of the Sun 2 EN.svg|class=skin-invert-image|thumb|Evolution of a Sun-like star. The track of a one solar mass star on the [[Hertzsprung–Russell diagram]] is shown from the main sequence to the white dwarf stage.|400x400px|alt=See caption]]&lt;br /&gt;
The Sun is about halfway through its main-sequence stage, during which nuclear fusion reactions in its core fuse hydrogen into helium. Each second, more than four billion kilograms of matter are converted into energy within the Sun's core, producing neutrinos and [[solar radiation]]. At this rate, the Sun has so far converted around 100 times the mass of Earth into energy, about 0.03% of the total mass of the Sun. The Sun will spend a total of approximately 10 to 11&amp;amp;nbsp;billion years as a main-sequence star before the [[red giant]] phase of the Sun.&amp;lt;ref&amp;gt;{{Cite book |last1=Goldsmith |first1=D. |last2=Owen |first2=T. |title=The search for life in the universe |url=https://books.google.com/books?id=Q17NmHY6wloC&amp;amp;pg=PA96 |page=96 |publisher=University Science Books |year=2001 |isbn=978-1-891389-16-0 |access-date=22 August 2020 |archive-date=30 October 2020 |archive-url=https://web.archive.org/web/20201030203521/https://books.google.com/books?id=Q17NmHY6wloC&amp;amp;pg=PA96 |url-status=live}}&amp;lt;/ref&amp;gt; At the 8 billion year mark, the Sun will be at its hottest point according to the ESA's ''[[Gaia (spacecraft)|Gaia]]'' space observatory mission in 2022.&amp;lt;ref&amp;gt;{{Cite web |date=12 August 2022 |title=ESA's Gaia Mission Sheds New Light on Past and Future of Our Sun |url=https://www.sci.news/astronomy/sun-future-11093.html |access-date=15 August 2022 |website=Sci.News: Breaking Science News |archive-date=4 April 2023 |archive-url=https://web.archive.org/web/20230404001136/https://www.sci.news/astronomy/sun-future-11093.html |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Sun is gradually becoming hotter in its core, hotter at the surface, larger in radius, and more luminous during its time on the main sequence: since the beginning of its main sequence life, it has expanded in radius by 15% and the surface has increased in temperature from {{Convert|5,620|K|F}} to {{Convert|5,772|K|F}}, resulting in a 48% increase in luminosity from 0.677 [[solar luminosity|solar luminosities]] to its present-day 1.0 solar luminosity. This occurs because the helium atoms in the core have a higher mean [[molecular weight]] than the [[hydrogen atom]]s that were fused, resulting in less thermal pressure. The core is therefore shrinking, allowing the outer layers of the Sun to move closer to the centre, releasing [[gravitational potential energy]]. According to the [[virial theorem]], half of this released gravitational energy goes into heating, which leads to a gradual increase in the rate at which fusion occurs and thus an increase in the luminosity. This process speeds up as the core gradually becomes denser.&amp;lt;ref name=&amp;quot;carroll_ostlie&amp;quot;&amp;gt;{{cite book |last1=Carroll |first1=Bradley W. |title=An introduction to modern astrophysics |last2=Ostlie |first2=Dal A |date=2017 |publisher=Cambridge University Press |isbn=978-1-108-42216-1 |edition=Second |location=Cambridge, United Kingdom |pages=350, 447, 448, 457}}&amp;lt;/ref&amp;gt; At present, it is increasing in brightness by about 1% every 100&amp;amp;nbsp;million years. It will take at least 1&amp;amp;nbsp;billion years from now to deplete liquid water from the Earth from such increase.&amp;lt;ref&amp;gt;{{cite web |first=Puneet |last=Kollipara |url=https://www.science.org/content/article/earth-wont-die-soon-thought |title=Earth Won't Die as Soon as Thought |work=Science |date=22 January 2014 |access-date=24 May 2015 |archive-date=12 November 2020 |archive-url=https://web.archive.org/web/20201112023013/https://www.sciencemag.org/news/2014/01/earth-wont-die-soon-thought |url-status=live}}&amp;lt;/ref&amp;gt; After that, the Earth will cease to be able to support complex, multicellular life and the last remaining multicellular organisms on the planet will suffer a final, complete [[mass extinction]].&amp;lt;ref name=&amp;quot;Snyder-BeattieAndBonsall2022&amp;quot;&amp;gt;{{cite journal |last1=Snyder-Beattie |first1=Andrew E. |last2=Bonsall |first2=Michael B. |date=30 March 2022 |title=Catastrophe risk can accelerate unlikely evolutionary transitions |journal=Proceedings of the Royal Society B |volume=289 |issue=1971 |doi=10.1098/rspb.2021.2711 |pmid=35350860 |pmc=8965398}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== After core hydrogen exhaustion ===&lt;br /&gt;
&amp;lt;!-- [[End of the Sun]] redirects to this section, please fix that if renaming this section. Thanks! --&amp;gt;&lt;br /&gt;
[[File:Sun red giant.svg|thumb|left|The size of the current Sun (now in the [[main sequence]]) compared to its estimated size during its red-giant phase in the future|alt=See caption]]&lt;br /&gt;
The Sun does not have enough mass to explode as a [[supernova]]. Instead, when it runs out of hydrogen in the core in approximately 5&amp;amp;nbsp;billion years, core hydrogen fusion will stop, and there will be nothing to prevent the core from contracting. The release of gravitational potential energy will cause the luminosity of the Sun to increase, ending the main sequence phase and leading the Sun to expand over the next billion years: first into a [[subgiant]], and then into a [[red giant]].&amp;lt;ref name=&amp;quot;carroll_ostlie&amp;quot; /&amp;gt;&amp;lt;ref&amp;gt;{{cite web |first=Nola Taylor |last=Redd |title=Red Giant Stars: Facts, Definition &amp;amp; the Future of the Sun |url=http://www.space.com/22471-red-giant-stars.html |website=space.com |access-date=20 February 2016 |archive-date=9 February 2016 |archive-url=https://web.archive.org/web/20160209042249/http://www.space.com/22471-red-giant-stars.html |url-status=live}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=schroder&amp;gt;{{Cite journal |last1=Schröder |first1=K.-P. |last2=Connon Smith |first2=R. |doi=10.1111/j.1365-2966.2008.13022.x |title=Distant future of the Sun and Earth revisited |journal=Monthly Notices of the Royal Astronomical Society |volume=386 |issue=1 |pages=155–163 |year=2008 |doi-access=free |arxiv=0801.4031 |bibcode=2008MNRAS.386..155S |s2cid=10073988}}&amp;lt;/ref&amp;gt; The heating due to gravitational contraction will also lead to expansion of the Sun and hydrogen fusion in a shell just outside the core, where unfused hydrogen remains, contributing to the increased luminosity, which will eventually reach more than 1,000 times its present luminosity.&amp;lt;ref name=&amp;quot;carroll_ostlie&amp;quot; /&amp;gt; When the Sun enters its [[red-giant branch]] (RGB) phase, it will engulf (and very likely destroy) [[Mercury (planet)|Mercury]] and [[Venus]]. According to a 2008 article, Earth's orbit will have initially expanded to at most {{Convert|1.5|AU|e6km e6mi|abbr=unit|sigfig=2}} due to the Sun's loss of mass. However, Earth's orbit will then start shrinking due to [[tidal forces]] (and, eventually, drag from the lower chromosphere) so that it is engulfed by the Sun during the [[tip of the red-giant branch]] phase 7.59&amp;amp;nbsp;billion years from now, 3.8 and 1&amp;amp;nbsp;million years after Mercury and Venus have respectively suffered the same fate.&amp;lt;ref name=&amp;quot;schroder&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By the time the Sun reaches the tip of the red-giant branch, it will be about 256 times larger than it is today, with a radius of {{Convert|1.19|AU|e6km e6mi|abbr=unit}}.&amp;lt;ref name=&amp;quot;schroder&amp;quot; /&amp;gt;&amp;lt;ref name=&amp;quot;sackmann&amp;quot;&amp;gt;{{Cite journal |last1=Boothroyd |first1=Arnold I. |last2=Sackmann |first2=I.-Juliana |date=1 January 1999 |orig-date=19 December 1995 |title=The CNO Isotopes: Deep Circulation in Red Giants and First and Second Dredge-up |url=https://iopscience.iop.org/article/10.1086/306546 |journal=The Astrophysical Journal |publisher=The American Astronomical Society (AAS), The Institute of Physics (IOP) |volume=510 |issue=1 |pages=232–250 |arxiv=astro-ph/9512121 |bibcode=1999ApJ...510..232B |doi=10.1086/306546 |s2cid=561413}}&amp;lt;/ref&amp;gt; The Sun will spend around a billion years in the RGB and lose around a third of its mass.&amp;lt;ref name=&amp;quot;schroder&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the red-giant branch, the Sun has approximately 120&amp;amp;nbsp;million years of active life left, but much happens. First, the core (full of [[degenerate matter|degenerate]] helium) ignites violently in the [[helium flash]]; it is estimated that 6% of the core—itself 40% of the Sun's mass—will be converted into carbon within a matter of minutes through the [[triple-alpha process]].&amp;lt;ref&amp;gt;{{Cite web |first=David |last=Taylor |publisher=Northwestern University |url=http://faculty.wcas.northwestern.edu/~infocom/The%20Website/end.html |title=The End of the Sun |access-date=24 May 2015 |archive-date=22 May 2019 |archive-url=https://web.archive.org/web/20190522175414/http://faculty.wcas.northwestern.edu/~infocom/The%20Website/end.html |url-status=live}}&amp;lt;/ref&amp;gt; The Sun then shrinks to around 10 times its current size and 50 times the luminosity, with a temperature a little lower than today. It will then have reached the [[red clump]] or [[horizontal branch]], but a star of the Sun's metallicity does not evolve blueward along the horizontal branch. Instead, it just becomes moderately larger and more luminous over about 100&amp;amp;nbsp;million years as it continues to react helium in the core.&amp;lt;ref name=schroder /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the helium is exhausted, the Sun will repeat the expansion it followed when the hydrogen in the core was exhausted. This time, however, it all happens faster, and the Sun becomes larger and more luminous. This is the [[asymptotic giant branch|asymptotic-giant-branch]] phase, and the Sun is alternately reacting hydrogen in a shell or helium in a deeper shell. After about 20&amp;amp;nbsp;million years on the early asymptotic giant branch, the Sun becomes increasingly unstable, with rapid mass loss and [[thermal pulse]]s that increase the size and luminosity for a few hundred years every 100,000&amp;amp;nbsp;years or so. The thermal pulses become larger each time, with the later pulses pushing the luminosity to as much as 5,000 times the current level. Despite this, the Sun's maximum AGB radius will not be as large as its tip-RGB maximum: 179 {{Solar radius|link=yes}}, or about {{Convert|0.832|AU|e6km e6mi|abbr=unit}}.&amp;lt;ref name=&amp;quot;schroder&amp;quot; /&amp;gt;&amp;lt;ref name=agb&amp;gt;{{Cite journal |last1=Vassiliadis |first1=E. |last2=Wood |first2=P. R. |doi=10.1086/173033 |title=Evolution of low- and intermediate-mass stars to the end of the asymptotic giant branch with mass loss |journal=The Astrophysical Journal |volume=413 |page=641 |year=1993 |bibcode=1993ApJ...413..641V |doi-access=free}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Models vary depending on the rate and timing of mass loss. Models that have higher mass loss on the red-giant branch produce smaller, less luminous stars at the tip of the asymptotic giant branch, perhaps only 2,000 times the luminosity and less than 200 times the radius.&amp;lt;ref name=&amp;quot;schroder&amp;quot; /&amp;gt; For the Sun, four thermal pulses are predicted before it completely loses its outer envelope and starts to make a [[planetary nebula]].&amp;lt;ref name=SunIII&amp;gt;{{cite journal |last1=Sackmann |first1=I.-J. |last2=Boothroyd |first2=A. I. |last3=Kraemer |first3=K. E. |date=1993 |title=Our Sun. III. Present and Future |journal=The Astrophysical Journal |volume=418 |pages=457–468 |doi=10.1086/173407 |bibcode=1993ApJ...418..457S}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The post-asymptotic-giant-branch evolution is even faster. The luminosity stays approximately constant as the temperature increases, with the ejected half of the Sun's mass becoming ionised into a [[planetary nebula]] as the exposed core reaches {{Convert|30,000|K|F|sigfig=}}, as if it is in a sort of [[blue loop]]. The final naked core, a [[white dwarf]], will have a temperature of over {{Convert|100,000|K|F|sigfig=}} and contain an estimated 54.05% of the Sun's present-day mass.&amp;lt;ref name=schroder /&amp;gt; Simulations indicate that the Sun may be among the least massive stars capable of forming a planetary nebula.&amp;lt;ref&amp;gt;{{cite journal |last1=Gesicki |first1=K. |last2=Zijlstra |first2=A. A. |last3=Miller Bertolami |first3=M. M. |year=2018 |title=The mysterious age invariance of the planetary nebula luminosity function bright cut-off |journal=Nature Astronomy |volume=2 |number=7 |pages=580–584 |doi=10.1038/s41550-018-0453-9 |arxiv=1805.02643 |bibcode=2018NatAs...2..580G}}&amp;lt;/ref&amp;gt; The planetary nebula will disperse in about 10,000&amp;amp;nbsp;years, but the white dwarf will survive for trillions of years before fading to a hypothetical super-dense [[black dwarf]].&amp;lt;ref name=bloecker1&amp;gt;{{Cite journal |bibcode=1995A&amp;amp;A...297..727B |title=Stellar evolution of low and intermediate-mass stars. I. Mass loss on the AGB and its consequences for stellar evolution |last=Bloecker |first=T. |journal=Astronomy and Astrophysics |year=1995 |volume=297 |page=727}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=bloecker2&amp;gt;{{Cite journal |bibcode=1995A&amp;amp;A...299..755B |title=Stellar evolution of low- and intermediate-mass stars. II. Post-AGB evolution |last=Bloecker |first=T. |journal=Astronomy and Astrophysics |year=1995 |volume=299 |page=755}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite journal |first=Jørgen |last=Christensen-Dalsgaard |title=Solar structure and evolution |journal=Living Reviews in Solar Physics |year=2021 |volume=18 |number=2 |page=2 |doi=10.1007/s41116-020-00028-3 |arxiv=2007.06488 |bibcode=2021LRSP...18....2C}}&amp;lt;/ref&amp;gt; As such, it would give off no more energy.&amp;lt;ref name=&amp;quot;Johnson-Groh 2020 j255&amp;quot;&amp;gt;{{cite web |last=Johnson-Groh |first=Mara |title=The end of the universe may be marked by 'black dwarf supernova' explosions |website=Live Science |date=25 August 2020 |url=https://www.livescience.com/black-dwarf-supernovae-end-universe.html |access-date=24 November 2023 |archive-date=2 June 2023 |archive-url=https://web.archive.org/web/20230602022731/https://www.livescience.com/black-dwarf-supernovae-end-universe.html |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Location ==&lt;br /&gt;
=== Solar System ===&lt;br /&gt;
&lt;br /&gt;
[[File:Oort_cloud_Sedna_orbit.svg|thumb|Location of the Sun within the [[Solar System]], which extends to the edge of the [[Oort cloud]], where at {{val|125,000|fmt=commas|u=AU}} to {{val|230,000|fmt=commas|u=AU}}, equal to several light-years, the Sun's [[Sphere of influence (astrodynamics)|gravitational sphere of influence]] ends.]]&lt;br /&gt;
The Sun has eight known planets orbiting it. This includes four [[terrestrial planets]] ([[Mercury (planet)|Mercury]], [[Venus]], [[Earth]], and [[Mars]]), two [[gas giants]] ([[Jupiter]] and [[Saturn]]), and two [[ice giants]] ([[Uranus]] and [[Neptune]]). The Solar System also has nine bodies generally considered as [[dwarf planet]]s and some more [[list of possible dwarf planets|candidates]], an [[asteroid belt]], numerous [[comets]], and a large number of icy bodies which lie beyond the orbit of Neptune. Six of the planets and many smaller bodies also have their own [[natural satellite]]s: in particular, the satellite systems of Jupiter, Saturn, and Uranus are in some ways like miniature versions of the Sun's system.&amp;lt;ref&amp;gt;{{cite book |title=Physics and Chemistry of the Solar System |date=2004 |publisher=Elsevier |editor-first=John |editor-last=Lewis |edition=2 |page=265 |isbn=9780080470122 |url=https://books.google.com/books?id=xl50rOf5V08C&amp;amp;pg=PA265}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Solar_system_barycenter.svg|thumb|Apparent motion of the Solar System [[barycentre]] with respect to the Sun]]&lt;br /&gt;
The Sun is moved by the gravitational pull of the planets. The centre of the Sun moves around the Solar System [[barycentre]], within a range from 0.1 to 2.2 solar radii. The Sun's motion around the barycentre approximately repeats every 179&amp;amp;nbsp;years, rotated by about 30° due primarily to the [[synodic period]] of Jupiter and Saturn.&amp;lt;ref&amp;gt;{{cite journal |first=Paul D. |last=Jose |title=Sun's Motion and Sunspots |journal=[[The Astronomical Journal]] |date=Apr 1965 |volume=70 |issue=3 |pages=193–200 |doi=10.1086/109714 |bibcode=1965AJ.....70..193J |url=http://www.landscheidt.info/pdf/jose1965.pdf |access-date=22 March 2020 |archive-date=22 March 2020 |archive-url=https://web.archive.org/web/20200322184010/http://www.landscheidt.info/pdf/jose1965.pdf |url-status=live}}&amp;lt;/ref&amp;gt; This motion is mainly due to Jupiter, Saturn, Uranus, and Neptune. For some periods of several decades (when Neptune and Uranus are in [[Opposition (astronomy)|opposition]]) the motion is rather regular, forming a [[trefoil]] pattern, whereas between these periods it appears more chaotic.&amp;lt;ref&amp;gt;See Figure 2 in {{cite journal |url=https://angeo.copernicus.org/articles/18/399/2000/ |doi=10.1007/s00585-000-0399-x |title=Can origin of the 2400-year cycle of solar activity be caused by solar inertial motion? |date=2000 |last1=Charvátová |first1=I. |journal=Annales Geophysicae |volume=18 |issue=4 |pages=399–405 |bibcode=2000AnGeo..18..399C }}&amp;lt;/ref&amp;gt; After 179 years (nine times the [[synodic period]] of Jupiter and Saturn), the pattern more or less repeats, but rotated by about 24°.&amp;lt;ref&amp;gt;{{cite journal |last1=Paul Jose |title=Sun's Motion and Sunspots |journal=[[The Astronomical Journal]] |date=Apr 1965 |volume=70 |pages=193–200 |doi=10.1086/109714 |bibcode=1965AJ.....70..193J |url=http://www.landscheidt.info/pdf/jose1965.pdf |access-date=22 March 2020 |archive-date=22 March 2020 |archive-url=https://web.archive.org/web/20200322184010/http://www.landscheidt.info/pdf/jose1965.pdf |url-status=live }} The value of 24° comes from (360)(15&amp;amp;nbsp;J&amp;amp;nbsp;−&amp;amp;nbsp;6&amp;amp;nbsp;S)/(S&amp;amp;nbsp;−&amp;amp;nbsp;J), where S and J are the periods of Saturn and Jupiter respectively.&amp;lt;/ref&amp;gt; The orbits of the inner planets, including of the Earth, are similarly displaced by the same gravitational forces, so the movement of the Sun has little effect on the relative positions of the Earth and the Sun or on solar irradiance on the Earth as a function of time.&amp;lt;ref&amp;gt;{{cite journal |title=Retraction Note: Oscillations of the baseline of solar magnetic field and solar irradiance on a millennial timescale |journal=Scientific Reports |date=Mar 4, 2020 |doi=10.1038/s41598-020-61020-3 |volume=10 | last1 = Zharkova | first1 = V. V. | last2 = Shepherd | first2 = S. J. | last3 = Zharkov | first3 = S. I. | last4 = Popova | first4 = E.|issue=1 |page=4336 |pmid=32132618 |pmc=7055216 |bibcode=2020NatSR..10.4336Z | doi-access = free }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Sun's gravitational field is estimated to [[Sphere of influence (astrodynamics)|dominate the gravitational forces of surrounding stars]] out to about two light-years ({{val|125,000|fmt=commas|u=AU}}). Lower estimates for the radius of the [[Oort cloud]], by contrast, do not place it farther than {{val|50,000|fmt=commas|u=AU}}.&amp;lt;ref name=&amp;quot;Encrenaz_et_al_2004&amp;quot;&amp;gt;{{Cite book |last1=Encrenaz |first1=T. |author-link=Thérèse Encrenaz |title=The Solar System |last2=Bibring |first2=J. P. |last3=Blanc |first3=M. |last4=Barucci |first4=M. A. |last5=Roques |first5=F. |last6=Zarka |first6=P. H. |date=2004 |publisher=Springer |edition=3rd |page=1}}&amp;lt;/ref&amp;gt; Most of the mass is orbiting in the region between 3,000 and {{val|100,000|fmt=commas|u=AU}}.&amp;lt;ref&amp;gt;{{Cite journal |last1=Torres |first1=S. |last2=Cai |first2=M. X. |last3=Brown |first3=A. G. A. |last4=Portegies Zwart |first4=S. |date=September 2019 |title=Galactic tide and local stellar perturbations on the Oort cloud: creation of interstellar comets |journal=Astronomy &amp;amp; Astrophysics |volume=629 |page=13 |arxiv=1906.10617 |bibcode=2019A&amp;amp;A...629A.139T |doi=10.1051/0004-6361/201935330 |s2cid=195584070 |id=A139}}&amp;lt;/ref&amp;gt; The furthest known objects, such as [[Comet West]], have aphelia around {{val|70,000|fmt=commas|u=AU}} from the Sun.&amp;lt;ref&amp;gt;{{Cite web |last=Norman |first=Neil |date=May 2020 |title=10 great comets of recent times |url=https://www.skyatnightmagazine.com/space-science/greatest-comets-of-recent-times |url-status=live |archive-url=https://web.archive.org/web/20220125042109/https://www.skyatnightmagazine.com/space-science/greatest-comets-of-recent-times |archive-date=25 January 2022 |access-date=10 April 2022 |website=[[BBC Sky at Night|BBC Sky at Night Magazine]]}}&amp;lt;/ref&amp;gt; The Sun's [[Hill sphere]] with respect to the galactic nucleus, the effective range of its gravitational influence, was calculated by [[Gleb Alexandrovich Chebotarev|G. A. Chebotarev]] to be 230,000&amp;amp;nbsp;AU.&amp;lt;ref name=&amp;quot;Chebotarev&amp;quot;&amp;gt;{{cite journal |last1=Chebotarev |first1=G. A. |title=Gravitational Spheres of the Major Planets, Moon and Sun |journal=Astronomicheskii Zhurnal |date=1 January 1963 |volume=40 |pages=812 |bibcode=1964SvA.....7..618C |url=https://adsabs.harvard.edu/full/1964SvA.....7..618C |issn=0004-6299 |access-date=6 May 2024 |archive-date=7 May 2024 |archive-url=https://web.archive.org/web/20240507030847/https://adsabs.harvard.edu/full/1964SvA.....7..618C |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Motion ==&lt;br /&gt;
[[File:Motion of Sun, Earth and Moon around the Milky Way.jpg|thumb|The general motion and orientation of the Sun, with Earth and the moon as its Solar System satellites]]&lt;br /&gt;
&lt;br /&gt;
The Sun, taking along the whole Solar System, orbits [[Galactic Center|the galaxy's centre of mass]] at an average speed of 230&amp;amp;nbsp;km/s (828,000&amp;amp;nbsp;km/h),&amp;lt;ref name=&amp;quot;StarChild&amp;quot;&amp;gt;{{cite web |url=http://starchild.gsfc.nasa.gov/docs/StarChild/questions/question18.html |website=NASA |title=StarChild Question of the Month – Does the Sun move around the Milky Way? |date=February 2000 |url-status=live |archive-url=https://web.archive.org/web/20231030090914/https://starchild.gsfc.nasa.gov/docs/StarChild/questions/question18.html |archive-date=30 October 2023}}&amp;lt;/ref&amp;gt; taking about 220–250&amp;amp;nbsp;million [[Earth year]]s to complete a revolution (a [[galactic year]]), having done so about 20 times since the Sun's formation.&amp;lt;ref name=&amp;quot;Currin 2020 t043&amp;quot;&amp;gt;{{cite web |last=Currin |first=Grant |title=How long is a galactic year? |website=Live Science |date=30 August 2020 |url=https://www.livescience.com/how-long-galactic-year.html |access-date=25 November 2023 |archive-date=25 November 2023 |archive-url=https://web.archive.org/web/20231125013457/https://www.livescience.com/how-long-galactic-year.html |url-status=live}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;fn10&amp;quot;&amp;gt;{{cite book |last=Leong |first=S. |title=Period of the Sun's Orbit around the Galaxy (Cosmic Year) |url=http://hypertextbook.com/facts/2002/StacyLeong.shtml |publisher=The Physics Factbook |date=2002 |access-date=10 May 2007 |archive-date=22 August 2011 |archive-url=https://www.webcitation.org/617GgQWCh?url=http://hypertextbook.com/facts/2002/StacyLeong.shtml |url-status=live}}&amp;lt;/ref&amp;gt; The direction of the Sun's motion, the [[Solar apex]], is roughly in the direction of the star [[Vega]].&amp;lt;ref&amp;gt;{{cite book |title=Three Hundred and Sixty Five Starry Nights: An Introduction to Astronomy for Every Night of the Year |first=Chet |last=Raymo |year=1990 |publisher=Touchstone |isbn=9780671766061 |url=https://books.google.com/books?id=rTe5HaRsAS4C&amp;amp;pg=PA114}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Milky Way Arms ssc2008-10.svg|thumb|The Sun's idealised orbit around the galactic centre in an artist's top-down depiction of the current layout of the Milky Way]]&lt;br /&gt;
&lt;br /&gt;
A simple model of the motion of a star in the galaxy gives the [[galactic coordinates]] {{mvar|X}}, {{mvar|Y}}, and {{mvar|Z}} (rotating coordinates so that the centre of the galaxy is always in the {{mvar|X}} direction) as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;X(t)=X(0)+\frac{U(0)}\kappa\sin(\kappa t)+\frac{V(0)}{2B}(1-\cos(\kappa t))&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;Y(t)=Y(0)+2A\left(X(0)+\frac{V(0)}{2B}\right)t-\frac{\Omega_0}{B\kappa}V(0)\sin(\kappa t)+\frac{2\Omega_0}{\kappa^2}U(0)(1-\cos(\kappa t))&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;Z(t)=\frac{W(0)}\nu\sin(\nu t)+Z(0)\cos(\nu t)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where {{mvar|U}}, {{mvar|V}}, and {{mvar|W}} are the respective velocities with respect to the [[local standard of rest]], {{mvar|A}} and {{mvar|B}} are the [[Oort constants]], &amp;lt;math&amp;gt;\Omega_0=A-B&amp;lt;/math&amp;gt; is the angular velocity of galactic rotation for the local standard of rest, &amp;lt;math&amp;gt;\kappa=\sqrt{-4\Omega_0B}&amp;lt;/math&amp;gt; is the &amp;quot;epicyclic frequency&amp;quot;, and ν is the vertical oscillation frequency.&amp;lt;ref&amp;gt;{{cite journal |last1=B. Fuchs |display-authors=etal |title=The search for the origin of the Local Bubble redivivus |journal=[[MNRAS]] |volume=373 |issue=3 |pages=993–1003 |year=2006 |doi=10.1111/j.1365-2966.2006.11044.x |doi-access=free |arxiv=astro-ph/0609227 |bibcode=2006MNRAS.373..993F|s2cid=15460224 }}&amp;lt;/ref&amp;gt; For the sun, the present values of {{mvar|U}}, {{mvar|V}}, and {{mvar|W}} are estimated as &amp;lt;math&amp;gt;(U(0),V(0),W(0))=(10.00, 5.25, 7.17)&amp;lt;/math&amp;gt; km/s, and estimates for the other constants are {{mvar|A}}&amp;amp;nbsp;=&amp;amp;nbsp;15.5&amp;amp;nbsp;km/s/[[kiloparsec|kpc]], {{mvar|B}}&amp;amp;nbsp;=&amp;amp;nbsp;−12.2&amp;amp;nbsp;km/s/kpc, κ&amp;amp;nbsp;=&amp;amp;nbsp;37&amp;amp;nbsp;km/s/kpc, and ν=74&amp;amp;nbsp;km/s/kpc. We take {{math|''X''(0)}} and {{math|''Y''(0)}} to be zero and {{math|''Z''(0)}} is estimated to be 17 parsecs.&amp;lt;ref&amp;gt;{{cite journal |last=Bobylev |first=Vadim V. |year=2010 |title=Searching for Stars Closely Encountering with the Solar System |journal=Astronomy Letters |volume=36 |issue=3 |pages=220–226 |doi=10.1134/S1063773710030060 |arxiv=1003.2160 |bibcode=2010AstL...36..220B|s2cid=118374161 }}&amp;lt;/ref&amp;gt; This model implies that the Sun circulates around a point that is itself going around the galaxy. The period of the Sun's circulation around the point is &amp;lt;math&amp;gt;2\pi/\kappa&amp;lt;/math&amp;gt;. which comes to 166&amp;amp;nbsp;million years, shorter than the time it takes for the point to go around the galaxy. In the ({{mvar|X, Y}}) coordinates, the Sun describes an ellipse around the point, whose length in the {{mvar|Y}} direction is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;2\times\sqrt{\left(\frac{2\Omega_0}{\kappa^2}U(0)\right)^2+\left(\frac{\Omega_0}{B\kappa}V(0)\right)^2}=1035\text{ parsec}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and whose width in the {{mvar|X}} direction is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;2\times\sqrt{\left(\frac{U(0)}\kappa\right)^2+\left(\frac{V(0)}{2B}\right)^2}=691\text{ parsec}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Compare this to the distance of the sun from the centre of the galaxy, around 7 or 8 kiloparsecs.)&lt;br /&gt;
The ratio of length to width of this ellipse, the same for all stars in our neighborhood, is &amp;lt;math&amp;gt;2\Omega/\kappa\approx 1.50.&amp;lt;/math&amp;gt;&lt;br /&gt;
The moving point is presently at&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;X=\frac{V(0)}{2B}=-215\text{ parsec}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;Y=\frac{2\Omega_0}{\kappa^2}U(0)=405\text{ parsec}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The oscillation in the {{mvar|Z}} direction takes the Sun&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\sqrt{\left(\frac{W(0)}\nu\right)^2+Z(0)^2}=98\text{ parsec}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
above the galactic plane and the same distance below it, with a period of &amp;lt;math&amp;gt;2\pi/\nu&amp;lt;/math&amp;gt; or 83&amp;amp;nbsp;million years, approximately 2.7 times per orbit.&amp;lt;ref&amp;gt;{{cite book |last1=Moore |first1=Patrick |last2=Rees |first2=Robin |title=Patrick Moore's Data Book of Astronomy |year=2014 |publisher=Cambridge University Press |location=Cambridge |isbn=978-1-139-49522-6}}&amp;lt;/ref&amp;gt; Although &amp;lt;math&amp;gt;2\pi/\Omega_0&amp;lt;/math&amp;gt; is 222&amp;amp;nbsp;million years, the value of &amp;lt;math&amp;gt;\Omega&amp;lt;/math&amp;gt; at the point around which the Sun circulates is&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\Omega\approx\Omega_0-\frac{2A}{R_0}\Delta X\approx 26.1\text{ km/s/kpc}&amp;lt;/math&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
corresponding to 235&amp;amp;nbsp;million years (see [[Oort constants]]), and this is the time that the point takes to go once around the galaxy. Other stars with the same value of &amp;lt;math&amp;gt;X+V/(2B)&amp;lt;/math&amp;gt; have to take the same amount of time to go around the galaxy as the sun and thus remain in the same general vicinity as the Sun.&lt;br /&gt;
&lt;br /&gt;
The Sun's orbit around the Milky Way is perturbed due to the non-uniform mass distribution in Milky Way, such as that in and between the galactic spiral arms. It has been argued that the Sun's passage through the higher density spiral arms often coincides with [[mass extinction]]s on Earth, perhaps due to increased [[impact events]].&amp;lt;ref name=&amp;quot;extinction&amp;quot;&amp;gt;{{Cite journal |last1=Gillman |first1=M. |last2=Erenler |first2=H. |title=The galactic cycle of extinction |journal=[[International Journal of Astrobiology]] |volume=7 |issue=1 |pages=17–26 |date=2008 |doi=10.1017/S1473550408004047 |bibcode=2008IJAsB...7...17G |url=http://oro.open.ac.uk/11603/1/S1473550408004047a.pdf |citeseerx=10.1.1.384.9224 |s2cid=31391193 |access-date=26 October 2017 |archive-date=1 June 2019 |archive-url=https://web.archive.org/web/20190601165347/http://oro.open.ac.uk/11603/1/S1473550408004047a.pdf |url-status=live }}&amp;lt;/ref&amp;gt; It takes the Solar System about 225–250&amp;amp;nbsp;million years to complete one orbit through the Milky Way (a ''[[galactic year]]''),&amp;lt;ref name=&amp;quot;fn10&amp;quot; /&amp;gt; so it is thought to have completed 20–25 orbits during the lifetime of the Sun. The [[orbital speed]] of the Solar System about the centre of the Milky Way is approximately 251&amp;amp;nbsp;km/s (156&amp;amp;nbsp;mi/s).&amp;lt;ref name=&amp;quot;space.newscientist.com&amp;quot;&amp;gt;{{Cite journal |last=Croswell |first=Ken |author-link=Ken Croswell |date=2008 |title=Milky Way keeps tight grip on its neighbor |url=https://www.newscientist.com/article/dn12652-milky-way-keeps-a-light-grip-on-speedy-neighbours.html#.VQ7JD46WnCY |journal=[[New Scientist]] |volume=199 |issue=2669 |page=8 |doi=10.1016/S0262-4079(08)62026-6 |access-date=15 September 2017 |archive-date=11 May 2020 |archive-url=https://web.archive.org/web/20200511052658/https://www.newscientist.com/article/dn12652-milky-way-keeps-a-light-grip-on-speedy-neighbours/?ignored=irrelevant#.VQ7JD46WnCY |url-status=live }}&amp;lt;/ref&amp;gt; At this speed, it takes around 1,190 years for the Solar System to travel a distance of 1 light-year, or 7 days to travel {{val|1|u=AU}}.&amp;lt;ref&amp;gt;{{Cite book |last=Garlick |first=M. A. |title=The Story of the Solar System |page=[https://archive.org/details/storyofsolarsyst00garl/page/46 46] |publisher=[[Cambridge University Press]] |date=2002 |isbn=978-0-521-80336-6 |url=https://archive.org/details/storyofsolarsyst00garl/page/46}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Milky Way is moving with respect to the [[cosmic microwave background radiation]] (CMB) in the direction of the constellation [[Hydra (constellation)|Hydra]] with a speed of 550&amp;amp;nbsp;km/s, but since the sun is moving with respect to the galactic centre in the direction of Cygnus (galactic longitude 90°; latitude 0°) at more than 200{{nbsp}}km/sec, the resultant velocity with respect to the CMB is about 370&amp;amp;nbsp;km/s in the direction of [[Crater (constellation)|Crater]] or [[Leo (constellation)|Leo]] (galactic latitude 264°, latitude 48°).&amp;lt;ref&amp;gt;Table 3 of {{Cite journal |last=Kogut |first=A. |date=1993 |title=Dipole Anisotropy in the COBE Differential Microwave Radiometers First-Year Sky Maps |journal=[[The Astrophysical Journal]] |volume=419 |issue=1993 |page=1 |arxiv=astro-ph/9312056 |doi=10.1086/173453 |bibcode=1993ApJ...419....1K |display-authors=etal}}&amp;lt;/ref&amp;gt; This is 132° away from Cygnus.&lt;br /&gt;
&lt;br /&gt;
== Observational history ==&lt;br /&gt;
&lt;br /&gt;
=== Early understanding ===&lt;br /&gt;
[[File:Solvognen DO-6865 2000.jpg|thumb|The [[Trundholm sun chariot]] pulled by a horse is a sculpture believed to be illustrating an important part of [[Nordic Bronze Age]] mythology.|alt=A sculpture of the sun in a chariot being pulled by a horse that has wheels instead of hoofs.]]&lt;br /&gt;
In many prehistoric and ancient cultures, the Sun was thought to be a [[solar deity]] or other [[supernatural]] entity.&amp;lt;ref name=&amp;quot;e488&amp;quot;&amp;gt;{{cite book |last=Hawthorn |first=Hannah |title=The Magick of Birthdays |publisher=Penguin |publication-place=New York |date=2022 |isbn=978-0-593-53854-8 |page=103}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;t793&amp;quot;&amp;gt;{{cite book |last=Singh |first=Madanjeet |title=The Sun |publisher=ABRAMS |publication-place=New York |date=1993 |isbn=978-0-8109-3838-0 |page=305}}&amp;lt;/ref&amp;gt; In the early 1st millennium&amp;amp;nbsp;BC, [[Babylonian astronomy|Babylonian astronomers]] observed that the Sun's motion along the [[ecliptic]] is not uniform, though they did not know why; it is today known that this is due to the movement of Earth in an [[elliptic orbit]], moving faster when it is nearer to the Sun at perihelion and moving slower when it is farther away at aphelion.&amp;lt;ref&amp;gt;{{Cite book |title=Babylon to Voyager and beyond: a history of planetary astronomy |first=David |last=Leverington |publisher=[[Cambridge University Press]] |date=2003 |isbn=978-0-521-80840-8 |pages=6–7}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One of the first people to offer a scientific or philosophical explanation for the Sun was the [[Ancient Greece|Greek]] philosopher [[Anaxagoras]]. He reasoned that it was a giant flaming ball of metal even larger than the land of the [[Peloponnese|Peloponnesus]] and that the Moon reflected the light of the Sun.&amp;lt;ref&amp;gt;{{Cite journal |last=Sider |first=D. |title=Anaxagoras on the Size of the Sun |jstor=269068 |journal=[[Classical Philology (journal)|Classical Philology]] |volume=68 |issue=2 |pages=128–129 |date=1973 |doi=10.1086/365951 |s2cid=161940013}}&amp;lt;/ref&amp;gt; [[Eratosthenes]] estimated the distance between Earth and the Sun in the 3rd century&amp;amp;nbsp;BC as &amp;quot;of stadia [[myriad]]s 400 and 80000&amp;quot;, the translation of which is ambiguous, implying either 4,080,000 [[Stadion (unit)|stadia]] (755,000&amp;amp;nbsp;km) or 804,000,000 stadia (148 to 153&amp;amp;nbsp;million kilometres or 0.99 to 1.02 AU); the latter value is correct to within a few per cent. In the 1st century&amp;amp;nbsp;AD, [[Ptolemy]] estimated the distance as 1,210 times [[Earth radius|the radius of Earth]], approximately {{convert|{{#expr:1.210*6.371round2}}|e6km|AU}}.&amp;lt;ref&amp;gt;{{Cite journal |last=Goldstein |first=B. R. |title=The Arabic Version of Ptolemy's Planetary Hypotheses |journal=Transactions of the American Philosophical Society |volume=57 |issue=4 |pages=9–12 |date=1967 |doi=10.2307/1006040 |jstor=1006040}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The theory that the Sun is the centre around which the planets orbit was first proposed by the ancient Greek [[Aristarchus of Samos]] in the 3rd century&amp;amp;nbsp;BC,&amp;lt;ref&amp;gt;{{Cite journal |last=Stahl |first=William Harris |date=1945 |title=The Greek Heliocentric Theory and Its Abandonment |jstor=283344 |journal=Transactions and Proceedings of the American Philological Association |volume=76 |pages=321–332 |doi=10.2307/283344 |issn=0065-9711}}&amp;lt;/ref&amp;gt; and later adopted by [[Seleucus of Seleucia]] (see [[Heliocentrism]]).&amp;lt;ref&amp;gt;{{cite book |last=Toomer |first=G. J. |chapter=Seleucus (5), of Seleuceia, astronomer |date=7 March 2016 |title=Oxford Research Encyclopedia of Classics |url=https://oxfordre.com/classics/view/10.1093/acrefore/9780199381135.001.0001/acrefore-9780199381135-e-5799 |access-date=27 May 2024 |publisher=Oxford University Press |doi=10.1093/acrefore/9780199381135.013.5799 |isbn=978-0-19-938113-5}}&amp;lt;/ref&amp;gt; This view was developed in a more detailed mathematical model of a heliocentric system in the 16th century by [[Nicolaus Copernicus]].&amp;lt;ref&amp;gt;{{Cite book |last1=Fraknoi |first1=Andrew |last2=Morrison |first2=David |last3=Wolff |first3=Sidney |date=9 March 2022 |chapter=2.4 The Birth of Modern Astronomy |title=Astronomy 2e |publisher=OpenStax |chapter-url=https://openstax.org/books/astronomy-2e/pages/2-4-the-birth-of-modern-astronomy |access-date=27 May 2024}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Development of scientific understanding ===&lt;br /&gt;
[[File:Sun-bonatti.png|thumb|Sol, the Personification of the Sun, from a 1550 edition of [[Guido Bonatti]]'s ''{{lang|la|Liber astronomiae}}''|alt=A drawing of a man wearing a crown in a chariot, being pulled by horses.]]&lt;br /&gt;
Observations of sunspots were recorded by [[Chinese astronomers]] during the [[Han dynasty]] (202&amp;amp;nbsp;BC{{snd}}AD&amp;amp;nbsp;220), with records of their observations being maintained for centuries. [[Averroes]] also provided a description of sunspots in the 12th century.&amp;lt;ref&amp;gt;{{cite book |last=Ead |first=Hamed A. |title=Averroes As A Physician |publisher=[[University of Cairo]] |url=https://www.alchemywebsite.com/islam21.html |year=1998 |access-date=27 May 2024}}&amp;lt;/ref&amp;gt; The invention of the telescope in the early 17th century permitted detailed observations of sunspots by [[Thomas Harriot]], [[Galileo Galilei]] and other astronomers. Galileo posited that sunspots were on the surface of the Sun rather than small objects passing between Earth and the Sun.&amp;lt;ref&amp;gt;{{cite web |title=Galileo Galilei (1564–1642) |url=https://www.bbc.co.uk/history/historic_figures/galilei_galileo.shtml |publisher=BBC |access-date=22 March 2006 |archive-date=29 September 2018 |archive-url=https://web.archive.org/web/20180929134432/http://www.bbc.co.uk/history/historic_figures/galilei_galileo.shtml |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Astronomy in the medieval Islamic world|Medieval Islamic astronomical contributions]] include [[al-Battani]]'s discovery that the direction of the Sun's [[apogee]] (the place in the Sun's orbit against the fixed stars where it seems to be moving slowest) is changing.&amp;lt;ref&amp;gt;{{cite book |title=A short History of scientific ideas to 1900 |first=C. |last=Singer |publisher=Oxford University Press |year=1959 |page=151}}&amp;lt;/ref&amp;gt; In modern heliocentric terms, this is caused by a gradual motion of the aphelion of the &amp;lt;em&amp;gt;Earth's&amp;lt;/em&amp;gt; orbit. [[Ibn Yunus]] observed more than 10,000 entries for the Sun's position for many years using a large [[astrolabe]].&amp;lt;ref&amp;gt;{{cite book |chapter=The Arabian Science |first=C. |last=Ronan |pages=201–244 |title=The Cambridge Illustrated History of the World's Science |publisher=Cambridge University Press |year=1983}} at pp. 213–214.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first reasonably accurate distance to the Sun was determined in 1684 by [[Giovanni Domenico Cassini]]. Knowing that direct measurements of the solar parallax were difficult, he chose to measure the Martian parallax. Having sent [[Jean Richer]] to [[Cayenne]], part of [[French Guiana]], for simultaneous measurements, Cassini in Paris determined the parallax of [[Mars]] when Mars was at its closest to Earth in 1672. Using the circumference distance between the two observations, Cassini calculated the Earth-Mars distance, then used [[Kepler's laws]] to determine the Earth-Sun distance. His value, about 10% smaller than modern values, was much larger than all previous estimates.&amp;lt;ref&amp;gt;{{Cite book |last=Rossi |first=Elisabetta |url=http://www.fedoabooks.unina.it/public/presses/1/17_Rossi_1.pdf |title=Unveiling the Size of the Universe: The first Accurate Measurement of the Earth-Sun Distance by Giovanni Domenico Cassini |date=2024 |publisher=FedOA – Federico II University Press |doi=10.6093/978-88-6887-277-9}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From an observation of a [[transit of Venus]] in 1032, the Persian astronomer and polymath [[Avicenna|Ibn Sina]] concluded that Venus was closer to Earth than the Sun.&amp;lt;ref name=Goldstein&amp;gt;{{Cite journal |title=Theory and Observation in Medieval Astronomy |first=Bernard R. |last=Goldstein |journal=[[Isis (journal)|Isis]] |volume=63 |issue=1 |date=March 1972 |pages=39–47 [44] |doi=10.1086/350839 |bibcode=1972Isis...63...39G |s2cid=120700705}}&amp;lt;/ref&amp;gt; In 1677, [[Edmond Halley]] observed a transit of Mercury across the Sun, leading him to realise that observations of the [[solar parallax]] of a planet (more ideally using the transit of Venus) could be used to [[Trigonometry|trigonometrically]] determine the distances between Earth, [[Venus]], and the Sun.&amp;lt;ref&amp;gt;{{Cite conference |last=Chapman |first=Allan |date=April 2005 |editor-last=Kurtz |editor-first=D. W. |title=Jeremiah Horrocks, William Crabtree, and the Lancashire observations of the transit of Venus of 1639 |conference=Transits of Venus: New Views of the Solar System and Galaxy, Proceedings of IAU Colloquium #196, held 7–11 June 2004 in Preston, U.K. |publisher=Cambridge University Press |publication-place=Cambridge |volume=2004 |pages=3–26 |bibcode=2005tvnv.conf....3C |doi=10.1017/S1743921305001225 |doi-access=free |journal=Proceedings of the International Astronomical Union}}&amp;lt;/ref&amp;gt; Careful observations of the [[1769 transit of Venus observed from Tahiti|1769 transit of Venus]] allowed astronomers to calculate the average Earth–Sun distance as {{Convert|93726900|mi|km}}, only 0.8% greater than the modern value.&amp;lt;ref&amp;gt;{{Cite journal |last=Teets |first=Donald |date=December 2003 |title=Transits of Venus and the Astronomical Unit |url=http://www.maa.org/sites/default/files/pdf/pubs/mm_dec03-Venus.pdf |url-status=live |journal=Mathematics Magazine |volume=76 |pages=335–348 |doi=10.1080/0025570X.2003.11953207 |jstor=3654879 |s2cid=54867823 |archive-url=https://web.archive.org/web/20220203080207/https://www.maa.org/sites/default/files/pdf/pubs/mm_dec03-Venus.pdf |archive-date=3 February 2022 |access-date=3 April 2022 |number=5}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:BBSO full-disk H-alpha 2002-07-26 153931 color.png|thumb|left|Sun as seen in Hydrogen-alpha light|alt=A photograph of the sun]]&lt;br /&gt;
In 1666, [[Isaac Newton]] observed the Sun's light using a [[Prism (optics)|prism]], and showed that it is made up of light of many colours.&amp;lt;ref&amp;gt;{{cite news |title=Sir Isaac Newton (1643–1727) |publisher=BBC Teach |url=https://www.bbc.co.uk/history/historic_figures/newton_isaac.shtml |access-date=22 March 2006 |archive-date=10 March 2015 |archive-url=https://web.archive.org/web/20150310093436/http://www.bbc.co.uk/history/historic_figures/newton_isaac.shtml |url-status=live}}&amp;lt;/ref&amp;gt; In 1800, [[William Herschel]] discovered [[infrared]] radiation beyond the red part of the solar spectrum.&amp;lt;ref&amp;gt;{{cite web |title=Herschel Discovers Infrared Light |url=http://coolcosmos.ipac.caltech.edu/cosmic_classroom/classroom_activities/herschel_bio.html |publisher=Cool Cosmos |access-date=22 March 2006 |url-status=dead |archive-url=https://web.archive.org/web/20120225094516/http://coolcosmos.ipac.caltech.edu/cosmic_classroom/classroom_activities/herschel_bio.html |archive-date=25 February 2012}}&amp;lt;/ref&amp;gt; The 19th century saw advancement in spectroscopic studies of the Sun; [[Joseph von Fraunhofer]] recorded more than 600 [[absorption lines]] in the spectrum, the strongest of which are still often referred to as ''[[Fraunhofer lines]]''. The 20th century brought about several specialised systems for observing the Sun, especially at different narrowband wavelengths, such as those using Calcium-H (396.9&amp;amp;nbsp;nm), Calcium-K (393.37&amp;amp;nbsp;nm) and [[Hydrogen-alpha]] (656.46&amp;amp;nbsp;nm) [[Astronomical filter|filtering]].&amp;lt;ref&amp;gt;{{cite book |chapter=Instruments for observing the Corona |first=Gudrun |last=Wolfschmidt |title=Instruments of Science, An Historical Encyclopedia |year=1998 |pages=147–148 |isbn=9780815315612 |publisher=Science Museum, London, and National Museum of American History, Smithsonian Institution |editor1-first=Deborah Jean |editor1-last=Warner |editor2-first=Robert |editor2-last=Bud |chapter-url=https://books.google.com/books?id=1AsFdUxOwu8C&amp;amp;pg=PA148}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During early studies of the [[optical spectrum]] of the photosphere, some absorption lines were found that did not correspond to any [[chemical element]]s then known on Earth. In 1868, [[Norman Lockyer]] hypothesised that these absorption lines were caused by a new element that he dubbed ''helium'', after the Greek Sun god [[Helios]]. Twenty-five years later, helium was isolated on Earth.&amp;lt;ref name=&amp;quot;Lockyer&amp;quot;&amp;gt;{{Cite web |last=Parnel |first=C. |title=Discovery of Helium |url=http://www-solar.mcs.st-andrews.ac.uk/~clare/Lockyer/helium.html |url-status=live |archive-url=https://web.archive.org/web/20151107043457/http://www-solar.mcs.st-andrews.ac.uk/~clare/Lockyer/helium.html |archive-date=7 November 2015 |access-date=22 March 2006 |publisher=University of St Andrews}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the early years of the modern scientific era, the source of the Sun's energy was a significant puzzle. [[Lord Kelvin]] suggested that the Sun is a gradually cooling liquid body that is radiating an internal store of heat.&amp;lt;ref name=kelvin&amp;gt;{{Cite journal |last=Thomson |first=W. |title=On the Age of the Sun's Heat |url=http://zapatopi.net/kelvin/papers/on_the_age_of_the_suns_heat.html |journal=[[Macmillan's Magazine]] |date=1862 |volume=5 |pages=388–393 |access-date=25 August 2006 |archive-date=25 September 2006 |archive-url=https://web.archive.org/web/20060925190954/http://zapatopi.net/kelvin/papers/on_the_age_of_the_suns_heat.html |url-status=live}}&amp;lt;/ref&amp;gt; Kelvin and [[Hermann von Helmholtz]] then proposed a [[Kelvin–Helmholtz mechanism|gravitational contraction]] mechanism to explain the energy output, but the resulting age estimate was only 20&amp;amp;nbsp;million years, well short of the time span of at least 300&amp;amp;nbsp;million years suggested by some geological discoveries of that time.&amp;lt;ref name=kelvin /&amp;gt;&amp;lt;ref&amp;gt;{{cite journal |year=2000 |title=Kelvin's age of the Earth paradox revisited |journal=[[Journal of Geophysical Research]] |volume=105 |issue=B6 |pages=13155–13158 |bibcode=2000JGR...10513155S |doi=10.1029/2000JB900028 |last1=Stacey |first1=Frank D. |doi-access=free}}&amp;lt;/ref&amp;gt;&amp;lt;!-- In XIX century, before discovery of radionuclear dating, there was no reason to suggest that Earth exists for as long as 4 billion years. --&amp;gt; In 1890, Lockyer proposed a meteoritic hypothesis for the formation and evolution of the Sun.&amp;lt;ref&amp;gt;{{Cite journal |last=Lockyer |first=J. N. |title=The meteoritic hypothesis; a statement of the results of a spectroscopic inquiry into the origin of cosmical systems |journal=London and New York |year=1890 |bibcode=1890mhsr.book.....L}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not until 1904 was a documented solution offered. [[Ernest Rutherford]] suggested that the Sun's output could be maintained by an internal source of heat, and suggested [[radioactive decay]] as the source.&amp;lt;ref&amp;gt;{{cite web |last=Darden |first=L. |title=The Nature of Scientific Inquiry |url=http://www.philosophy.umd.edu/Faculty/LDarden/sciinq/ |year=1998 |access-date=25 August 2006 |archive-date=17 August 2012 |archive-url=https://web.archive.org/web/20120817040843/http://www.philosophy.umd.edu/Faculty/LDarden/sciinq/ |url-status=live}}&amp;lt;/ref&amp;gt; However, it would be [[Albert Einstein]] who would provide the essential clue to the source of the Sun's energy output with his [[mass–energy equivalence]] relation {{nowrap|''E'' {{=}} ''mc''&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;}}.&amp;lt;ref&amp;gt;{{Cite book |last=Hawking |first=S. W. |author-link=Stephen Hawking |date=2001 |title=The Universe in a Nutshell |publisher=Bantam |isbn=978-0-553-80202-3 |page=12 |url=https://books.google.com/books?id=0CO2iwfzRJkC&amp;amp;pg=PA12}}&amp;lt;/ref&amp;gt; In 1920, Sir [[Arthur Eddington]] proposed that the pressures and temperatures at the core of the Sun could produce a nuclear fusion reaction that merged hydrogen (protons) into helium nuclei, resulting in a production of energy from the net change in mass.&amp;lt;ref&amp;gt;{{cite web |title=Studying the stars, testing relativity: Sir Arthur Eddington |url=http://www.esa.int/esaSC/SEMDYPXO4HD_index_0.html |website=Space Science |publisher=[[European Space Agency]] |date=2005 |access-date=1 August 2007 |archive-date=20 October 2012 |archive-url=https://web.archive.org/web/20121020174459/http://www.esa.int/esaSC/SEMDYPXO4HD_index_0.html |url-status=live}}&amp;lt;/ref&amp;gt; The preponderance of hydrogen in the Sun was confirmed in 1925 by [[Cecilia Payne-Gaposchkin|Cecilia Payne]] using the ionisation theory developed by [[Meghnad Saha]]. The theoretical concept of fusion was developed in the 1930s by the astrophysicists [[Subrahmanyan Chandrasekhar]] and [[Hans Bethe]]. Bethe calculated the details of the two main energy-producing nuclear reactions that power the Sun.&amp;lt;ref name=&amp;quot;Bethe&amp;quot;&amp;gt;{{Cite journal |last1=Bethe |first1=H. |title=On the Formation of Deuterons by Proton Combination |journal=[[Physical Review]] |volume=54 |issue=10 |page=862 |date=1938 |doi=10.1103/PhysRev.54.862.2 |last2=Critchfield |first2=C. |bibcode=1938PhRv...54Q.862B}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Bethe2&amp;quot;&amp;gt;{{Cite journal |last=Bethe |first=H. |title=Energy Production in Stars |journal=[[Physical Review]] |volume=55 |issue=1 |pages=434–456 |date=1939 |doi=10.1103/PhysRev.55.434 |pmid=17835673 |bibcode=1939PhRv...55..434B |s2cid=36146598 |doi-access=free}}&amp;lt;/ref&amp;gt; In 1957, [[Margaret Burbidge]], [[Geoffrey Burbidge]], [[William Alfred Fowler|William Fowler]] and [[Fred Hoyle]] showed that most of the elements in the universe have been [[Nucleosynthesis|synthesised]] by nuclear reactions inside stars, some like the Sun.&amp;lt;ref&amp;gt;{{Cite journal |first1=E. M. |last1=Burbidge |first2=G. R. |last2=Burbidge |first3=W. A. |last3=Fowler |first4=F. |last4=Hoyle |title=Synthesis of the Elements in Stars |journal=[[Reviews of Modern Physics]] |volume=29 |issue=4 |pages=547–650 |year=1957 |doi=10.1103/RevModPhys.29.547 |bibcode=1957RvMP...29..547B |url=https://authors.library.caltech.edu/45747/1/BURrmp57.pdf |doi-access=free |access-date=12 April 2020 |archive-date=23 July 2018 |archive-url=https://web.archive.org/web/20180723054833/https://authors.library.caltech.edu/45747/1/BURrmp57.pdf |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Solar space missions ===&lt;br /&gt;
{{See also|Solar observatory|List of heliophysics missions}}&lt;br /&gt;
[[File:Pioneer-6-9.jpg|thumb|[[Pioneer 6, 7, 8, and 9|''Pioneer 6'', ''7'', ''8'', and ''9'']]]]&lt;br /&gt;
The first satellites designed for long term observation of the Sun from interplanetary space were [[Pioneer 6, 7, 8, and 9|''Pioneer 6'', ''7'', ''8'', and ''9'']], which were launched by NASA between 1959 and 1968. These probes orbited the Sun at a distance similar to that of Earth, and made the first detailed measurements of the solar wind and the solar magnetic field. ''Pioneer 9'' operated for a particularly long time, transmitting data until May 1983.&amp;lt;ref&amp;gt;{{cite web |last=Wade |first=M. |title=Pioneer 6-7-8-9-E |url=http://www.astronautix.com/craft/pio6789e.htm |date=2008 |publisher=[[Encyclopedia Astronautica]] |access-date=22 March 2006 |url-status=dead |archive-url=https://web.archive.org/web/20060422075141/http://www.astronautix.com/craft/pio6789e.htm |archive-date=22 April 2006 }}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web |title=Solar System Exploration: Missions: By Target: Our Solar System: Past: Pioneer 9 |url=http://solarsystem.nasa.gov/missions/profile.cfm?MCode=Pioneer_09 |publisher=[[NASA]] |access-date=30 October 2010 |quote=NASA maintained contact with Pioneer 9 until May 1983 |url-status=dead |archive-url=https://web.archive.org/web/20120402205810/http://solarsystem.nasa.gov/missions/profile.cfm?MCode=Pioneer_09 |archive-date=2 April 2012 }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the 1970s, two [[Helios (spacecraft)|''Helios'' spacecraft]] and the Skylab [[Apollo Telescope Mount]] provided scientists with significant new data on solar wind and the solar corona. The ''Helios 1'' and ''2'' probes were U.S.–German collaborations that studied the solar wind from an orbit carrying the spacecraft inside Mercury's orbit at perihelion.&amp;lt;ref name=Burlaga2001 /&amp;gt; The Skylab space station, launched by NASA in 1973, included a solar observatory module called the Apollo Telescope Mount that was operated by astronauts resident on the station.&amp;lt;ref name=Dwivedi2006 /&amp;gt; Skylab made the first time-resolved observations of the solar transition region and of ultraviolet emissions from the solar corona.&amp;lt;ref name=Dwivedi2006 /&amp;gt; Discoveries included the first observations of coronal mass ejections, then called &amp;quot;coronal transients&amp;quot;, and of [[coronal hole]]s, now known to be intimately associated with the solar wind.&amp;lt;ref name=Burlaga2001&amp;gt;{{Cite journal |last=Burlaga |first=L. F. |title=Magnetic Fields and plasmas in the inner heliosphere: Helios results |year=2001 |journal=Planetary and Space Science |volume=49 |issue=14–15 |pages=1619–1627 |doi=10.1016/S0032-0633(01)00098-8 |bibcode=2001P&amp;amp;SS...49.1619B |url=https://zenodo.org/record/1259695 |access-date=25 August 2019 |archive-date=13 July 2020 |archive-url=https://web.archive.org/web/20200713051926/https://zenodo.org/record/1259695 |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Smm.jpg|thumb|left|Drawing of a [[Solar Maximum Mission]] probe|alt=See caption]]&lt;br /&gt;
&lt;br /&gt;
In 1980, the [[Solar Maximum Mission]] probes were launched by NASA. This spacecraft was designed to observe gamma rays, [[X-ray]]s and [[ultraviolet]] radiation from solar flares during a time of high solar activity and solar luminosity. Just a few months after launch, however, an electronics failure caused the probe to go into standby mode, and it spent the next three years in this inactive state. In 1984, [[Space Shuttle Challenger|Space Shuttle ''Challenger'']] mission [[STS-41-C]] retrieved the satellite and repaired its electronics before re-releasing it into orbit. The Solar Maximum Mission subsequently acquired thousands of images of the solar corona before [[Atmospheric reentry|re-entering]] Earth's atmosphere in June 1989.&amp;lt;ref&amp;gt;{{cite web |last=Burkepile |first=C. J. |title=Solar Maximum Mission Overview |url=http://web.hao.ucar.edu/public/research/svosa/smm/smm_mission.html |date=1998 |access-date=22 March 2006 |archive-url=https://web.archive.org/web/20060405183758/http://web.hao.ucar.edu/public/research/svosa/smm/smm_mission.html |archive-date=5 April 2006}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Launched in 1991, Japan's [[Yohkoh]] (''Sunbeam'') satellite observed solar flares at X-ray wavelengths. Mission data allowed scientists to identify several different types of flares and demonstrated that the corona away from regions of peak activity was much more dynamic and active than had previously been supposed. Yohkoh observed an entire solar cycle but went into standby mode when an annular eclipse in 2001 caused it to lose its lock on the Sun. It was destroyed by atmospheric re-entry in 2005.&amp;lt;ref&amp;gt;{{cite press release |title=Result of Re-entry of the Solar X-ray Observatory &amp;quot;Yohkoh&amp;quot; (SOLAR-A) to the Earth's Atmosphere |url=http://www.jaxa.jp/press/2005/09/20050913_yohkoh_e.html |publisher=[[Japan Aerospace Exploration Agency]] |date=13 September 2005 |access-date=22 March 2006 |archive-date=10 August 2013 |archive-url=https://web.archive.org/web/20130810150641/http://www.jaxa.jp/press/2005/09/20050913_yohkoh_e.html |url-status=dead}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [[Solar and Heliospheric Observatory]], jointly built by the [[European Space Agency]] and NASA, was launched on 2 December 1995.&amp;lt;ref name=Dwivedi2006 /&amp;gt; Originally intended to serve a two-year mission,&amp;lt;ref&amp;gt;{{cite web |url=https://www.universetoday.com/138664/22-years-of-the-sun-from-soho/ |title=22 Years of the Sun from SOHO |website=Universe Today |access-date=31 May 2024 |date=26 February 2018 |first=Evan |last=Gough}}&amp;lt;/ref&amp;gt; SOHO remains in operation as of 2024.&amp;lt;ref&amp;gt;{{cite web |url=https://www.universetoday.com/166353/someone-just-found-sohos-5000th-comet/ |title=Someone Just Found SOHO's 5,000th Comet |first=Nancy |last=Atkinson |date=28 March 2024 |access-date=31 May 2024 |website=Universe Today}}&amp;lt;/ref&amp;gt; Situated at the [[Lagrangian point]] between Earth and the Sun (at which the gravitational pull from both is equal), SOHO has provided a constant view of the Sun at many wavelengths since its launch.&amp;lt;ref name=Dwivedi2006 /&amp;gt; Besides its direct solar observation, SOHO has enabled the discovery of a large number of [[comet]]s, mostly tiny [[sungrazing comet]]s that incinerate as they pass the Sun.&amp;lt;ref&amp;gt;{{cite web |title=Sungrazing Comets |url=https://sungrazer.nrl.navy.mil/ |publisher=[[Large Angle and Spectrometric Coronagraph|LASCO]] ([[US Naval Research Laboratory]]) |date=13 March 2015 |access-date=19 March 2009 |archive-date=25 May 2015 |archive-url=https://web.archive.org/web/20150525060147/http://sungrazer.nrl.navy.mil/ |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:The Ulysses spacecraft undergoes testing at the vacuum spin-balancing facility in ESTEC.jpg|thumb|[[Ulysses (spacecraft)|''Ulysses'' spacecraft]] testing at the vacuum spin-balancing facility|alt=A photograph of Ulysses spacecraft]]&lt;br /&gt;
&lt;br /&gt;
All these satellites have observed the Sun from the plane of the ecliptic, and so have only observed its equatorial regions in detail. The [[Ulysses (spacecraft)|''Ulysses'' probe]] was launched in 1990 to study the Sun's polar regions. It first travelled to Jupiter, to &amp;quot;slingshot&amp;quot; into an orbit that would take it far above the plane of the ecliptic. Once ''Ulysses'' was in its scheduled orbit, it began observing the solar wind and magnetic field strength at high solar latitudes, finding that the solar wind from high latitudes was moving at about 750&amp;amp;nbsp;km/s, which was slower than expected, and that there were large magnetic waves emerging from high latitudes that scattered galactic cosmic rays.&amp;lt;ref&amp;gt;{{cite web |author=[[Jet Propulsion Laboratory|JPL]]/[[California Institute of Technology|CALTECH]] |title=Ulysses: Primary Mission Results |url=http://ulysses.jpl.nasa.gov/science/mission_primary.html |publisher=NASA |year=2005 |access-date=22 March 2006 |url-status=dead |archive-url=https://web.archive.org/web/20060106150819/http://ulysses.jpl.nasa.gov/science/mission_primary.html |archive-date=6 January 2006}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Elemental abundances in the photosphere are well known from [[astronomical spectroscopy|spectroscopic]] studies, but the composition of the interior of the Sun is more poorly understood. A solar wind sample return mission, ''[[Genesis (spacecraft)|Genesis]]'', was designed to allow astronomers to directly measure the composition of solar material.&amp;lt;ref&amp;gt;{{Cite journal |last1=Calaway |first1=M. J. |title=Genesis capturing the Sun: Solar wind irradiation at Lagrange 1 |journal=[[Nuclear Instruments and Methods in Physics Research B]] |volume=267 |issue=7 |pages=1101–1108 |date=2009 |doi=10.1016/j.nimb.2009.01.132 |last2=Stansbery |first2=Eileen K. |last3=Keller |first3=Lindsay P. |bibcode=2009NIMPB.267.1101C |url=https://zenodo.org/record/1259269 |access-date=13 July 2019 |archive-date=11 May 2020 |archive-url=https://web.archive.org/web/20200511052700/https://zenodo.org/record/1259269 |url-status=live}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Observation by eyes ==&lt;br /&gt;
&lt;br /&gt;
===Exposure to the eye===&lt;br /&gt;
[[File:- panoramio (785).jpg|thumb|The Sun seen from Earth, with [[Glare (vision)|glare]] from the lenses. The eye also sees glare when looked towards the Sun directly.|alt=See caption]]&lt;br /&gt;
&lt;br /&gt;
The brightness of the Sun can cause pain from looking at it with the [[naked eye]]; however, doing so for brief periods is not hazardous for normal non-[[Mydriasis|dilated]] eyes.&amp;lt;ref&amp;gt;{{Cite journal |first1=T. J. |last1=White |first2=M. A. |last2=Mainster |first3=P. W. |last3=Wilson |first4=J. H. |last4=Tips |title=Chorioretinal temperature increases from solar observation |journal=[[Bulletin of Mathematical Biophysics]] |volume=33 |issue=1 |pages=1–17 |year=1971 |doi=10.1007/BF02476660 |pmid=5551296}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite journal |first1=M. O. M. |last1=Tso |first2=F. G. |last2=La Piana |title=The Human Fovea After Sungazing |journal=Transactions of the American Academy of Ophthalmology and Otolaryngology |year=1975 |volume=79 |pages=OP788–95 |pmid=1209815 |issue=6}}&amp;lt;/ref&amp;gt; Looking directly at the Sun, known as [[sungazing]], causes [[phosphene]] visual artefacts and temporary partial blindness. It also delivers about 4&amp;amp;nbsp;milliwatts of sunlight to the retina, slightly heating it and potentially causing damage in eyes that cannot respond properly to the brightness.&amp;lt;ref&amp;gt;{{Cite journal |last1=Hope-Ross |first1=M. W. |title=Ultrastructural findings in solar retinopathy |journal=[[Eye (journal)|Eye]] |volume=7 |issue=4 |year=1993 |doi=10.1038/eye.1993.7 |pmid=8325420 |last2=Mahon |first2=G. J. |last3=Gardiner |first3=T. A. |last4=Archer |first4=D. B. |pages=29–33 |doi-access=free}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite journal |title=Solar Retinopathy from Sun-Gazing Under Influence of LSD |last1=Schatz |first1=H. |last2=Mendelblatt |first2=F. |journal=[[British Journal of Ophthalmology]] |volume=57 |issue=4 |year=1973 |doi=10.1136/bjo.57.4.270 |pmid=4707624 |pmc=1214879 |pages=270–273}}&amp;lt;/ref&amp;gt; Viewing of the direct Sun with the naked eye can cause UV-induced, sunburn-like lesions on the retina beginning after about 100&amp;amp;nbsp;seconds, particularly under conditions where the UV light from the Sun is intense and well focused.&amp;lt;ref&amp;gt;{{Cite journal |first1=W. T. Jr. |last1=Ham |first2=H. A. |last2=Mueller |first3=D. H. |last3=Sliney |journal=[[Nature (journal)|Nature]] |title=Retinal sensitivity to damage from short wavelength light |volume=260 |issue=5547 |pages=153–155 |year=1976 |doi=10.1038/260153a0 |pmid=815821 |bibcode=1976Natur.260..153H |s2cid=4283242}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite book |first1=W. T. Jr. |last1=Ham |first2=H. A. |last2=Mueller |first3=J. J. Jr. |last3=Ruffolo |first4=D. III |last4=Guerry |chapter=Solar Retinopathy as a function of Wavelength: its Significance for Protective Eyewear |title=The Effects of Constant Light on Visual Processes |editor-last=Williams |editor-first=T. P. |editor-last2=Baker |editor-first2=B. N. |publisher=[[Plenum Press]] |pages=319–346 |year=1980 |isbn=978-0-306-40328-6}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Viewing the Sun through light-concentrating [[optics]] such as [[binoculars]] may result in permanent damage to the retina without an appropriate filter that blocks UV and substantially dims the sunlight. When using an attenuating filter to view the Sun, the viewer is cautioned to use a filter specifically designed for that use. Some improvised filters that pass UV or [[infrared|IR]] rays, can actually harm the eye at high brightness levels.&amp;lt;ref&amp;gt;{{Cite book |first=T. |last=Kardos |title=Earth science |url=https://books.google.com/books?id=xI6EDV_PRr4C&amp;amp;pg=PT102 |page=87 |publisher=J. W. Walch |year=2003 |isbn=978-0-8251-4500-1 |access-date=22 August 2020}}&amp;lt;/ref&amp;gt; Brief glances at the midday Sun through an unfiltered telescope can cause permanent damage.&amp;lt;ref name=Macdonald&amp;gt;{{cite book |last=Macdonald |first=Lee |chapter=Equipment for Observing the Sun |year=2012 |title=How to Observe the Sun Safely |publisher=Springer |place=New York |page=17 |doi=10.1007/978-1-4614-3825-0_2 |quote=Never look directly at the Sun through any form of optical equipment, even for an instant. A brief glimpse of the Sun through a telescope is enough to cause permanent eye damage, or even blindness. Even looking at the Sun with the naked eye for more than a second or two is not safe. Do not assume that it is safe to look at the Sun through a filter, no matter how dark the filter appears to be. |series=Patrick Moore's Practical Astronomy Series |isbn=978-1-4614-3824-3}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During sunrise and sunset, sunlight is attenuated because of [[Rayleigh scattering]] and [[Mie theory|Mie scattering]] from a particularly long passage through Earth's atmosphere,&amp;lt;ref name=Haber2005&amp;gt;{{Cite journal |last1=Haber |first1=Jorg |last2=Magnor |first2=Marcus |last3=Seidel |first3=Hans-Peter |title=Physically based Simulation of Twilight Phenomena |year=2005 |journal=ACM Transactions on Graphics |volume=24 |issue=4 |pages=1353–1373 |doi=10.1145/1095878.1095884 |citeseerx=10.1.1.67.2567 |s2cid=2349082}}&amp;lt;/ref&amp;gt; and the Sun is sometimes faint enough to be viewed comfortably with the naked eye or safely with optics (provided there is no risk of bright sunlight suddenly appearing through a break between clouds). Hazy conditions, atmospheric dust, and high humidity contribute to this atmospheric attenuation.&amp;lt;ref&amp;gt;{{Cite journal |title=Diurnal asymmetries in global radiation |first=I. G. |last=Piggin |journal=Archiv für Meteorologie, Geophysik und Bioklimatologie, Serie B |year=1972 |volume=20 |issue=1 |doi=10.1007/BF02243313 |pages=41–48 |bibcode=1972AMGBB..20...41P |s2cid=118819800}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Phenomena===&lt;br /&gt;
An [[optical phenomenon]], known as a [[green flash]], can sometimes be seen shortly after sunset or before sunrise. The flash is caused by light from the Sun just below the horizon being [[refraction|bent]] (usually through a [[temperature inversion]]) towards the observer. Light of shorter wavelengths (violet, blue, green) is bent more than that of longer wavelengths (yellow, orange, red) but the violet and blue light is [[Rayleigh scattering|scattered]] more, leaving light that is perceived as green.&amp;lt;ref&amp;gt;{{cite web |title=The Green Flash |url=https://www.bbc.co.uk/weather/features/understanding/greenflash.shtml |date=16 December 2008 |publisher=BBC |access-date=10 August 2008 |archive-url=https://web.archive.org/web/20081216135504/http://www.bbc.co.uk/weather/features/understanding/greenflash.shtml |archive-date=16 December 2008}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Religious aspects ==&lt;br /&gt;
Solar deities play a major role in many world religions and mythologies.&amp;lt;ref name=&amp;quot;APLLondon&amp;quot;&amp;gt;{{cite book |last1=Coleman |first1=J. A. |last2=Davidson |first2=George |title=The Dictionary of Mythology: An A–Z of Themes, Legends, and Heroes |year=2015 |publisher=Arcturus |location=London |isbn=978-1-78404-478-7 |page=316}}&amp;lt;/ref&amp;gt; [[Sun worship|Worship of the Sun]] was central to civilisations such as the [[ancient Egypt]]ians, the [[Inca]] of South America and the [[Aztec]]s of what is now Mexico. In religions such as Hinduism, the Sun is still considered a god, known as [[Surya]]. Many ancient monuments were constructed with solar phenomena in mind; for example, stone [[megalith]]s accurately mark the summer or winter [[solstice]] (for example in [[Nabta Playa]], Egypt; [[Mnajdra]], Malta; and [[Stonehenge]], England); [[Newgrange]], a prehistoric human-built mount in Ireland, was designed to detect the winter solstice; the pyramid of [[El Castillo, Chichen Itza|El Castillo]] at [[Chichén Itzá]] in Mexico is designed to cast shadows in the shape of serpents climbing the [[pyramid]] at the vernal and autumnal [[equinox]]es.&amp;lt;ref&amp;gt;{{cite journal |journal=[[Arqueología Mexicana]] |title=El Sol en Chichén Itza y Dzibilchaltún. La Supuesta Importancia de los Equinoccios en Mesoamérica |language=es |first1=Ivan |last1=Šprajc |first2=Pedro Francisco Sanchéz |last2=Nava |date=21 March 2018 |number=149 |pages=26–31 |volume=XXV |url=https://arqueologiamexicana.mx/mexico-antiguo/el-sol-en-chichen-itza-y-dzibilchaltun-la-supuesta-importancia-de-los-equinoccios-en}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ancient [[Sumer]]ians believed that the Sun was [[Utu]],&amp;lt;ref name=BlackGreen1992&amp;gt;{{cite book |last1=Black |first1=Jeremy |first2=Anthony |last2=Green |title=Gods, Demons and Symbols of Ancient Mesopotamia: An Illustrated Dictionary |url=https://books.google.com/books?id=05LXAAAAMAAJ&amp;amp;q=Inana |publisher=The British Museum Press |year=1992 |isbn=978-0-7141-1705-8 |pages=182–184 |access-date=22 August 2020}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=Nemet1998&amp;gt;{{citation |last=Nemet-Nejat |first=Karen Rhea |year=1998 |title=Daily Life in Ancient Mesopotamia |publisher=Greenwood |isbn=978-0-313-29497-6 |page=[https://archive.org/details/dailylifeinancie00neme/page/203 203] |url=https://archive.org/details/dailylifeinancie00neme/page/203}}&amp;lt;/ref&amp;gt; the god of justice and twin brother of [[Inanna]], the [[Queen of Heaven (antiquity)|Queen of Heaven]].&amp;lt;ref name=BlackGreen1992 /&amp;gt; Later, Utu was identified with the [[East Semitic]] god [[Shamash]].&amp;lt;ref name=BlackGreen1992 /&amp;gt;&amp;lt;ref name=Nemet1998 /&amp;gt; Utu was regarded as a helper-deity, who aided those in distress.&amp;lt;ref name=BlackGreen1992 /&amp;gt;&lt;br /&gt;
[[File:Maler der Grabkammer der Nefertari 001.jpg|thumb|Ra from the [[tomb of Nefertari]], 13th&amp;amp;nbsp;century&amp;amp;nbsp;BC|alt=A painting of Ra and Nefertari]]&lt;br /&gt;
&lt;br /&gt;
From at least the [[Fourth Dynasty]] of Ancient Egypt, the Sun was worshipped as the [[Ra|god Ra]], portrayed as a falcon-headed divinity surmounted by the solar disk. In the [[New Kingdom of Egypt|New Empire]] period, the Sun became identified with the [[dung beetle]]. In the form of the sun disc [[Aten]], the Sun had a brief resurgence during the [[Amarna Period]] when it again became the preeminent, if not only, divinity for the Pharaoh [[Akhenaten]].&amp;lt;ref&amp;gt;{{cite book |last1=Teeter |first1=Emily |title=Religion and Ritual in Ancient Egypt |year=2011 |publisher=Cambridge University Press |location=New York |isbn=978-0-521-84855-8}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite book |last1=Frankfort |first1=Henri |title=Ancient Egyptian Religion: an Interpretation |year=2011 |publisher=Dover |isbn=978-0-486-41138-5}}&amp;lt;/ref&amp;gt; The Egyptians portrayed the god Ra as being carried across the sky in a solar barque, accompanied by lesser gods, and to the Greeks, he was Helios, carried by a chariot drawn by fiery horses. From the reign of [[Elagabalus]] in the [[Decline of the Roman Empire|late Roman Empire]] the Sun's birthday was a holiday celebrated as [[Sol Invictus]] (literally 'Unconquered Sun') soon after the winter solstice. The Sun appears from Earth to revolve once a year along the [[ecliptic]] through the [[zodiac]], and so Greek astronomers categorised it as one of the seven [[classical planets|planets]] (from Greek {{tlit|grc|planetes}}, 'wanderer'); the naming of the [[Names of the days of the week|days of the weeks]] after the seven planets dates to the [[Roman Empire|Roman era]].&amp;lt;ref name=&amp;quot;oed&amp;quot;&amp;gt;{{cite dictionary | last=Cresswell | first=Julia | dictionary=The Oxford Dictionary of Word Origins | publisher=Oxford University Press | date=2021 | isbn=978-0-19-886875-0 | doi=10.1093/acref/9780198868750.001.0001 |entry=planet}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;almagest&amp;quot;&amp;gt;{{Cite journal |first=Bernard R. |last=Goldstein |title=Saving the phenomena: the background to Ptolemy's planetary theory |journal=Journal for the History of Astronomy |volume=28 |issue=1 |year=1997 |pages=1–12 |bibcode=1997JHA....28....1G |doi=10.1177/002182869702800101 |s2cid=118875902}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite book |title=Ptolemy's Almagest |author=Ptolemy |last2=Toomer |first2=G. J. |publisher=Princeton University Press |year=1998 |isbn=978-0-691-00260-6}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In [[Proto-Indo-European religion]], the Sun was personified as the goddess {{PIE|[[Sun deity|*Seh&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;ul]]}}.&amp;lt;ref&amp;gt;{{cite encyclopedia |year=1997 |title=Encyclopedia of Indo-European Culture |editor1-last=Mallory |editor1-first=James P. |editor1-link=J. P. Mallory |editor2-last=Adams |editor2-first=Douglas Q. |editor2-link=Douglas Q. Adams |place=London |publisher=Routledge |id=(EIEC) |url=https://books.google.com/books?id=tzU3RIV2BWIC&amp;amp;q=Sun+goddess |isbn=978-1-884964-98-5 |access-date=20 October 2017}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=MALLORY129&amp;gt;{{cite book |last=Mallory |first=J. P. |year=1989 |title=In Search of the Indo-Europeans: Language, Archaeology and Myth |url=https://archive.org/details/insearchofindoeu00jpma |url-access=registration |page=[https://archive.org/details/insearchofindoeu00jpma/page/129 129] |publisher=[[Thames &amp;amp; Hudson]] |isbn=978-0-500-27616-7}}&amp;lt;/ref&amp;gt; Derivatives of this goddess in [[Indo-European languages]] include the [[Old Norse]] {{tlit|non|[[Sól (sun)|Sól]]}}, [[Sanskrit]] {{tlit|sa|[[Surya]]}}, [[Gaulish language|Gaulish]] {{tlit|xtg|[[Sulis]]}}, [[Lithuanian language|Lithuanian]] {{lang|lt|[[Saulė]]}}, and [[Slavic languages|Slavic]] {{tlit|sla|Solntse}}.&amp;lt;ref name=MALLORY129 /&amp;gt; In [[ancient Greek religion]], the sun deity was the male god Helios,&amp;lt;ref&amp;gt;{{cite web |title=Hesiod, ''Theogony'' line 371 |work=Perseus Digital Library |url=https://www.perseus.tufts.edu/hopper/text?doc=Perseus%3Atext%3A1999.01.0130%3Acard%3D371 |access-date=28 May 2024 |archive-url=https://web.archive.org/web/20210915222218/https://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:1999.01.0130:card%3D371 |date=15 September 2021 |archive-date=15 September 2021}}&amp;lt;/ref&amp;gt; who in later times was [[syncretism|syncretised]] with [[Apollo]].&amp;lt;ref&amp;gt;{{cite book |last=Burkert |first=Walter |author-link=Walter Burkert |year=1985 |title=Greek Religion |publisher=Harvard University Press |location=Cambridge |isbn=978-0-674-36281-9 |page=120}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In ancient Roman culture, [[Sunday]] was the day of the sun god. In paganism, the Sun was a source of life. It was the centre of a popular cult among Romans, who would stand at dawn to catch the first rays of sunshine as they prayed. The celebration of the [[winter solstice]] (which influenced Christmas) was part of the Roman cult of Sol Invictus. It was adopted as the [[Sabbath]] day by Christians. The symbol of light was a pagan device adopted by Christians, and perhaps the most important one that did not come from Jewish traditions. Christian churches were built so that the congregation faced toward the sunrise.&amp;lt;ref&amp;gt;{{cite book |first=Owen |last=Chadwick |title=A History of Christianity |url=https://books.google.com/books?id=qugouOh3KjMC&amp;amp;pg=PA22 |year=1998 |publisher=St. Martin's |page=22 |isbn=978-0-312-18723-1 |access-date=15 November 2015}}&amp;lt;/ref&amp;gt; In the [[Bible]], the [[Book of Malachi]] mentions the &amp;quot;Sun of Righteousness&amp;quot;, which some Christians have interpreted as a reference to the [[Messiah]] ([[Christ]]).&amp;lt;ref&amp;gt;{{cite book |last=Spargo |first=Emma Jane Marie |title=The Category of the Aesthetic in the Philosophy of Saint Bonaventure |url=https://books.google.com/books?id=SUkWAAAAMAAJ&amp;amp;q=sol+iustitiae+malachiae+IV+2&amp;amp;pg=PA86 |page=86 |year=1953 |publisher=The Franciscan Institute |location=St. Bonaventure, New York; E. Nauwelaerts, Louvain, Belgium; F. Schöningh, Paderborn, Germany}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Tonatiuh]], the Aztec god of the sun,&amp;lt;ref name=Townsend1979&amp;gt;{{cite book |title=State and Cosmos in the Art of Tenochtitlan |url=https://archive.org/details/statecosmosinart00town |access-date=28 May 2024 |url-access=registration |last=Townsend |first=Richard |publisher=Dumbarton Oaks |year=1979 |location=Washington, D.C. |page=[https://archive.org/details/statecosmosinart00town/page/66 66]}}&amp;lt;/ref&amp;gt; was closely associated with [[human sacrifice]].&amp;lt;ref name=Townsend1979 /&amp;gt; The sun goddess [[Amaterasu]] is the most important deity in the [[Shinto]] religion,&amp;lt;ref name=&amp;quot;Roberts 110&amp;quot;&amp;gt;{{cite book |last=Roberts |first=Jeremy |title=Japanese Mythology A To Z |location=New York |publisher=[[Chelsea House Publishers]] |year=2010 |edition=2nd |isbn=978-1-60413-435-3 |pages=4–5}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite book |last=Wheeler |first=Post |title=The Sacred Scriptures of the Japanese |location=New York |publisher=Henry Schuman |pages=393–395 |year=1952}}&amp;lt;/ref&amp;gt; and she is believed to be the direct ancestor of all [[List of Emperors of Japan|Japanese emperors]].&amp;lt;ref name=&amp;quot;Roberts 110&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
{{Portal|Astronomy|Stars|Solar System|Weather|Physics}}&lt;br /&gt;
{{div col|colwidth=30em}}&lt;br /&gt;
* {{Annotated link |Advanced Composition Explorer}}&lt;br /&gt;
* {{Annotated link |Analemma}}&lt;br /&gt;
* {{Annotated link |Antisolar point}}&lt;br /&gt;
* {{Annotated link |Faint young Sun paradox}}&lt;br /&gt;
* {{Annotated link |List of brightest stars}}&lt;br /&gt;
* {{Annotated link |List of nearest stars}}&lt;br /&gt;
* {{Annotated link |Midnight sun}}&lt;br /&gt;
* {{slink|Planets in astrology|Sun}}&lt;br /&gt;
* {{Annotated link |Solar telescope}}&lt;br /&gt;
* {{Annotated link |Sun path}}&lt;br /&gt;
* {{Annotated link |Sun-Earth Day}}&lt;br /&gt;
* [[Sun in fiction]]&lt;br /&gt;
* {{Annotated link |Timeline of the far future}}&lt;br /&gt;
{{div col end}}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
{{reflist|group=note}}&lt;br /&gt;
{{notelist&lt;br /&gt;
| notes =&lt;br /&gt;
{{efn&lt;br /&gt;
| name = heavy elements&lt;br /&gt;
| In [[astronomy|astronomical sciences]], the term ''heavy elements'' (or ''metals'') refers to all chemical elements except hydrogen and helium.&lt;br /&gt;
}}&lt;br /&gt;
{{efn&lt;br /&gt;
| name = particle density&lt;br /&gt;
| Earth's atmosphere near sea level has a particle density of about 2{{e|25}}&amp;amp;nbsp;m&amp;lt;sup&amp;gt;−3&amp;lt;/sup&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{efn&lt;br /&gt;
| name=rotation&lt;br /&gt;
| Counterclockwise is also the direction of revolution around the Sun for objects in the Solar System and is the direction of axial spin for most objects.&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
{{Library resources box&lt;br /&gt;
|by=no&lt;br /&gt;
|onlinebooksabout=yes&lt;br /&gt;
|others=&lt;br /&gt;
|about=yes&lt;br /&gt;
|label=Sun&lt;br /&gt;
|viaf= |lccn= |lcheading=Sun |wikititle=&lt;br /&gt;
}}&lt;br /&gt;
* {{Cite book |last=Cohen |first=Richard |url=https://books.google.com/books?id=rspEEVTcmIAC |title=Chasing the sun: the epic story of the star that gives us life |publisher=Random House |year=2010 |isbn=978-1-4000-6875-3 |location=New York, NY}}&lt;br /&gt;
* {{Cite encyclopedia |title=Solar activity |encyclopedia=[[Scholarpedia]] |url=http://www.scholarpedia.org/article/Solar_activity |last=Hudson |first=Hugh |date=2008 |volume=3 |issue=3 |page=3967 |bibcode=2008SchpJ...3.3967H |doi=10.4249/scholarpedia.3967 |issn=1941-6016 |doi-access=free}}&lt;br /&gt;
* {{Cite journal |last=Thompson |first=Michael J |date=August 2004 |title=Helioseismology and the Sun's interior |journal=[[Astronomy &amp;amp; Geophysics]] |volume=45 |issue=4 |pages=4.21–4.25 |bibcode=2004A&amp;amp;G....45d..21T |doi=10.1046/j.1468-4004.2003.45421.x |issn=1366-8781 |doi-access=free}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://www.astronomycast.com/astronomy/episode-30-the-sun-spots-and-all/ Astronomy Cast: The Sun]&lt;br /&gt;
* [http://www.acrim.com/ Satellite observations of solar luminosity] {{Webarchive|url=https://web.archive.org/web/20170611210135/http://acrim.com/ |date=11 June 2017 }}&lt;br /&gt;
* [https://www.youtube.com/watch?v=qpMRtvFD8ek&amp;amp;hl=fr Animation – The Future of the Sun]&lt;br /&gt;
* [https://www.youtube.com/watch?v=6tmbeLTHC_0 &amp;quot;Thermonuclear Art – The Sun In Ultra-HD&amp;quot;] | [[Goddard Space Flight Center]]&lt;br /&gt;
* [https://www.youtube.com/watch?v=l3QQQu7QLoM &amp;quot;A Decade of Sun&amp;quot;] | Goddard Space Flight Center&lt;br /&gt;
&lt;br /&gt;
== Source ==&lt;br /&gt;
&lt;br /&gt;
This page is an example adapted from the English Wikipedia. See its original content and credits:&lt;br /&gt;
&lt;br /&gt;
[[wikipedia:en:Special:PermaLink/1287676799]] at 21:06, 27 April 2025&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=103</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=103"/>
		<updated>2025-05-08T16:22:00Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Welcome in Minipedia demo ==&lt;br /&gt;
&lt;br /&gt;
Minipedia is a demo to realize a potential integration between Wikipedia, and a more simplified and reduced content (“mini”) version of it.&lt;br /&gt;
&lt;br /&gt;
== English ==&lt;br /&gt;
&lt;br /&gt;
* [[Sun]]&lt;br /&gt;
&lt;br /&gt;
== Italiano ==&lt;br /&gt;
Here are some standard test entries, imported from Wikipedia:&lt;br /&gt;
&lt;br /&gt;
* [[Regioni di formazione stellare di Cassiopea]]&lt;br /&gt;
* [[Quaternioni]]&lt;br /&gt;
* [[Minimo comune multiplo]]&lt;br /&gt;
* [[Moto circolare]]&lt;br /&gt;
* [[Tommaso d'Aquino]]&lt;br /&gt;
&lt;br /&gt;
The same articles are integrated into this Minipedia demo:&lt;br /&gt;
&lt;br /&gt;
→ '''[[Mini:Main Page|Enter Minipedia]]'''&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
; Questions about this website?&lt;br /&gt;
&lt;br /&gt;
* See https://etherpad.wikimedia.org/p/minipedia&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:Ilario Ilario Valdelli (WMCH)] (main project contact)&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:ValerioBoz-WMCH Valerio Bozz.] (developer, external consultant for WMCH)&lt;br /&gt;
&lt;br /&gt;
; Found a bug? Have an idea?&lt;br /&gt;
* see all bugs on WMCH-Minipedia on Wikimedia Phabricator&lt;br /&gt;
*:https://phabricator.wikimedia.org/tag/wmch-minipedia/ &lt;br /&gt;
* [https://phabricator.wikimedia.org/maniphest/task/edit/form/43/?tags=wmch-minipedia create a Bug report] on Wikimedia Phabricator&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Pagina_principale&amp;diff=102</id>
		<title>Mini:Pagina principale</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Pagina_principale&amp;diff=102"/>
		<updated>2025-05-08T16:07:49Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: Changed redirect target from Mini:Main page to Mini:Main Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Mini:Main Page]]&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Main_page&amp;diff=101</id>
		<title>Mini:Main page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Main_page&amp;diff=101"/>
		<updated>2025-05-08T16:07:39Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: Valerio Bozzolan moved page Mini:Main page to Mini:Main Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Mini:Main Page]]&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Main_Page&amp;diff=100</id>
		<title>Mini:Main Page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Main_Page&amp;diff=100"/>
		<updated>2025-05-08T16:07:39Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: Valerio Bozzolan moved page Mini:Main page to Mini:Main Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Benvenuti in Minipedia ==&lt;br /&gt;
&lt;br /&gt;
Voci di prova:&lt;br /&gt;
&lt;br /&gt;
* {{Minipedia|Regioni di formazione stellare di Cassiopea}}&lt;br /&gt;
* {{Minipedia|Quaternioni}}&lt;br /&gt;
* {{Minipedia|Minimo comune multiplo}}&lt;br /&gt;
* {{Minipedia|Moto circolare}}&lt;br /&gt;
* {{Minipedia|Tommaso d'Aquino}}&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=99</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=99"/>
		<updated>2025-05-08T16:07:21Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: English&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Welcome in Minipedia demo ==&lt;br /&gt;
&lt;br /&gt;
Minipedia is a demo to realize a potential integration between Wikipedia, and a more simplified and reduced content (“mini”) version of it.&lt;br /&gt;
&lt;br /&gt;
Here are some standard test entries, imported from Wikipedia:&lt;br /&gt;
&lt;br /&gt;
* [[Regioni di formazione stellare di Cassiopea]]&lt;br /&gt;
* [[Quaternioni]]&lt;br /&gt;
* [[Minimo comune multiplo]]&lt;br /&gt;
* [[Moto circolare]]&lt;br /&gt;
* [[Tommaso d'Aquino]]&lt;br /&gt;
&lt;br /&gt;
The same articles are integrated into this Minipedia demo:&lt;br /&gt;
&lt;br /&gt;
→ '''[[Mini:Main Page|Enter Minipedia]]'''&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
; Questions about this website?&lt;br /&gt;
&lt;br /&gt;
* See https://etherpad.wikimedia.org/p/minipedia&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:Ilario Ilario Valdelli (WMCH)] (main project contact)&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:ValerioBoz-WMCH Valerio Bozz.] (developer, external consultant for WMCH)&lt;br /&gt;
&lt;br /&gt;
; Found a bug? Have an idea?&lt;br /&gt;
* see all bugs on WMCH-Minipedia on Wikimedia Phabricator&lt;br /&gt;
*:https://phabricator.wikimedia.org/tag/wmch-minipedia/ &lt;br /&gt;
* [https://phabricator.wikimedia.org/maniphest/task/edit/form/43/?tags=wmch-minipedia create a Bug report] on Wikimedia Phabricator&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Pagina_principale&amp;diff=98</id>
		<title>Pagina principale</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Pagina_principale&amp;diff=98"/>
		<updated>2025-05-08T16:06:37Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: Changed redirect target from Main page to Main Page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Main Page]]&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=97</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=97"/>
		<updated>2025-05-08T16:06:22Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: Valerio Bozzolan moved page Main page to Main Page without leaving a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Benvenuti in Minipedia demo ==&lt;br /&gt;
&lt;br /&gt;
Minipedia è una demo per realizzare una potenziale integrazione fra Wikipedia, ed una sua versione più semplificata e dai contenuti ridotti (&amp;quot;mini&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Ecco alcune voci di prova standard, importati da Wikipedia:&lt;br /&gt;
&lt;br /&gt;
* [[Regioni di formazione stellare di Cassiopea]]&lt;br /&gt;
* [[Quaternioni]]&lt;br /&gt;
* [[Minimo comune multiplo]]&lt;br /&gt;
* [[Moto circolare]]&lt;br /&gt;
* [[Tommaso d'Aquino]]&lt;br /&gt;
&lt;br /&gt;
Le stesse voci sono integrate in questa demo di Minipedia:&lt;br /&gt;
&lt;br /&gt;
→ '''[[Mini:Pagina principale|Entra in Minipedia]]'''&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
; Questions about this website?&lt;br /&gt;
&lt;br /&gt;
* See https://etherpad.wikimedia.org/p/minipedia&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:Ilario Ilario Valdelli (WMCH)] (main project contact)&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:ValerioBoz-WMCH Valerio Bozz.] (developer, external consultant for WMCH)&lt;br /&gt;
&lt;br /&gt;
; Found a bug? Have an idea?&lt;br /&gt;
* see all bugs on WMCH-Minipedia on Wikimedia Phabricator&lt;br /&gt;
*:https://phabricator.wikimedia.org/tag/wmch-minipedia/ &lt;br /&gt;
* [https://phabricator.wikimedia.org/maniphest/task/edit/form/43/?tags=wmch-minipedia create a Bug report] on Wikimedia Phabricator&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Pagina_principale&amp;diff=96</id>
		<title>Pagina principale</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Pagina_principale&amp;diff=96"/>
		<updated>2025-05-08T16:06:08Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: Valerio Bozzolan moved page Pagina principale to Main page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Main page]]&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=95</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=95"/>
		<updated>2025-05-08T16:06:08Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: Valerio Bozzolan moved page Pagina principale to Main page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Benvenuti in Minipedia demo ==&lt;br /&gt;
&lt;br /&gt;
Minipedia è una demo per realizzare una potenziale integrazione fra Wikipedia, ed una sua versione più semplificata e dai contenuti ridotti (&amp;quot;mini&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Ecco alcune voci di prova standard, importati da Wikipedia:&lt;br /&gt;
&lt;br /&gt;
* [[Regioni di formazione stellare di Cassiopea]]&lt;br /&gt;
* [[Quaternioni]]&lt;br /&gt;
* [[Minimo comune multiplo]]&lt;br /&gt;
* [[Moto circolare]]&lt;br /&gt;
* [[Tommaso d'Aquino]]&lt;br /&gt;
&lt;br /&gt;
Le stesse voci sono integrate in questa demo di Minipedia:&lt;br /&gt;
&lt;br /&gt;
→ '''[[Mini:Pagina principale|Entra in Minipedia]]'''&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
; Questions about this website?&lt;br /&gt;
&lt;br /&gt;
* See https://etherpad.wikimedia.org/p/minipedia&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:Ilario Ilario Valdelli (WMCH)] (main project contact)&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:ValerioBoz-WMCH Valerio Bozz.] (developer, external consultant for WMCH)&lt;br /&gt;
&lt;br /&gt;
; Found a bug? Have an idea?&lt;br /&gt;
* see all bugs on WMCH-Minipedia on Wikimedia Phabricator&lt;br /&gt;
*:https://phabricator.wikimedia.org/tag/wmch-minipedia/ &lt;br /&gt;
* [https://phabricator.wikimedia.org/maniphest/task/edit/form/43/?tags=wmch-minipedia create a Bug report] on Wikimedia Phabricator&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Pagina_principale&amp;diff=94</id>
		<title>Mini:Pagina principale</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Pagina_principale&amp;diff=94"/>
		<updated>2025-05-08T16:05:56Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: Valerio Bozzolan moved page Mini:Pagina principale to Mini:Main page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Mini:Main page]]&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Main_Page&amp;diff=93</id>
		<title>Mini:Main Page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Main_Page&amp;diff=93"/>
		<updated>2025-05-08T16:05:56Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: Valerio Bozzolan moved page Mini:Pagina principale to Mini:Main page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Benvenuti in Minipedia ==&lt;br /&gt;
&lt;br /&gt;
Voci di prova:&lt;br /&gt;
&lt;br /&gt;
* {{Minipedia|Regioni di formazione stellare di Cassiopea}}&lt;br /&gt;
* {{Minipedia|Quaternioni}}&lt;br /&gt;
* {{Minipedia|Minimo comune multiplo}}&lt;br /&gt;
* {{Minipedia|Moto circolare}}&lt;br /&gt;
* {{Minipedia|Tommaso d'Aquino}}&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=92</id>
		<title>MediaWiki:Gadget-minipedia.js</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=92"/>
		<updated>2025-05-08T15:18:41Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: new tabs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/**&lt;br /&gt;
 * Make Minipedia magics&lt;br /&gt;
 *&lt;br /&gt;
 * Dependencies: mediawiki.util&lt;br /&gt;
 *&lt;br /&gt;
 * See https://phabricator.wikimedia.org/tag/minipedia/&lt;br /&gt;
 *&lt;br /&gt;
 * @revision 2020-06-27&lt;br /&gt;
 */&lt;br /&gt;
( function ( mw, $ ) {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * CONFIGURATION/LOCALIZATION INSTRUCTIONS&lt;br /&gt;
	 *&lt;br /&gt;
	 * Declare somewhere something like this:&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // assure that you do not overwrite other-people customizations&lt;br /&gt;
	 *   window.MiniPedia      = window.MiniPedia      || {};&lt;br /&gt;
	 *   window.MiniPedia.L10N = window.MiniPedia.L10N || {};&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // then customize something&lt;br /&gt;
 	 *   window.MiniPedia.editIntro      = 'Project:How to create';&lt;br /&gt;
	 *   window.MiniPedia.L10N.minipedia = 'Otherpedia';&lt;br /&gt;
	 */&lt;br /&gt;
&lt;br /&gt;
	// load localization defaults&lt;br /&gt;
	var DEFAULTS = {&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespace: 'Mini',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceNum: 3002,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediate: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediateNum: 3004,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvanced: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvancedNum: 3006,&lt;br /&gt;
&lt;br /&gt;
		// default edit intro page title&lt;br /&gt;
		editIntro: 'Progetto:Minipedia/Creazione voce',&lt;br /&gt;
&lt;br /&gt;
		// how much characters should have a word to be considered too much lon&lt;br /&gt;
		// this somehow help people with dyslexia&lt;br /&gt;
		longWordLen: 13,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of acceptable complex words to help people with dyslexia&lt;br /&gt;
		maxComplexWords: 10,&lt;br /&gt;
&lt;br /&gt;
		// min and max number of suggested words to somehow mitigate attention span problems&lt;br /&gt;
		maxWords: 700,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of suggested newlines&lt;br /&gt;
		maxTotalLines: 180,&lt;br /&gt;
&lt;br /&gt;
		// localization stuff&lt;br /&gt;
		L10N: {&lt;br /&gt;
			minipedia: &amp;quot;Minipedia&amp;quot;,&lt;br /&gt;
			minipediaShort: &amp;quot;Mini&amp;quot;,&lt;br /&gt;
			minipediaShortIntermediate: &amp;quot;Intermediate&amp;quot;,&lt;br /&gt;
			minipediaShortAdvanced: &amp;quot;Advanced&amp;quot;,&lt;br /&gt;
			normalpedia: &amp;quot;Wikipedia Test&amp;quot;,&lt;br /&gt;
			normalpediaShort: &amp;quot;WikipediaTest&amp;quot;,&lt;br /&gt;
			openMinipedia: &amp;quot;Apri Minipedia&amp;quot;,&lt;br /&gt;
			openMinipediaIntermediate: &amp;quot;Open Minipedia Intermediate&amp;quot;,&lt;br /&gt;
			openMinipediaAdvanced: &amp;quot;Open Minipedia Advanced&amp;quot;,&lt;br /&gt;
			openNormalpedia: &amp;quot;Apri Wikipedia Test&amp;quot;,&lt;br /&gt;
			createMinipediaPageTitle: &amp;quot;Accesso Minipedia&amp;quot;,&lt;br /&gt;
			createMinipediaPageBody: &amp;quot;Sii il primo a creare una versione più ridotta e più accessibile di questa voce, in Minipedia!&amp;quot;,&lt;br /&gt;
			statsTitle: &amp;quot;Mini Report&amp;quot;,&lt;br /&gt;
			statsHeadingSubject: &amp;quot;Fattore&amp;quot;,&lt;br /&gt;
			statsHeadingValue: &amp;quot;Valore attuale&amp;quot;,&lt;br /&gt;
			statsHeadingExpected: &amp;quot;Limite consigliato&amp;quot;,&lt;br /&gt;
			statsHeadingSimplicity: &amp;quot;Semplicità&amp;quot;,&lt;br /&gt;
			statsWords: &amp;quot;Parole&amp;quot;,&lt;br /&gt;
			statsLines: &amp;quot;Paragrafi&amp;quot;,&lt;br /&gt;
			statsComplexWords: &amp;quot;Parole complesse&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// global configuration&lt;br /&gt;
	window.MiniPedia = window.MiniPedia || {};&lt;br /&gt;
&lt;br /&gt;
	// shortcut&lt;br /&gt;
	var mp = window.MiniPedia;&lt;br /&gt;
&lt;br /&gt;
	// inherit default configurations&lt;br /&gt;
	$.extend( true, mp, DEFAULTS );&lt;br /&gt;
&lt;br /&gt;
	// another shortcut&lt;br /&gt;
	var L10N = mp.L10N;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Lazy shortcut to obtain just the first API result&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param  {Object} response API Response&lt;br /&gt;
	 * @return {Object} page object&lt;br /&gt;
	 */&lt;br /&gt;
	function justFirstQueryPage( response ) {&lt;br /&gt;
&lt;br /&gt;
		// no response no party&lt;br /&gt;
		if( !response.query || !response.query.pages ) {&lt;br /&gt;
			throw 'no valid API response';&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// the list should contain just one page&lt;br /&gt;
		var pages = response.query.pages;&lt;br /&gt;
		for( var id in pages ) {&lt;br /&gt;
			return pages[ id ];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// no page no party&lt;br /&gt;
		return false;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get a fresh MediaWiki API object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return mw.Api&lt;br /&gt;
	 */&lt;br /&gt;
	function mwApi() {&lt;br /&gt;
		return mw.loader.using( 'mediawiki.api' ).then( function() {&lt;br /&gt;
			return new mw.Api();&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if a page title already exists&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param title Page title&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function pageExists( title ) {&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'info',&lt;br /&gt;
			titles: title,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// eventually load API stuff&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request			&lt;br /&gt;
			return api.get( request ).then( function ( response ) {&lt;br /&gt;
&lt;br /&gt;
				// check if it exists&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 ) {&lt;br /&gt;
					return page;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				return false;&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query the current page plain text&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page name (or none for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryPlainText( pageName ) {&lt;br /&gt;
&lt;br /&gt;
		// complete page title with namespace&lt;br /&gt;
		pageName = pageName || mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		// See https://phabricator.wikimedia.org/T259332&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'extracts',&lt;br /&gt;
			titles: pageName,&lt;br /&gt;
			explaintext: 1,&lt;br /&gt;
			exlimit: 1,&lt;br /&gt;
			exsectionformat: 'plain',&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// this will return a Promise resolving the page plain text, returned upstream&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request and return a Promise&lt;br /&gt;
			return api.get( request ).then( function( response ) {&lt;br /&gt;
		&lt;br /&gt;
				// resolve the Promise with the page content&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 &amp;amp;&amp;amp; page.extract ) {&lt;br /&gt;
					return page.extract; &lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// no content&lt;br /&gt;
				return false;&lt;br /&gt;
				&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the wiki&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareNormalpedia() {&lt;br /&gt;
	&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Minipedia title object&lt;br /&gt;
		var miniTitleObject = new mw.Title( pageName,  mp.namespaceNum );&lt;br /&gt;
		var miniTitleObjectIntermediate = new mw.Title( pageName,  mp.namespaceIntermediateNum );&lt;br /&gt;
		var miniTitleObjectAdvanced = new mw.Title( pageName,  mp.namespaceAdvancedNum );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var miniPageName = miniTitleObject.getPrefixedText();&lt;br /&gt;
		var miniPageNameIntermediate = miniTitleObjectIntermediate.getPrefixedText();&lt;br /&gt;
		var miniPageNameAdvanced = miniTitleObjectAdvanced.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var miniPageUrl = miniTitleObject.getUrl();&lt;br /&gt;
		var miniPageUrlIntermediate = miniTitleObjectIntermediate.getUrl();&lt;br /&gt;
		var miniPageUrlAdvanced = miniTitleObjectAdvanced.getUrl();&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Go to the Minipedia page in edit mode&lt;br /&gt;
		 *&lt;br /&gt;
		 * The page in the main namespace will be preloaded.&lt;br /&gt;
		 &lt;br /&gt;
		 */&lt;br /&gt;
		function goToMinipediaEditPage() {&lt;br /&gt;
&lt;br /&gt;
			/**&lt;br /&gt;
			 * Build the query string to edit a page&lt;br /&gt;
			 *&lt;br /&gt;
			 * TODO: eventually add VisualEditor support&lt;br /&gt;
			 */&lt;br /&gt;
			var editPageQueryString = {&lt;br /&gt;
				action: 'edit',&lt;br /&gt;
				title: miniPageName,&lt;br /&gt;
				preload: pageName,&lt;br /&gt;
				editintro: mp.editIntro,			&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			// '/index.php'&lt;br /&gt;
			var wgScript = mw.config.get( 'wgScript' );&lt;br /&gt;
&lt;br /&gt;
			// go to the edit page URL&lt;br /&gt;
			window.location = wgScript + '?' + $.param( editPageQueryString );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var miniVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			miniPageUrl,&lt;br /&gt;
			L10N.minipediaShort,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			L10N.openMinipedia,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Intermediate&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkIntermediate = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			miniPageUrlIntermediate,&lt;br /&gt;
			L10N.minipediaShortIntermediate,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			L10N.openMinipediaIntermediate,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Intermediate&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkAdvanced = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			miniPageUrlAdvanced,&lt;br /&gt;
			L10N.minipediaShortAdvanced,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			L10N.openMinipediaAdvanced,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// on the mini toolback click, check if a mini version exists&lt;br /&gt;
		$( miniVersionPortletLink ).click( function( e ) {&lt;br /&gt;
		&lt;br /&gt;
			// wait for multiple information&lt;br /&gt;
			$.when(&lt;br /&gt;
				// check if the page really exists&lt;br /&gt;
				pageExists( miniPageName ),&lt;br /&gt;
&lt;br /&gt;
				// allow to open OO UI windows&lt;br /&gt;
				mw.loader.using( 'oojs-ui-windows' )&lt;br /&gt;
&lt;br /&gt;
			// callback fired when we have all the information&lt;br /&gt;
			).done( function( miniPageExists, loader ) {&lt;br /&gt;
&lt;br /&gt;
				// check if the page already exist&lt;br /&gt;
				if( miniPageExists ) {&lt;br /&gt;
&lt;br /&gt;
					// just redirect to the Minipedia version&lt;br /&gt;
					window.location = miniPageUrl;&lt;br /&gt;
				} else {&lt;br /&gt;
&lt;br /&gt;
					// ask if you want to create the page&lt;br /&gt;
&lt;br /&gt;
					// create message dialog window&lt;br /&gt;
					var messageDialog = new OO.ui.MessageDialog();&lt;br /&gt;
					var windowManager = new OO.ui.WindowManager();&lt;br /&gt;
					$( 'body' ).append( windowManager.$element );&lt;br /&gt;
					windowManager.addWindows( [ messageDialog ] );&lt;br /&gt;
&lt;br /&gt;
					// configure and open dialog&lt;br /&gt;
					var windowInstance = windowManager.openWindow( messageDialog, {&lt;br /&gt;
						title:   L10N.createMinipediaPageTitle,&lt;br /&gt;
						message: L10N.createMinipediaPageBody,&lt;br /&gt;
					} );&lt;br /&gt;
&lt;br /&gt;
					// check if you accepted the page creation&lt;br /&gt;
					windowInstance.closed.then( function ( data ) {&lt;br /&gt;
&lt;br /&gt;
						// user is confirming the action&lt;br /&gt;
						if( data.action === 'accept' ) {&lt;br /&gt;
&lt;br /&gt;
							// go go go! to mini&lt;br /&gt;
							goToMinipediaEditPage();&lt;br /&gt;
						}&lt;br /&gt;
					} );&lt;br /&gt;
&lt;br /&gt;
				}&lt;br /&gt;
				// end if page exists&lt;br /&gt;
&lt;br /&gt;
			} );&lt;br /&gt;
			// end $.when()&lt;br /&gt;
&lt;br /&gt;
			// avoid scrolling to the top&lt;br /&gt;
			e.preventDefault();&lt;br /&gt;
&lt;br /&gt;
		} );&lt;br /&gt;
		// end $( miniVersionPortletLink ).click&lt;br /&gt;
&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareNormalWiki()&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Calculate some stats over a text&lt;br /&gt;
	 */&lt;br /&gt;
	function textStats( text ) {&lt;br /&gt;
&lt;br /&gt;
		var stats = {};&lt;br /&gt;
&lt;br /&gt;
		text = text.trim();&lt;br /&gt;
&lt;br /&gt;
		// count long words&lt;br /&gt;
		var totalLongWords = 0;&lt;br /&gt;
		var word, words = text.split( /\s+/ );&lt;br /&gt;
		for( var i = 0; i &amp;lt; words.length; i++ ) {&lt;br /&gt;
			word = words[i];&lt;br /&gt;
			if( word.length &amp;gt; mp.longWordLen ) {&lt;br /&gt;
				totalLongWords++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// total amount of paragraphs&lt;br /&gt;
		// paragraphs shorter than this comment are discarded&lt;br /&gt;
		var totalLines = 0;&lt;br /&gt;
		var paragraphs = text.split( /\n+/ );&lt;br /&gt;
		var paragraph;&lt;br /&gt;
		for( var i = 0; i &amp;lt; paragraphs.length; i++ ) {&lt;br /&gt;
			paragraph = paragraphs[i].trim();&lt;br /&gt;
			if( paragraph.length &amp;gt; 30 ) {&lt;br /&gt;
				totalLines++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// how much lines?&lt;br /&gt;
		stats.totalLines = totalLines;&lt;br /&gt;
&lt;br /&gt;
		// how much words?&lt;br /&gt;
		stats.totalWords = words.length;&lt;br /&gt;
&lt;br /&gt;
		// how much of these words are so much long?&lt;br /&gt;
		// See 'longWordLen'&lt;br /&gt;
		stats.totalLongWords = totalLongWords;&lt;br /&gt;
&lt;br /&gt;
		return stats;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query content stats of the current page&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page title (or nothing for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryContentStats( pageTitle ) {&lt;br /&gt;
		return queryPlainText( pageTitle ).then( textStats );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Apply a stupid percentage&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {int} a&lt;br /&gt;
	 * @param {int} b&lt;br /&gt;
	 * @return The 'b%' applied to 'a'&lt;br /&gt;
	 */&lt;br /&gt;
	function applyPercentage( a, b ) {&lt;br /&gt;
		return parseInt( a * b / 100 );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia stats box&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipediaStatsBox() {&lt;br /&gt;
&lt;br /&gt;
		// normal page title (non-mini version)&lt;br /&gt;
		var mainPageTitle = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// body container&lt;br /&gt;
		var $contentText = $( '#mw-content-text' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the DOM tree&lt;br /&gt;
		var $container = $( '&amp;lt;div&amp;gt;' );&lt;br /&gt;
		var $table = $( '&amp;lt;table&amp;gt;' );&lt;br /&gt;
		var $thead = $( '&amp;lt;thead&amp;gt;' );&lt;br /&gt;
		var $tbody = $( '&amp;lt;tbody&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the stats container&lt;br /&gt;
		$container.addClass( 'minipedia-stats' );&lt;br /&gt;
&lt;br /&gt;
		// put a title&lt;br /&gt;
		$container.append( $( '&amp;lt;h2&amp;gt;' ).text( L10N.statsTitle ) );&lt;br /&gt;
&lt;br /&gt;
		// put the table&lt;br /&gt;
		$container.append( $table );&lt;br /&gt;
&lt;br /&gt;
		// add table headers&lt;br /&gt;
		$thead.append(&lt;br /&gt;
			$( '&amp;lt;tr&amp;gt;' ).append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSubject    ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingValue      ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingExpected   ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSimplicity ) )&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// prepare the table&lt;br /&gt;
		$table.addClass( 'wikitable' )&lt;br /&gt;
		      .append( $thead )&lt;br /&gt;
		      .append( $tbody );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Append a row (with a label and a value) into a table&lt;br /&gt;
		 *&lt;br /&gt;
		 * The data argument accepts an object with:&lt;br /&gt;
		 *&lt;br /&gt;
		 *   className:        Class name for the row&lt;br /&gt;
		 *   label:            Text displayed in row heading (left)&lt;br /&gt;
		 *   text:             Text displayed in row data (right)&lt;br /&gt;
		 *   value             Value associated to the text of the mini version&lt;br /&gt;
		 *   maxValue          Maximum suggested value&lt;br /&gt;
		 *   upstreamValue     The value of the upstream (main) version&lt;br /&gt;
		 *   upstreamLimitPerc The percentage (0-100) applied to the 'upstreamValue' to inherit a suitable 'maxValue'&lt;br /&gt;
		 *&lt;br /&gt;
		 * Note: this function uses OOUI widgets. Make sure to have them loaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 * @param {Object} jQuery table&lt;br /&gt;
		 * @param {Object} Data information&lt;br /&gt;
		 */&lt;br /&gt;
		function appendTableStatsRow( $table, data ) {&lt;br /&gt;
&lt;br /&gt;
			// read arguments&lt;br /&gt;
			var className = data.className;&lt;br /&gt;
			var label     = data.label;&lt;br /&gt;
			var value     = data.value;&lt;br /&gt;
			var maxValue  = data.maxValue;&lt;br /&gt;
			var text      = data.text || value;&lt;br /&gt;
&lt;br /&gt;
			// eventually calculate the max value&lt;br /&gt;
			if( !maxValue &amp;amp;&amp;amp; data.upstreamValue &amp;amp;&amp;amp; data.upstreamLimitPerc ) {&lt;br /&gt;
				maxValue = applyPercentage( data.upstreamValue, data.upstreamLimitPerc );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// prepare table stats row&lt;br /&gt;
			var $tr         = $( '&amp;lt;tr&amp;gt;' );&lt;br /&gt;
			var $tdLabel    = $( '&amp;lt;td&amp;gt;' ).text( label    );&lt;br /&gt;
			var $tdValue    = $( '&amp;lt;td&amp;gt;' ).text( text     );&lt;br /&gt;
			var $tdMax      = $( '&amp;lt;td&amp;gt;' ).text( maxValue );&lt;br /&gt;
			var $tdProgress = $( '&amp;lt;td&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
			// build the table row&lt;br /&gt;
			$tr.addClass( 'minipedia-stats-row-' + className );&lt;br /&gt;
			$tr.append( $tdLabel    )&lt;br /&gt;
			   .append( $tdValue    )&lt;br /&gt;
			   .append( $tdMax      )&lt;br /&gt;
			   .append( $tdProgress );&lt;br /&gt;
&lt;br /&gt;
			// if possible, plot a cute progress bar&lt;br /&gt;
			if( maxValue ) {&lt;br /&gt;
&lt;br /&gt;
				// calculate a 0-100 progress since the value and maxValue&lt;br /&gt;
				var realPercentage = parseInt( value / maxValue * 100 );&lt;br /&gt;
&lt;br /&gt;
				/**&lt;br /&gt;
				 * Calculate the inverse percentage&lt;br /&gt;
				 *&lt;br /&gt;
				 * This is the final percentage shown to the user.&lt;br /&gt;
				 *&lt;br /&gt;
				 * In short, it's always 100% but if you go over&lt;br /&gt;
				 * the limit it start decreasing and reaching zero,&lt;br /&gt;
				 * to rappresent a kind of 'understanding degradation'.&lt;br /&gt;
				 *&lt;br /&gt;
				 * To do not underrate the work of the user it should not go&lt;br /&gt;
				 * below a certain minimum amount. Example: 10%. :^)&lt;br /&gt;
				 *&lt;br /&gt;
				 * Actually the function is just linear.&lt;br /&gt;
				 */&lt;br /&gt;
				var inversePercentage = 100;&lt;br /&gt;
				if( realPercentage &amp;gt; 100 ) {&lt;br /&gt;
					inversePercentage = Math.max( 10, 200 - realPercentage );&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// generate the progress bar&lt;br /&gt;
				var progressBar = new OO.ui.ProgressBarWidget( {&lt;br /&gt;
					progress: inversePercentage,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// show the progress bar&lt;br /&gt;
				$tdProgress.append( progressBar.$element );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// attach some data to be read by scripts&lt;br /&gt;
			$tr.data( 'ministats', data );&lt;br /&gt;
&lt;br /&gt;
			// eventually emphasize if something is wrong&lt;br /&gt;
			if( value &amp;amp;&amp;amp; maxValue &amp;amp;&amp;amp; value &amp;gt; maxValue ) {&lt;br /&gt;
				$tr.addClass( 'minipedia-stats-row-problem' );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// show the row in the stats table&lt;br /&gt;
			$table.append( $tr );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// request multiple stuff at the same time&lt;br /&gt;
		$.when(&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the current mini page&lt;br /&gt;
			queryContentStats(),&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the related non-mini page&lt;br /&gt;
			queryContentStats( mainPageTitle ),&lt;br /&gt;
&lt;br /&gt;
			// require the progress bar widget&lt;br /&gt;
			mw.loader.using( 'oojs-ui-widgets' )&lt;br /&gt;
&lt;br /&gt;
		// callback fired when we have all the information&lt;br /&gt;
		).done( function( statsMini, statsMain, mwLoader ) {&lt;br /&gt;
&lt;br /&gt;
			// show the stats container at the bottom of the page when we have something&lt;br /&gt;
			$contentText.append( $container );&lt;br /&gt;
&lt;br /&gt;
			// check if we have also some information from the main namespace&lt;br /&gt;
			// in this case we can do a comparison&lt;br /&gt;
			if( statsMain ) {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they can be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'long-words',&lt;br /&gt;
					label:             L10N.statsComplexWords,&lt;br /&gt;
					value:             statsMini.totalLongWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalLongWords,&lt;br /&gt;
					upstreamLimitPerc: 10,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'words',&lt;br /&gt;
					label:             L10N.statsWords,&lt;br /&gt;
					value:             statsMini.totalWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalWords,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'lines',&lt;br /&gt;
					label:             L10N.statsLines,&lt;br /&gt;
					value:             statsMini.totalLines,&lt;br /&gt;
					maxValue:          statsMain.totalLines,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );	&lt;br /&gt;
&lt;br /&gt;
			// there is no the related main page&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they cannot be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'long-words',&lt;br /&gt;
					label:     L10N.statsComplexWords,&lt;br /&gt;
					value:     statsMini.totalLongWords,&lt;br /&gt;
					maxValue:  mp.maxComplexWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'words',&lt;br /&gt;
					label:     L10N.statsWords,&lt;br /&gt;
					value:     statsMini.totalWords,&lt;br /&gt;
					maxValue:  mp.maxStatsWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'lines',&lt;br /&gt;
					label:      L10N.statsLines,&lt;br /&gt;
					value:      statsMini.totalLines,&lt;br /&gt;
					maxValue:   mp.maxTotalLines,&lt;br /&gt;
				} );&lt;br /&gt;
			}&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia namespace&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipedia() {&lt;br /&gt;
&lt;br /&gt;
		// action of the page (edit, view etc.)&lt;br /&gt;
		var action = mw.config.get( 'wgAction' );&lt;br /&gt;
&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Normalpedia title object&lt;br /&gt;
		var normalTitleObject = new mw.Title( pageName );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var normalPageName = normalTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var normalPageUrl = normalTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var normalVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			normalPageUrl,&lt;br /&gt;
			L10N.normalpediaShort,&lt;br /&gt;
			'ca-normalpedia',&lt;br /&gt;
			L10N.openNormalpedia&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// check if we are in view mode&lt;br /&gt;
		if( action === 'view' ) {&lt;br /&gt;
&lt;br /&gt;
			// in view mode we can fetch the stats&lt;br /&gt;
			prepareMinipediaStatsBox();&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareMinipedia()&lt;br /&gt;
&lt;br /&gt;
	// work only in the main namespace&lt;br /&gt;
	var ns = mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	if( ns === 0 ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
	} else if( ns == mp.namespaceNum ) {&lt;br /&gt;
		prepareMinipedia();&lt;br /&gt;
	}&lt;br /&gt;
	// end namespace zero check&lt;br /&gt;
&lt;br /&gt;
} )( mw, $ );&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=91</id>
		<title>MediaWiki:Gadget-minipedia.js</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=91"/>
		<updated>2025-05-08T15:13:36Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: fix jQuery, add advanced tab&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/**&lt;br /&gt;
 * Make Minipedia magics&lt;br /&gt;
 *&lt;br /&gt;
 * Dependencies: mediawiki.util&lt;br /&gt;
 *&lt;br /&gt;
 * See https://phabricator.wikimedia.org/tag/minipedia/&lt;br /&gt;
 *&lt;br /&gt;
 * @revision 2020-06-27&lt;br /&gt;
 */&lt;br /&gt;
( function ( mw, $ ) {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * CONFIGURATION/LOCALIZATION INSTRUCTIONS&lt;br /&gt;
	 *&lt;br /&gt;
	 * Declare somewhere something like this:&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // assure that you do not overwrite other-people customizations&lt;br /&gt;
	 *   window.MiniPedia      = window.MiniPedia      || {};&lt;br /&gt;
	 *   window.MiniPedia.L10N = window.MiniPedia.L10N || {};&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // then customize something&lt;br /&gt;
 	 *   window.MiniPedia.editIntro      = 'Project:How to create';&lt;br /&gt;
	 *   window.MiniPedia.L10N.minipedia = 'Otherpedia';&lt;br /&gt;
	 */&lt;br /&gt;
&lt;br /&gt;
	// load localization defaults&lt;br /&gt;
	var DEFAULTS = {&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespace: 'Mini',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceNum: 3002,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediate: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceIntermediateNum: 3004,&lt;br /&gt;
&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvanced: 'Intermediate',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceAdvancedNum: 3005,&lt;br /&gt;
&lt;br /&gt;
		// default edit intro page title&lt;br /&gt;
		editIntro: 'Progetto:Minipedia/Creazione voce',&lt;br /&gt;
&lt;br /&gt;
		// how much characters should have a word to be considered too much lon&lt;br /&gt;
		// this somehow help people with dyslexia&lt;br /&gt;
		longWordLen: 13,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of acceptable complex words to help people with dyslexia&lt;br /&gt;
		maxComplexWords: 10,&lt;br /&gt;
&lt;br /&gt;
		// min and max number of suggested words to somehow mitigate attention span problems&lt;br /&gt;
		maxWords: 700,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of suggested newlines&lt;br /&gt;
		maxTotalLines: 180,&lt;br /&gt;
&lt;br /&gt;
		// localization stuff&lt;br /&gt;
		L10N: {&lt;br /&gt;
			minipedia: &amp;quot;Minipedia&amp;quot;,&lt;br /&gt;
			minipediaShort: &amp;quot;Mini&amp;quot;,&lt;br /&gt;
			minipediaShortIntermediate: &amp;quot;Intermediate&amp;quot;,&lt;br /&gt;
			minipediaShortAdvanced: &amp;quot;Advanced&amp;quot;,&lt;br /&gt;
			normalpedia: &amp;quot;Wikipedia Test&amp;quot;,&lt;br /&gt;
			normalpediaShort: &amp;quot;WikipediaTest&amp;quot;,&lt;br /&gt;
			openMinipedia: &amp;quot;Apri Minipedia&amp;quot;,&lt;br /&gt;
			openMinipediaIntermediate: &amp;quot;Open Minipedia Intermediate&amp;quot;,&lt;br /&gt;
			openMinipediaAdvanced: &amp;quot;Open Minipedia Advanced&amp;quot;,&lt;br /&gt;
			openNormalpedia: &amp;quot;Apri Wikipedia Test&amp;quot;,&lt;br /&gt;
			createMinipediaPageTitle: &amp;quot;Accesso Minipedia&amp;quot;,&lt;br /&gt;
			createMinipediaPageBody: &amp;quot;Sii il primo a creare una versione più ridotta e più accessibile di questa voce, in Minipedia!&amp;quot;,&lt;br /&gt;
			statsTitle: &amp;quot;Mini Report&amp;quot;,&lt;br /&gt;
			statsHeadingSubject: &amp;quot;Fattore&amp;quot;,&lt;br /&gt;
			statsHeadingValue: &amp;quot;Valore attuale&amp;quot;,&lt;br /&gt;
			statsHeadingExpected: &amp;quot;Limite consigliato&amp;quot;,&lt;br /&gt;
			statsHeadingSimplicity: &amp;quot;Semplicità&amp;quot;,&lt;br /&gt;
			statsWords: &amp;quot;Parole&amp;quot;,&lt;br /&gt;
			statsLines: &amp;quot;Paragrafi&amp;quot;,&lt;br /&gt;
			statsComplexWords: &amp;quot;Parole complesse&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// global configuration&lt;br /&gt;
	window.MiniPedia = window.MiniPedia || {};&lt;br /&gt;
&lt;br /&gt;
	// shortcut&lt;br /&gt;
	var mp = window.MiniPedia;&lt;br /&gt;
&lt;br /&gt;
	// inherit default configurations&lt;br /&gt;
	$.extend( true, mp, DEFAULTS );&lt;br /&gt;
&lt;br /&gt;
	// another shortcut&lt;br /&gt;
	var L10N = mp.L10N;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Lazy shortcut to obtain just the first API result&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param  {Object} response API Response&lt;br /&gt;
	 * @return {Object} page object&lt;br /&gt;
	 */&lt;br /&gt;
	function justFirstQueryPage( response ) {&lt;br /&gt;
&lt;br /&gt;
		// no response no party&lt;br /&gt;
		if( !response.query || !response.query.pages ) {&lt;br /&gt;
			throw 'no valid API response';&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// the list should contain just one page&lt;br /&gt;
		var pages = response.query.pages;&lt;br /&gt;
		for( var id in pages ) {&lt;br /&gt;
			return pages[ id ];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// no page no party&lt;br /&gt;
		return false;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get a fresh MediaWiki API object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return mw.Api&lt;br /&gt;
	 */&lt;br /&gt;
	function mwApi() {&lt;br /&gt;
		return mw.loader.using( 'mediawiki.api' ).then( function() {&lt;br /&gt;
			return new mw.Api();&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if a page title already exists&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param title Page title&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function pageExists( title ) {&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'info',&lt;br /&gt;
			titles: title,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// eventually load API stuff&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request			&lt;br /&gt;
			return api.get( request ).then( function ( response ) {&lt;br /&gt;
&lt;br /&gt;
				// check if it exists&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 ) {&lt;br /&gt;
					return page;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				return false;&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query the current page plain text&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page name (or none for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryPlainText( pageName ) {&lt;br /&gt;
&lt;br /&gt;
		// complete page title with namespace&lt;br /&gt;
		pageName = pageName || mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		// See https://phabricator.wikimedia.org/T259332&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'extracts',&lt;br /&gt;
			titles: pageName,&lt;br /&gt;
			explaintext: 1,&lt;br /&gt;
			exlimit: 1,&lt;br /&gt;
			exsectionformat: 'plain',&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// this will return a Promise resolving the page plain text, returned upstream&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request and return a Promise&lt;br /&gt;
			return api.get( request ).then( function( response ) {&lt;br /&gt;
		&lt;br /&gt;
				// resolve the Promise with the page content&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 &amp;amp;&amp;amp; page.extract ) {&lt;br /&gt;
					return page.extract; &lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// no content&lt;br /&gt;
				return false;&lt;br /&gt;
				&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the wiki&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareNormalpedia() {&lt;br /&gt;
	&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Minipedia title object&lt;br /&gt;
		var miniTitleObject = new mw.Title( pageName,  mp.namespaceNum );&lt;br /&gt;
		var miniTitleObjectIntermediate = new mw.Title( pageName,  mp.namespaceIntermediateNum );&lt;br /&gt;
		var miniTitleObjectAdvanced = new mw.Title( pageName,  mp.namespaceAdvancedNum );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var miniPageName = miniTitleObject.getPrefixedText();&lt;br /&gt;
		var miniPageNameIntermediate = miniTitleObjectIntermediate.getPrefixedText();&lt;br /&gt;
		var miniPageNameAdvanced = miniTitleObjectAdvanced.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var miniPageUrl = miniTitleObject.getUrl();&lt;br /&gt;
		var miniPageUrlIntermediate = miniTitleObjectIntermediate.getUrl();&lt;br /&gt;
		var miniPageUrlAdvanced = miniTitleObjectAdvanced.getUrl();&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Go to the Minipedia page in edit mode&lt;br /&gt;
		 *&lt;br /&gt;
		 * The page in the main namespace will be preloaded.&lt;br /&gt;
		 &lt;br /&gt;
		 */&lt;br /&gt;
		function goToMinipediaEditPage() {&lt;br /&gt;
&lt;br /&gt;
			/**&lt;br /&gt;
			 * Build the query string to edit a page&lt;br /&gt;
			 *&lt;br /&gt;
			 * TODO: eventually add VisualEditor support&lt;br /&gt;
			 */&lt;br /&gt;
			var editPageQueryString = {&lt;br /&gt;
				action: 'edit',&lt;br /&gt;
				title: miniPageName,&lt;br /&gt;
				preload: pageName,&lt;br /&gt;
				editintro: mp.editIntro,			&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			// '/index.php'&lt;br /&gt;
			var wgScript = mw.config.get( 'wgScript' );&lt;br /&gt;
&lt;br /&gt;
			// go to the edit page URL&lt;br /&gt;
			window.location = wgScript + '?' + $.param( editPageQueryString );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var miniVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			miniPageUrl,&lt;br /&gt;
			L10N.minipediaShort,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			L10N.openMinipedia,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Intermediate&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkIntermediate = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			miniPageUrlIntermediate,&lt;br /&gt;
			L10N.minipediaShort,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			L10N.openMinipediaIntermediate,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia Intermediate&amp;quot;&lt;br /&gt;
		var miniVersionPortletLinkAdvanced = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			miniPageUrlAdvanced,&lt;br /&gt;
			L10N.minipediaShort,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			L10N.openMinipediaAdvanced,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// on the mini toolback click, check if a mini version exists&lt;br /&gt;
		$( miniVersionPortletLink ).click( function( e ) {&lt;br /&gt;
		&lt;br /&gt;
			// wait for multiple information&lt;br /&gt;
			$.when(&lt;br /&gt;
				// check if the page really exists&lt;br /&gt;
				pageExists( miniPageName ),&lt;br /&gt;
&lt;br /&gt;
				// allow to open OO UI windows&lt;br /&gt;
				mw.loader.using( 'oojs-ui-windows' )&lt;br /&gt;
&lt;br /&gt;
			// callback fired when we have all the information&lt;br /&gt;
			).done( function( miniPageExists, loader ) {&lt;br /&gt;
&lt;br /&gt;
				// check if the page already exist&lt;br /&gt;
				if( miniPageExists ) {&lt;br /&gt;
&lt;br /&gt;
					// just redirect to the Minipedia version&lt;br /&gt;
					window.location = miniPageUrl;&lt;br /&gt;
				} else {&lt;br /&gt;
&lt;br /&gt;
					// ask if you want to create the page&lt;br /&gt;
&lt;br /&gt;
					// create message dialog window&lt;br /&gt;
					var messageDialog = new OO.ui.MessageDialog();&lt;br /&gt;
					var windowManager = new OO.ui.WindowManager();&lt;br /&gt;
					$( 'body' ).append( windowManager.$element );&lt;br /&gt;
					windowManager.addWindows( [ messageDialog ] );&lt;br /&gt;
&lt;br /&gt;
					// configure and open dialog&lt;br /&gt;
					var windowInstance = windowManager.openWindow( messageDialog, {&lt;br /&gt;
						title:   L10N.createMinipediaPageTitle,&lt;br /&gt;
						message: L10N.createMinipediaPageBody,&lt;br /&gt;
					} );&lt;br /&gt;
&lt;br /&gt;
					// check if you accepted the page creation&lt;br /&gt;
					windowInstance.closed.then( function ( data ) {&lt;br /&gt;
&lt;br /&gt;
						// user is confirming the action&lt;br /&gt;
						if( data.action === 'accept' ) {&lt;br /&gt;
&lt;br /&gt;
							// go go go! to mini&lt;br /&gt;
							goToMinipediaEditPage();&lt;br /&gt;
						}&lt;br /&gt;
					} );&lt;br /&gt;
&lt;br /&gt;
				}&lt;br /&gt;
				// end if page exists&lt;br /&gt;
&lt;br /&gt;
			} );&lt;br /&gt;
			// end $.when()&lt;br /&gt;
&lt;br /&gt;
			// avoid scrolling to the top&lt;br /&gt;
			e.preventDefault();&lt;br /&gt;
&lt;br /&gt;
		} );&lt;br /&gt;
		// end $( miniVersionPortletLink ).click&lt;br /&gt;
&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareNormalWiki()&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Calculate some stats over a text&lt;br /&gt;
	 */&lt;br /&gt;
	function textStats( text ) {&lt;br /&gt;
&lt;br /&gt;
		var stats = {};&lt;br /&gt;
&lt;br /&gt;
		text = text.trim();&lt;br /&gt;
&lt;br /&gt;
		// count long words&lt;br /&gt;
		var totalLongWords = 0;&lt;br /&gt;
		var word, words = text.split( /\s+/ );&lt;br /&gt;
		for( var i = 0; i &amp;lt; words.length; i++ ) {&lt;br /&gt;
			word = words[i];&lt;br /&gt;
			if( word.length &amp;gt; mp.longWordLen ) {&lt;br /&gt;
				totalLongWords++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// total amount of paragraphs&lt;br /&gt;
		// paragraphs shorter than this comment are discarded&lt;br /&gt;
		var totalLines = 0;&lt;br /&gt;
		var paragraphs = text.split( /\n+/ );&lt;br /&gt;
		var paragraph;&lt;br /&gt;
		for( var i = 0; i &amp;lt; paragraphs.length; i++ ) {&lt;br /&gt;
			paragraph = paragraphs[i].trim();&lt;br /&gt;
			if( paragraph.length &amp;gt; 30 ) {&lt;br /&gt;
				totalLines++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// how much lines?&lt;br /&gt;
		stats.totalLines = totalLines;&lt;br /&gt;
&lt;br /&gt;
		// how much words?&lt;br /&gt;
		stats.totalWords = words.length;&lt;br /&gt;
&lt;br /&gt;
		// how much of these words are so much long?&lt;br /&gt;
		// See 'longWordLen'&lt;br /&gt;
		stats.totalLongWords = totalLongWords;&lt;br /&gt;
&lt;br /&gt;
		return stats;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query content stats of the current page&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page title (or nothing for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryContentStats( pageTitle ) {&lt;br /&gt;
		return queryPlainText( pageTitle ).then( textStats );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Apply a stupid percentage&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {int} a&lt;br /&gt;
	 * @param {int} b&lt;br /&gt;
	 * @return The 'b%' applied to 'a'&lt;br /&gt;
	 */&lt;br /&gt;
	function applyPercentage( a, b ) {&lt;br /&gt;
		return parseInt( a * b / 100 );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia stats box&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipediaStatsBox() {&lt;br /&gt;
&lt;br /&gt;
		// normal page title (non-mini version)&lt;br /&gt;
		var mainPageTitle = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// body container&lt;br /&gt;
		var $contentText = $( '#mw-content-text' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the DOM tree&lt;br /&gt;
		var $container = $( '&amp;lt;div&amp;gt;' );&lt;br /&gt;
		var $table = $( '&amp;lt;table&amp;gt;' );&lt;br /&gt;
		var $thead = $( '&amp;lt;thead&amp;gt;' );&lt;br /&gt;
		var $tbody = $( '&amp;lt;tbody&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the stats container&lt;br /&gt;
		$container.addClass( 'minipedia-stats' );&lt;br /&gt;
&lt;br /&gt;
		// put a title&lt;br /&gt;
		$container.append( $( '&amp;lt;h2&amp;gt;' ).text( L10N.statsTitle ) );&lt;br /&gt;
&lt;br /&gt;
		// put the table&lt;br /&gt;
		$container.append( $table );&lt;br /&gt;
&lt;br /&gt;
		// add table headers&lt;br /&gt;
		$thead.append(&lt;br /&gt;
			$( '&amp;lt;tr&amp;gt;' ).append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSubject    ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingValue      ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingExpected   ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSimplicity ) )&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// prepare the table&lt;br /&gt;
		$table.addClass( 'wikitable' )&lt;br /&gt;
		      .append( $thead )&lt;br /&gt;
		      .append( $tbody );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Append a row (with a label and a value) into a table&lt;br /&gt;
		 *&lt;br /&gt;
		 * The data argument accepts an object with:&lt;br /&gt;
		 *&lt;br /&gt;
		 *   className:        Class name for the row&lt;br /&gt;
		 *   label:            Text displayed in row heading (left)&lt;br /&gt;
		 *   text:             Text displayed in row data (right)&lt;br /&gt;
		 *   value             Value associated to the text of the mini version&lt;br /&gt;
		 *   maxValue          Maximum suggested value&lt;br /&gt;
		 *   upstreamValue     The value of the upstream (main) version&lt;br /&gt;
		 *   upstreamLimitPerc The percentage (0-100) applied to the 'upstreamValue' to inherit a suitable 'maxValue'&lt;br /&gt;
		 *&lt;br /&gt;
		 * Note: this function uses OOUI widgets. Make sure to have them loaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 * @param {Object} jQuery table&lt;br /&gt;
		 * @param {Object} Data information&lt;br /&gt;
		 */&lt;br /&gt;
		function appendTableStatsRow( $table, data ) {&lt;br /&gt;
&lt;br /&gt;
			// read arguments&lt;br /&gt;
			var className = data.className;&lt;br /&gt;
			var label     = data.label;&lt;br /&gt;
			var value     = data.value;&lt;br /&gt;
			var maxValue  = data.maxValue;&lt;br /&gt;
			var text      = data.text || value;&lt;br /&gt;
&lt;br /&gt;
			// eventually calculate the max value&lt;br /&gt;
			if( !maxValue &amp;amp;&amp;amp; data.upstreamValue &amp;amp;&amp;amp; data.upstreamLimitPerc ) {&lt;br /&gt;
				maxValue = applyPercentage( data.upstreamValue, data.upstreamLimitPerc );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// prepare table stats row&lt;br /&gt;
			var $tr         = $( '&amp;lt;tr&amp;gt;' );&lt;br /&gt;
			var $tdLabel    = $( '&amp;lt;td&amp;gt;' ).text( label    );&lt;br /&gt;
			var $tdValue    = $( '&amp;lt;td&amp;gt;' ).text( text     );&lt;br /&gt;
			var $tdMax      = $( '&amp;lt;td&amp;gt;' ).text( maxValue );&lt;br /&gt;
			var $tdProgress = $( '&amp;lt;td&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
			// build the table row&lt;br /&gt;
			$tr.addClass( 'minipedia-stats-row-' + className );&lt;br /&gt;
			$tr.append( $tdLabel    )&lt;br /&gt;
			   .append( $tdValue    )&lt;br /&gt;
			   .append( $tdMax      )&lt;br /&gt;
			   .append( $tdProgress );&lt;br /&gt;
&lt;br /&gt;
			// if possible, plot a cute progress bar&lt;br /&gt;
			if( maxValue ) {&lt;br /&gt;
&lt;br /&gt;
				// calculate a 0-100 progress since the value and maxValue&lt;br /&gt;
				var realPercentage = parseInt( value / maxValue * 100 );&lt;br /&gt;
&lt;br /&gt;
				/**&lt;br /&gt;
				 * Calculate the inverse percentage&lt;br /&gt;
				 *&lt;br /&gt;
				 * This is the final percentage shown to the user.&lt;br /&gt;
				 *&lt;br /&gt;
				 * In short, it's always 100% but if you go over&lt;br /&gt;
				 * the limit it start decreasing and reaching zero,&lt;br /&gt;
				 * to rappresent a kind of 'understanding degradation'.&lt;br /&gt;
				 *&lt;br /&gt;
				 * To do not underrate the work of the user it should not go&lt;br /&gt;
				 * below a certain minimum amount. Example: 10%. :^)&lt;br /&gt;
				 *&lt;br /&gt;
				 * Actually the function is just linear.&lt;br /&gt;
				 */&lt;br /&gt;
				var inversePercentage = 100;&lt;br /&gt;
				if( realPercentage &amp;gt; 100 ) {&lt;br /&gt;
					inversePercentage = Math.max( 10, 200 - realPercentage );&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// generate the progress bar&lt;br /&gt;
				var progressBar = new OO.ui.ProgressBarWidget( {&lt;br /&gt;
					progress: inversePercentage,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// show the progress bar&lt;br /&gt;
				$tdProgress.append( progressBar.$element );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// attach some data to be read by scripts&lt;br /&gt;
			$tr.data( 'ministats', data );&lt;br /&gt;
&lt;br /&gt;
			// eventually emphasize if something is wrong&lt;br /&gt;
			if( value &amp;amp;&amp;amp; maxValue &amp;amp;&amp;amp; value &amp;gt; maxValue ) {&lt;br /&gt;
				$tr.addClass( 'minipedia-stats-row-problem' );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// show the row in the stats table&lt;br /&gt;
			$table.append( $tr );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// request multiple stuff at the same time&lt;br /&gt;
		$.when(&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the current mini page&lt;br /&gt;
			queryContentStats(),&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the related non-mini page&lt;br /&gt;
			queryContentStats( mainPageTitle ),&lt;br /&gt;
&lt;br /&gt;
			// require the progress bar widget&lt;br /&gt;
			mw.loader.using( 'oojs-ui-widgets' )&lt;br /&gt;
&lt;br /&gt;
		// callback fired when we have all the information&lt;br /&gt;
		).done( function( statsMini, statsMain, mwLoader ) {&lt;br /&gt;
&lt;br /&gt;
			// show the stats container at the bottom of the page when we have something&lt;br /&gt;
			$contentText.append( $container );&lt;br /&gt;
&lt;br /&gt;
			// check if we have also some information from the main namespace&lt;br /&gt;
			// in this case we can do a comparison&lt;br /&gt;
			if( statsMain ) {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they can be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'long-words',&lt;br /&gt;
					label:             L10N.statsComplexWords,&lt;br /&gt;
					value:             statsMini.totalLongWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalLongWords,&lt;br /&gt;
					upstreamLimitPerc: 10,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'words',&lt;br /&gt;
					label:             L10N.statsWords,&lt;br /&gt;
					value:             statsMini.totalWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalWords,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'lines',&lt;br /&gt;
					label:             L10N.statsLines,&lt;br /&gt;
					value:             statsMini.totalLines,&lt;br /&gt;
					maxValue:          statsMain.totalLines,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );	&lt;br /&gt;
&lt;br /&gt;
			// there is no the related main page&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they cannot be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'long-words',&lt;br /&gt;
					label:     L10N.statsComplexWords,&lt;br /&gt;
					value:     statsMini.totalLongWords,&lt;br /&gt;
					maxValue:  mp.maxComplexWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'words',&lt;br /&gt;
					label:     L10N.statsWords,&lt;br /&gt;
					value:     statsMini.totalWords,&lt;br /&gt;
					maxValue:  mp.maxStatsWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'lines',&lt;br /&gt;
					label:      L10N.statsLines,&lt;br /&gt;
					value:      statsMini.totalLines,&lt;br /&gt;
					maxValue:   mp.maxTotalLines,&lt;br /&gt;
				} );&lt;br /&gt;
			}&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia namespace&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipedia() {&lt;br /&gt;
&lt;br /&gt;
		// action of the page (edit, view etc.)&lt;br /&gt;
		var action = mw.config.get( 'wgAction' );&lt;br /&gt;
&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Normalpedia title object&lt;br /&gt;
		var normalTitleObject = new mw.Title( pageName );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var normalPageName = normalTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var normalPageUrl = normalTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var normalVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			normalPageUrl,&lt;br /&gt;
			L10N.normalpediaShort,&lt;br /&gt;
			'ca-normalpedia',&lt;br /&gt;
			L10N.openNormalpedia&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// check if we are in view mode&lt;br /&gt;
		if( action === 'view' ) {&lt;br /&gt;
&lt;br /&gt;
			// in view mode we can fetch the stats&lt;br /&gt;
			prepareMinipediaStatsBox();&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareMinipedia()&lt;br /&gt;
&lt;br /&gt;
	// work only in the main namespace&lt;br /&gt;
	var ns = mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	if( ns === 0 ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
	} else if( ns == mp.namespaceNum ) {&lt;br /&gt;
		prepareMinipedia();&lt;br /&gt;
	}&lt;br /&gt;
	// end namespace zero check&lt;br /&gt;
&lt;br /&gt;
} )( mediawiki, jQuery );&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Moto_circolare&amp;diff=90</id>
		<title>Mini:Moto circolare</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Moto_circolare&amp;diff=90"/>
		<updated>2023-08-06T10:08:35Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Il '''moto circolare uniforme''' è il movimento di un corpo su una circonferenza con velocità costante, cioè percorrendo la circonferenza in tempi sempre uguali.&lt;br /&gt;
&lt;br /&gt;
Non c'entra nulla con i {{minipedia|quaternioni}} o con il {{Minipedia|minimo comune multiplo}}.&lt;br /&gt;
&lt;br /&gt;
== Esempi==&lt;br /&gt;
* Il movimento di un seggiolino di una giostra panoramica.&lt;br /&gt;
* Il movimento della punta delle 3 lancette dell'orologio, cioè quelle dei minuti, secondi, e ore, che viaggiano senza mai fermarsi con la stessa velocità sulla circonferenza.&lt;br /&gt;
* Il movimento di una stazione orbitale intorno alla terra.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Campo di studio==&lt;br /&gt;
Il moto circolare è uno dei moti semplici studiati dalla fisica ed ha numerose applicazioni pratiche.&lt;br /&gt;
&lt;br /&gt;
[[File:Accelerazione circolare.svg|Accelerazione circolare]]&lt;br /&gt;
&lt;br /&gt;
==Collegamenti esterni==&lt;br /&gt;
* [https://it.wikipedia.org/wiki/Moto_circolare wikipedia Moto circolare uniforme]&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Moto_circolare&amp;diff=89</id>
		<title>Mini:Moto circolare</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Moto_circolare&amp;diff=89"/>
		<updated>2023-08-06T10:08:11Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Il '''moto circolare uniforme''' è il movimento di un corpo su una circonferenza con velocità costante, cioè percorrendo la circonferenza in tempi sempre uguali.&lt;br /&gt;
&lt;br /&gt;
Non c'entra nulla coi {{minipedia|quaternioni}} o con il {{Minipedia|minimo comune multiplo}}.&lt;br /&gt;
&lt;br /&gt;
==Campo di studio==&lt;br /&gt;
Il moto circolare è uno dei moti semplici studiati dalla fisica ed ha numerose applicazioni pratiche.&lt;br /&gt;
&lt;br /&gt;
[[File:Accelerazione circolare.svg|Accelerazione circolare]]&lt;br /&gt;
&lt;br /&gt;
== Esempi==&lt;br /&gt;
* Il movimento di un seggiolino di una giostra panoramica.&lt;br /&gt;
* Il movimento della punta delle 3 lancette dell'orologio, cioè quelle dei minuti, secondi, e ore, che viaggiano senza mai fermarsi con la stessa velocità sulla circonferenza.&lt;br /&gt;
* Il movimento di una stazione orbitale intorno alla terra.&lt;br /&gt;
&lt;br /&gt;
==Bibliografia==&lt;br /&gt;
* Scienze Focus,Volume A, Luigi Leopardi, Chiara Cateni, Massimo Temporelli, Francesca Bolognani, Casa editrice: Dea Scuola&lt;br /&gt;
&lt;br /&gt;
==Collegamenti esterni==&lt;br /&gt;
* [https://it.wikipedia.org/wiki/Moto_circolare wikipedia Moto circolare uniforme]&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Main_Page&amp;diff=88</id>
		<title>Mini:Main Page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Main_Page&amp;diff=88"/>
		<updated>2023-08-06T09:57:56Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: /* Benvenuto in Minipedia */ fix gender issue&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Benvenuti in Minipedia ==&lt;br /&gt;
&lt;br /&gt;
Voci di prova:&lt;br /&gt;
&lt;br /&gt;
* {{Minipedia|Regioni di formazione stellare di Cassiopea}}&lt;br /&gt;
* {{Minipedia|Quaternioni}}&lt;br /&gt;
* {{Minipedia|Minimo comune multiplo}}&lt;br /&gt;
* {{Minipedia|Moto circolare}}&lt;br /&gt;
* {{Minipedia|Tommaso d'Aquino}}&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=87</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=87"/>
		<updated>2023-08-06T09:57:37Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: +info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Benvenuti in Minipedia demo ==&lt;br /&gt;
&lt;br /&gt;
Minipedia è una demo per realizzare una potenziale integrazione fra Wikipedia, ed una sua versione più semplificata e dai contenuti ridotti (&amp;quot;mini&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Ecco alcune voci di prova standard, importati da Wikipedia:&lt;br /&gt;
&lt;br /&gt;
* [[Regioni di formazione stellare di Cassiopea]]&lt;br /&gt;
* [[Quaternioni]]&lt;br /&gt;
* [[Minimo comune multiplo]]&lt;br /&gt;
* [[Moto circolare]]&lt;br /&gt;
* [[Tommaso d'Aquino]]&lt;br /&gt;
&lt;br /&gt;
Le stesse voci sono integrate in questa demo di Minipedia:&lt;br /&gt;
&lt;br /&gt;
→ '''[[Mini:Pagina principale|Entra in Minipedia]]'''&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
; Questions about this website?&lt;br /&gt;
&lt;br /&gt;
* See https://etherpad.wikimedia.org/p/minipedia&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:Ilario Ilario Valdelli (WMCH)] (main project contact)&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:ValerioBoz-WMCH Valerio Bozz.] (developer, external consultant for WMCH)&lt;br /&gt;
&lt;br /&gt;
; Found a bug? Have an idea?&lt;br /&gt;
* see all bugs on WMCH-Minipedia on Wikimedia Phabricator&lt;br /&gt;
*:https://phabricator.wikimedia.org/tag/wmch-minipedia/ &lt;br /&gt;
* [https://phabricator.wikimedia.org/maniphest/task/edit/form/43/?tags=wmch-minipedia create a Bug report] on Wikimedia Phabricator&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=User:Valerio_Bozzolan&amp;diff=86</id>
		<title>User:Valerio Bozzolan</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=User:Valerio_Bozzolan&amp;diff=86"/>
		<updated>2023-08-06T09:54:41Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: asd&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello, World!&lt;br /&gt;
&lt;br /&gt;
In this wiki I'm the full-stack developer, and operating system administrator.&lt;br /&gt;
&lt;br /&gt;
Note that I was involved in this project in 2020‎ and I'm not supposed to work on this anymore. Contact WMCH or Ilario Valdelli to further boost this project, involving me again or other lovely people.&lt;br /&gt;
&lt;br /&gt;
https://meta.wikimedia.org/wiki/Wikimedia_CH/Tech_boost&lt;br /&gt;
&lt;br /&gt;
Feel free to contact me about any technical issue.&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
&lt;br /&gt;
* https://boz.reyboz.it/&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=User:Valerio_Bozzolan&amp;diff=85</id>
		<title>User:Valerio Bozzolan</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=User:Valerio_Bozzolan&amp;diff=85"/>
		<updated>2023-08-06T09:52:16Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: asd&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello, World!&lt;br /&gt;
&lt;br /&gt;
In this wiki I'm the hardware system administrator. Not to be confused with a sysop.&lt;br /&gt;
&lt;br /&gt;
Feel free to contact me about any technical issue.&lt;br /&gt;
&lt;br /&gt;
Note that I was involved in this project in 2020‎ and I'm not supposed to work on this anymore. Contact WMCH or Ilario Valdelli to further boost this project, involving me again or other lovely people.&lt;br /&gt;
&lt;br /&gt;
https://meta.wikimedia.org/wiki/Wikimedia_CH/Tech_boost&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
&lt;br /&gt;
* https://boz.reyboz.it/&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=User:Valerio_Bozzolan&amp;diff=84</id>
		<title>User:Valerio Bozzolan</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=User:Valerio_Bozzolan&amp;diff=84"/>
		<updated>2023-08-06T09:51:53Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: +info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello, World!&lt;br /&gt;
&lt;br /&gt;
In this wiki I'm the hardware system administrator. Not to be confused with a sysop.&lt;br /&gt;
&lt;br /&gt;
Feel free to contact me about any technical issue.&lt;br /&gt;
&lt;br /&gt;
Note that I was involved in this project in 2020‎ and I'm not supposed to work on this anymore. Contact WMCH or Ilario Valdelli to further boost this project.&lt;br /&gt;
&lt;br /&gt;
https://meta.wikimedia.org/wiki/Wikimedia_CH/Tech_boost&lt;br /&gt;
&lt;br /&gt;
== Contact ==&lt;br /&gt;
&lt;br /&gt;
* https://boz.reyboz.it/&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=83</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=83"/>
		<updated>2022-01-02T12:37:37Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: chiarimenti&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Benvenuti in Minipedia demo ==&lt;br /&gt;
&lt;br /&gt;
Minipedia è una demo per realizzare una potenziale integrazione fra Wikipedia, ed una sua versione più semplificata e dai contenuti ridotti (&amp;quot;mini&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Ecco alcune voci di prova standard, importati da Wikipedia:&lt;br /&gt;
&lt;br /&gt;
* [[Regioni di formazione stellare di Cassiopea]]&lt;br /&gt;
* [[Quaternioni]]&lt;br /&gt;
* [[Minimo comune multiplo]]&lt;br /&gt;
* [[Moto circolare]]&lt;br /&gt;
* [[Tommaso d'Aquino]]&lt;br /&gt;
&lt;br /&gt;
Le stesse voci sono integrate in questa demo di Minipedia:&lt;br /&gt;
&lt;br /&gt;
→ '''[[Mini:Pagina principale|Entra in Minipedia]]'''&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
; Questions about this website?&lt;br /&gt;
&lt;br /&gt;
* See https://etherpad.wikimedia.org/p/minipedia&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:Ilario Ilario Valdelli (WMCH)]&lt;br /&gt;
&lt;br /&gt;
; Found a bug? Have an idea?&lt;br /&gt;
* see all bugs on [https://phabricator.wikimedia.org/tag/wmch-minipedia/ WMCH-Minipedia] on Wikimedia Phabricator&lt;br /&gt;
* [https://phabricator.wikimedia.org/maniphest/task/edit/form/43/?tags=wmch-minipedia create a Bug report] on Wikimedia Phabricator&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=82</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Main_Page&amp;diff=82"/>
		<updated>2022-01-02T12:34:16Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: +#FAQ&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Benvenuto in Minipedia ==&lt;br /&gt;
&lt;br /&gt;
Voci di prova:&lt;br /&gt;
&lt;br /&gt;
* [[Regioni di formazione stellare di Cassiopea]]&lt;br /&gt;
* [[Quaternioni]]&lt;br /&gt;
* [[Minimo comune multiplo]]&lt;br /&gt;
* [[Moto circolare]]&lt;br /&gt;
* [[Tommaso d'Aquino]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
; Questions about this website?&lt;br /&gt;
&lt;br /&gt;
* See https://etherpad.wikimedia.org/p/minipedia&lt;br /&gt;
* Contact [https://meta.wikimedia.org/wiki/User:Ilario Ilario Valdelli (WMCH)]&lt;br /&gt;
&lt;br /&gt;
; Found a bug? Have an idea?&lt;br /&gt;
* see all bugs on [https://phabricator.wikimedia.org/tag/wmch-minipedia/ WMCH-Minipedia] on Wikimedia Phabricator&lt;br /&gt;
* [https://phabricator.wikimedia.org/maniphest/task/edit/form/43/?tags=wmch-minipedia create a Bug report] on Wikimedia Phabricator&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Moto_circolare&amp;diff=80</id>
		<title>Moto circolare</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Moto_circolare&amp;diff=80"/>
		<updated>2021-01-05T11:44:09Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: -F (test)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Immagine:Circular motion.svg|thumb|Rappresentazione bidimensionale di un moto circolare. Si è rappresentati con ''s'' l'ascissa curvilinea, con ''R'' il raggio del cerchio e con ''v'' velocità istantanea del punto.]]&lt;br /&gt;
&lt;br /&gt;
Il '''moto circolare''' è uno dei moti semplici studiati dalla [[fisica]] e dalla  [[cinematica]], e consiste in un moto di un [[punto materiale]] lungo una [[circonferenza]].&lt;br /&gt;
&lt;br /&gt;
Il moto circolare assume importanza per il fatto che la [[velocità]] e l'[[accelerazione]] variano in funzione del cambiamento di direzione del moto. Tale cambiamento si può misurare comodamente usando le misure angolari per cui le equazioni del moto, introdotte con il [[moto rettilineo]], vanno riviste e rielaborate con misure angolari.&lt;br /&gt;
&lt;br /&gt;
La [[retta]] passante per il centro della circonferenza e perpendicolare alla stessa prende il nome di [[asse di rotazione]]. Per semplificare l'analisi di questo tipo di moto, infatti, consideriamo che l'osservatore si ponga sull'asse di rotazione. Ciò è possibile per l'[[isotropia]] e l'[[omogeneità]] dello [[Spazio (fisica)|spazio]].&lt;br /&gt;
&lt;br /&gt;
== Il moto in coordinate cartesiane, polari e polari doppie ==&lt;br /&gt;
Il sistema più comodo per analizzare un moto circolare fa uso delle [[coordinate polari]]. Infatti nel caso particolare di movimento che avviene su una circonferenza di raggio '''''R''''', il moto in [[coordinate polari]] è determinato dalle coordinate:&lt;br /&gt;
:&amp;lt;math&amp;gt;\rho(t)= R \quad \mbox{e} \quad \theta(t),&amp;lt;/math&amp;gt;&lt;br /&gt;
mentre in [[coordinate cartesiane]] si ha:&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{cases}x(t)= R\cdot\cos\theta(t)\\&lt;br /&gt;
y(t)= R\cdot\operatorname{sen}\theta(t)&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
che soddisfano la seguente identità (in ogni istante di tempo):&lt;br /&gt;
:&amp;lt;math&amp;gt;x^2 + y^2 = R^2&amp;lt;/math&amp;gt;&lt;br /&gt;
[[File:Moto circolare.svg|thumb|upright=1.6|Rappresentazione tridimensionale di un moto circolare]]&lt;br /&gt;
Nel moto circolare si possono definire due diverse tipologie di velocità: la [[velocità angolare]] e la [[velocità tangenziale]].&lt;br /&gt;
&lt;br /&gt;
Per descriverle consideriamo nello spazio tridimensionale, il vettore infinitesimo ''spostamento angolare''&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathrm d\vec\theta=\hat{\mathbf z}\cdot \mathrm d\theta&amp;lt;/math&amp;gt;&lt;br /&gt;
dove &amp;lt;math&amp;gt;\hat{\mathbf z} &amp;lt;/math&amp;gt; è un [[versore]] disposto lungo l'asse di rotazione e &amp;lt;math&amp;gt;d \theta &amp;lt;/math&amp;gt; la variazione [[infinitesimo|infinitesima]] della variabile angolare &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Sia ora &amp;lt;math&amp;gt;\vec{R}(t)&amp;lt;/math&amp;gt; il vettore posizione del punto ''P'' ad ogni istante &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, allora lo ''spostamento lineare'' &amp;lt;math&amp;gt;d\vec {R}(t)&amp;lt;/math&amp;gt; (ovvero la variazione infinitesima di &amp;lt;math&amp;gt;\vec{R}(t)&amp;lt;/math&amp;gt;) del punto ''P'' sull'arco di circonferenza nell'intervallo di tempo (infinitesimo) &amp;lt;math&amp;gt;dt&amp;lt;/math&amp;gt; sarà legata allo spostamento angolare &amp;lt;math&amp;gt;d\vec {\theta}&amp;lt;/math&amp;gt; dal [[prodotto vettoriale]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \mathrm d\vec{R}(t)=\mathrm d\vec{\theta}\times\vec{R}(t)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
La direzione e il verso risultano corretti per la regola della mano destra, come si vede dalla figura a lato. Il modulo è dato da (si ricordi che l'angolo è infinitesimo):&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; |\mathrm d \vec {R}(t)| = |\mathrm d\vec {\theta}| \cdot |\vec {R}(t)| \cdot \operatorname{sen} \left( \frac{\pi}{2} \right) = \mathrm d \theta \cdot R&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
che corrisponde, per definizione essendo &amp;lt;math&amp;gt;d \theta &amp;lt;/math&amp;gt; espresso in [[radiante|radianti]], all'arco di circonferenza sottesa dall'angolo &amp;lt;math&amp;gt; d \theta &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
La [[velocità angolare]] è definita come la derivata, rispetto al tempo, del vettore spostamento angolare ed è comunemente indicata con la lettera greca &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt; (omega):&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec {\omega}(t)= \frac {\mathrm d \vec \theta}{\mathrm dt} = \hat{\mathbf z} \cdot \frac {\mathrm d \theta}{\mathrm dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(ricordando che &amp;lt;math&amp;gt;\hat{\mathbf z}&amp;lt;/math&amp;gt; è costante) ed è una misura della velocità di variazione dell'angolo formato dal vettore [[posizione]], si misura in [[radiante|radianti]] al [[secondo]] &amp;lt;math&amp;gt;\left [\frac {\mathrm{rad}}{\mathrm{s}}\right]&amp;lt;/math&amp;gt; ed ha la stessa direzione del vettore spostamento angolare.&lt;br /&gt;
&lt;br /&gt;
La velocità lineare (o tangenziale) si ottiene derivando rispetto al tempo il vettore posizione &amp;lt;math&amp;gt;\vec R&amp;lt;/math&amp;gt;:&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec v(t)=\frac {\mathrm d\vec R(t)} {\mathrm dt} &amp;lt;/math&amp;gt;&lt;br /&gt;
ed è legata alla velocità angolare dalla seguente relazione (per approfondire si veda anche [[derivata di un vettore]]):&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt; \vec v(t) = \frac {\mathrm d \vec{\theta} \times \vec{R}(t)}{\mathrm dt} = \frac {\mathrm d\vec \theta}{\mathrm dt} \times \vec R(t) = \vec {\omega} \times \vec {R}(t) \,.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Si noti che la costanza della velocità angolare implica la costanza del modulo della velocità.&lt;br /&gt;
&lt;br /&gt;
Se si esegue il [[prodotto scalare]] dei due vettori &amp;lt;math&amp;gt;\vec R(t)&amp;lt;/math&amp;gt; e &amp;lt;math&amp;gt;\vec v(t)&amp;lt;/math&amp;gt; si ottiene zero per ogni istante di tempo ''t'', e questo dimostra che la [[velocità tangenziale]] è sempre ortogonale al raggio vettore &amp;lt;math&amp;gt;\vec R(t)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Oltre a queste, si può introdurre la [[velocità areolare]], definita come la derivata, rispetto al tempo, dell'area spazzata dal raggio vettore &amp;lt;math&amp;gt;\vec{R}&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \dot\mathbf{A}=\frac{dA}{dt}=\frac{1}{2}\,\vec{v}\times\vec{R}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
si misura in metri quadri al secondo &amp;lt;math&amp;gt;\left[\frac{\mathrm m^2}{\mathrm s}\right]&amp;lt;/math&amp;gt; ed ha la stessa direzione e lo stesso verso della velocità angolare.&lt;br /&gt;
&lt;br /&gt;
== Accelerazione ==&lt;br /&gt;
[[File:Accelerazione circolare.svg|thumb|upright=1.4|Schema accelerazione]]&lt;br /&gt;
Derivando rispetto al tempo l'espressione del vettore velocità tangenziale otteniamo l'accelerazione; che ha una componente parallela alla velocità (responsabile della variazione del modulo di questa) e una normale (o radiale): si tratta rispettivamente dell'[[accelerazione tangenziale]] e dell'[[accelerazione centripeta]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec a(t) = \frac {\mathrm d}{\mathrm d t} \left [\vec {\omega} \times \vec {R}(t)\right]= \frac {\mathrm d\vec \omega}{\mathrm dt} \times \vec {R}(t) + \vec \omega \times \frac {\mathrm d \vec R(t)} {\mathrm dt}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
La prima frazione si chiama [[accelerazione angolare]] di solito indicata con &amp;lt;math&amp;gt;\vec{\dot\omega}_{(t)}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\vec {\alpha}&amp;lt;/math&amp;gt; oppure &amp;lt;math&amp;gt;\vec{\varpi}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Si misura in radianti su secondi quadri &amp;lt;math&amp;gt;\left[ \frac {\mathrm{rad}} {\mathrm{s}^{2}} \right]&amp;lt;/math&amp;gt;, fornisce la variazione della velocità angolare ed ha stessa direzione di questa.&lt;br /&gt;
&lt;br /&gt;
Sviluppando la relazione precedente otteniamo (tralasciando le dipendenze dal tempo):&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec a(t)=\vec{\varpi}\times\vec{R}+\vec{\omega}\times\left(\vec{\omega}\times\vec{R}\right)=\vec {\varpi}\times\vec{R}-\omega^2\vec{R}=\vec{a}_\tau+\vec{a}_n&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dove si vede chiaramente la componente tangenziale che rappresenta la variazione del modulo della velocità lineare e la componente normale o centripeta che rappresenta la variazione della direzione della velocità lineare, diretta sempre verso il centro della circonferenza.&lt;br /&gt;
&lt;br /&gt;
Pertanto possiamo concludere che l'accelerazione ha un componente radiale di modulo:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;|\vec {a_n}|=\omega^2 R={v^2\over R}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
e una tangenziale di modulo:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;|\vec {a_\tau}|=R \, \ddot\theta \,.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Può essere utile a questo punto introdurre la [[curvatura]] definita come &amp;lt;math&amp;gt;k=\frac{1}{R}&amp;lt;/math&amp;gt;, misurata in &amp;lt;math&amp;gt;m^{-1}&amp;lt;/math&amp;gt;. Inserendola nelle formule dell'accelerazione si ha:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;|\vec {a_n}|=v^2 k={\omega^2\over k}\qquad&amp;lt;/math&amp;gt;  e  &amp;lt;math&amp;gt;\qquad|\vec {a_\tau}|=\frac{\ddot\theta}{k}.&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Da ciò si deduce che all'aumentare della curvatura, e conseguentemente al diminuire del raggio, prevale la componente normale dell'accelerazione, restringendo la traiettoria. Viceversa, al crescere del raggio, con conseguente riduzione della curvatura, prevale la componente tangenziale che conduce ad un allargamento della traiettoria. &lt;br /&gt;
&lt;br /&gt;
Per questa ragione il [[moto rettilineo]] può essere letto come un moto circolare con accelerazione normale nulla.&lt;br /&gt;
&lt;br /&gt;
Omologamente, derivando la velocità  areolare, si ottiene l'[[Velocità areolare|accelerazione areolare]], misurata in metri quadri su secondi quadri &amp;lt;math&amp;gt;\left[\frac{m^2}{s^2}\right]&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\ddot\mathbf{A}=\frac{\mathrm d\dot\mathbf{A}}{\mathrm dt}=\frac{1}{2}\vec{a}_\tau\times\vec{R}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Moto circolare uniforme ==&lt;br /&gt;
&lt;br /&gt;
Se il moto circolare è uniforme significa che è costante il vettore velocità angolare, cioè si ha velocità lineare costante in modulo.&lt;br /&gt;
&lt;br /&gt;
Integrando la  &amp;lt;math&amp;gt;\vec {\omega}(t) \cdot dt = d \vec {\theta}&amp;lt;/math&amp;gt;  tra i due istanti, l'iniziale &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt;, e &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; corrispondenti ad un angolo iniziale &amp;lt;math&amp;gt;\theta_0&amp;lt;/math&amp;gt; e un altro angolo &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta (t) = \theta_0 + \omega t &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
essendo &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt; la [[velocità angolare]] costante.&lt;br /&gt;
&lt;br /&gt;
Ne consegue (dalle equazioni viste alla sezione precedente) che la velocità tangenziale ha modulo costante pari a:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;v(t)={\mathrm d R(t)\over\mathrm d t}=R\cdot\omega&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
e dal momento che essa vettorialmente varia solo in direzione, segue che &amp;lt;math&amp;gt;|\vec {a_\tau}|=0&amp;lt;/math&amp;gt;, dunque l'accelerazione ha solo componente radiale, detta [[accelerazione centripeta]]:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec {a}_n = -\omega^2 R\cdot\hat\mathbf{n}=-\frac{v^2}{R}\cdot\hat\mathbf{n}&amp;lt;/math&amp;gt;&lt;br /&gt;
:Ad essere costante è anche la velocità areolare:&lt;br /&gt;
:&amp;lt;math&amp;gt;\dot\mathbf{A}=\frac{1}{2}R^2\vec{\omega}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Moto circolare uniformemente accelerato ==&lt;br /&gt;
Il moto circolare uniformemente accelerato è il moto più generale ad accelerazione costante in modulo e in inclinazione rispetto alla velocità.&lt;br /&gt;
In particolare ciò significa che l'accelerazione angolare è costante. Integrando l'accelerazione angolare &amp;lt;math&amp;gt;\varpi\cdot dt=d\omega&amp;lt;/math&amp;gt; tra due istanti di tempo &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; e &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; corrispondenti alle due velocità angolari iniziale e finale &amp;lt;math&amp;gt;\omega_0&amp;lt;/math&amp;gt; e &amp;lt;math&amp;gt;\omega&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{t_0}^{t}\varpi\cdot \mathrm dt=\int_{\omega_0}^{\omega}\mathrm d\omega_{(t)}\,\Rightarrow\,\omega_{(t)}=\omega_0+\varpi t &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Integrando la relazione &amp;lt;math&amp;gt;d\theta = \omega \cdot dt&amp;lt;/math&amp;gt; tra due istanti di tempo iniziale e finale &amp;lt;math&amp;gt;t_0&amp;lt;/math&amp;gt; e &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; e sostituendo a &amp;lt;math&amp;gt;\omega_{(t)}&amp;lt;/math&amp;gt; il valore trovato sopra, possiamo ricavare lo spostamento angolare &amp;lt;math&amp;gt;\theta(t)&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\begin{align}\int_{\theta_0}^{\theta}\mathrm d\theta&amp;amp;=\int_{t_0}^{t}\omega_{(t)}\cdot \mathrm dt\\&amp;amp;=\int_{t_0}^{t}(\omega_0+\varpi\cdot t)\cdot \mathrm dt\\&amp;amp;=\int_{t_0}^{t}\omega_0\cdot \mathrm dt+\int_{t_0}^{t}\varpi\cdot t\cdot \mathrm dt\\&amp;amp;\Rightarrow\theta_{(t)}=\theta_0+\omega_0\cdot t+\frac{1}{2}\varpi\cdot t^2\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Risulta costante anche l'accelerazione areolare:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\ddot\mathbf{A}=\frac{1}{2}R^2\vec{\varpi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rappresentazione dei vettori posizione, velocità e accelerazione ==&lt;br /&gt;
&lt;br /&gt;
Per una rappresentazione vettoriale delle grandezze cinematiche relative al moto circolare, è opportuno introdurre i [[Tangente (geometria)|versori tangente]] e [[Perpendicolarità|normale]] alla traiettoria, che sono definiti nel modo seguente (il versore normale punta verso l'interno):&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\hat \tau = \begin{pmatrix} - \operatorname{sen} \theta \\ \cos \theta \end{pmatrix} &amp;lt;/math&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\hat n = \begin{pmatrix} -\cos \theta \\ - \operatorname{sen} \theta \end{pmatrix} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tenendo conto delle [[regole di derivazione]], le derivate di questi versori rispetto al tempo sono date da&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {\operatorname d\hat \tau }{\operatorname d t}=\begin{pmatrix} -\cos \theta \\ - \operatorname{sen} \theta \end{pmatrix}  = \dot \theta \hat n&amp;lt;/math&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac {\operatorname d\hat n }{\operatorname d t}= \begin{pmatrix} \operatorname{sen} \theta \\ -\cos \theta \end{pmatrix} = - \dot \theta \hat \tau&amp;lt;/math&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Possiamo quindi esprimere i [[vettore (matematica)|vettori]] posizione, velocità e accelerazione  usando i versori &amp;lt;math&amp;gt;\hat \tau&amp;lt;/math&amp;gt; e &amp;lt;math&amp;gt;\hat n&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* '''Posizione'''. Il vettore posizione è sempre diretto ''radialmente'': &lt;br /&gt;
:&amp;lt;math&amp;gt;\vec r= -R \hat n&amp;lt;/math&amp;gt;&lt;br /&gt;
* '''Velocità'''. Il vettore velocità è sempre diretto ''tangenzialmente'' (la derivata di R rispetto al tempo è nulla)&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec v = \frac {\operatorname d\vec r }{\operatorname d t}=R  \dot \theta \hat \tau&amp;lt;/math&amp;gt;&lt;br /&gt;
:La [[velocità radiale]] risulta quindi nulla &amp;lt;math&amp;gt;\Rightarrow v_\rho=\dot\rho=0&amp;lt;/math&amp;gt;&lt;br /&gt;
:La [[velocità tangenziale]] è : &amp;lt;math&amp;gt;v_\theta = R  \dot \theta&amp;lt;/math&amp;gt;&lt;br /&gt;
:La [[velocità angolare]] è: &amp;lt;math&amp;gt;\dot \theta = \omega&amp;lt;/math&amp;gt;&lt;br /&gt;
:La [[velocità areolare]] è: &amp;lt;math&amp;gt;\dot A=\frac{1}{2}R^2\omega&amp;lt;/math&amp;gt;&lt;br /&gt;
*'''Accelerazione'''. Il vettore [[accelerazione]] ha una componente tangente e una normale:&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec a = \frac {\operatorname d\vec v }{\operatorname d t}=R \,\ddot \theta \,\hat \tau + R\, \dot \theta^2 \,\hat n&amp;lt;/math&amp;gt;&lt;br /&gt;
:L'accelerazione radiale, detta [[accelerazione centripeta]] è : &amp;lt;math&amp;gt;a_\rho =  R \, \dot \theta^2&amp;lt;/math&amp;gt;&lt;br /&gt;
: L'accelerazione trasversa, detta [[accelerazione tangenziale]] è : &amp;lt;math&amp;gt;a_\theta =  R \,\ddot \theta&amp;lt;/math&amp;gt;&lt;br /&gt;
: L'[[accelerazione angolare]] è: &amp;lt;math&amp;gt;\ddot\theta=\varpi&amp;lt;/math&amp;gt;&lt;br /&gt;
: L'[[Velocità areolare|accelerazione areolare]], o areale è: &amp;lt;math&amp;gt;\ddot A=\frac{1}{2}R^2\varpi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nel moto circolare uniforme l'accelerazione tangenziale è nulla.&lt;br /&gt;
&lt;br /&gt;
Infine si possono scrivere le componenti del vettore velocità in coordinate cartesiane:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{cases}\dot x = -R \dot \theta \operatorname{sen} \theta = - \dot \theta y\\&lt;br /&gt;
\dot y = R \dot \theta \cos\theta = \dot \theta x\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Introdotto il ''vettore velocità angolare'', di modulo &amp;lt;math&amp;gt;\dot \theta&amp;lt;/math&amp;gt;, con direzione perpendicolare al piano del moto e con verso tale da vedere ruotare il corpo in senso antiorario,&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec \omega =  \begin{pmatrix}0 \\ 0 \\ \dot \theta \end{pmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
il vettore velocità può semplicemente essere scritto come:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\vec v = \vec \omega \times \vec r &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Voci correlate ==&lt;br /&gt;
*[[Moto rettilineo]]&lt;br /&gt;
*[[Moto ellittico]]&lt;br /&gt;
*[[Moto iperbolico]]&lt;br /&gt;
*[[Moto armonico]]&lt;br /&gt;
*[[Orbita circolare]]&lt;br /&gt;
&lt;br /&gt;
== Collegamenti esterni ==&lt;br /&gt;
* {{Collegamenti esterni}}&lt;br /&gt;
&lt;br /&gt;
{{Portale|meccanica}}&lt;br /&gt;
&lt;br /&gt;
[[Categoria:Tipi di moto|Moto circolare]]&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=79</id>
		<title>Mini:Quaternioni</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=79"/>
		<updated>2020-08-14T15:15:10Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: rollback&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=78</id>
		<title>MediaWiki:Gadget-minipedia.js</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=78"/>
		<updated>2020-08-14T14:54:28Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: fix linear understanding degradation function&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/**&lt;br /&gt;
 * Make Minipedia magics&lt;br /&gt;
 *&lt;br /&gt;
 * Dependencies: mediawiki.util&lt;br /&gt;
 *&lt;br /&gt;
 * See https://phabricator.wikimedia.org/tag/minipedia/&lt;br /&gt;
 *&lt;br /&gt;
 * @revision 2020-06-27&lt;br /&gt;
 */&lt;br /&gt;
( function ( $, mw ) {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * CONFIGURATION/LOCALIZATION INSTRUCTIONS&lt;br /&gt;
	 *&lt;br /&gt;
	 * Declare somewhere something like this:&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // assure that you do not overwrite other-people customizations&lt;br /&gt;
	 *   window.MiniPedia      = window.MiniPedia      || {};&lt;br /&gt;
	 *   window.MiniPedia.L10N = window.MiniPedia.L10N || {};&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // then customize something&lt;br /&gt;
 	 *   window.MiniPedia.editIntro      = 'Project:How to create';&lt;br /&gt;
	 *   window.MiniPedia.L10N.minipedia = 'Otherpedia';&lt;br /&gt;
	 */&lt;br /&gt;
&lt;br /&gt;
	// load localization defaults&lt;br /&gt;
	var DEFAULTS = {&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespace: 'Mini',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceNum: 3002,&lt;br /&gt;
&lt;br /&gt;
		// default edit intro page title&lt;br /&gt;
		editIntro: 'Progetto:Minipedia/Creazione voce',&lt;br /&gt;
&lt;br /&gt;
		// how much characters should have a word to be considered too much lon&lt;br /&gt;
		// this somehow help people with dyslexia&lt;br /&gt;
		longWordLen: 13,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of acceptable complex words to help people with dyslexia&lt;br /&gt;
		maxComplexWords: 10,&lt;br /&gt;
&lt;br /&gt;
		// min and max number of suggested words to somehow mitigate attention span problems&lt;br /&gt;
		maxWords: 700,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of suggested newlines&lt;br /&gt;
		maxTotalLines: 180,&lt;br /&gt;
&lt;br /&gt;
		// localization stuff&lt;br /&gt;
		L10N: {&lt;br /&gt;
			minipedia: &amp;quot;Minipedia&amp;quot;,&lt;br /&gt;
			minipediaShort: &amp;quot;Mini&amp;quot;,&lt;br /&gt;
			normalpedia: &amp;quot;Wikipedia Test&amp;quot;,&lt;br /&gt;
			normalpediaShort: &amp;quot;WikipediaTest&amp;quot;,&lt;br /&gt;
			openMinipedia: &amp;quot;Apri Minipedia&amp;quot;,&lt;br /&gt;
			openNormalpedia: &amp;quot;Apri Wikipedia Test&amp;quot;,&lt;br /&gt;
			createMinipediaPageTitle: &amp;quot;Accesso Minipedia&amp;quot;,&lt;br /&gt;
			createMinipediaPageBody: &amp;quot;Sii il primo a creare una versione più ridotta e più accessibile di questa voce, in Minipedia!&amp;quot;,&lt;br /&gt;
			statsTitle: &amp;quot;Mini Report&amp;quot;,&lt;br /&gt;
			statsHeadingSubject: &amp;quot;Fattore&amp;quot;,&lt;br /&gt;
			statsHeadingValue: &amp;quot;Valore attuale&amp;quot;,&lt;br /&gt;
			statsHeadingExpected: &amp;quot;Limite consigliato&amp;quot;,&lt;br /&gt;
			statsHeadingSimplicity: &amp;quot;Semplicità&amp;quot;,&lt;br /&gt;
			statsWords: &amp;quot;Parole&amp;quot;,&lt;br /&gt;
			statsLines: &amp;quot;Paragrafi&amp;quot;,&lt;br /&gt;
			statsComplexWords: &amp;quot;Parole complesse&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// global configuration&lt;br /&gt;
	window.MiniPedia = window.MiniPedia || {};&lt;br /&gt;
&lt;br /&gt;
	// shortcut&lt;br /&gt;
	var mp = window.MiniPedia;&lt;br /&gt;
&lt;br /&gt;
	// inherit default configurations&lt;br /&gt;
	$.extend( true, mp, DEFAULTS );&lt;br /&gt;
&lt;br /&gt;
	// another shortcut&lt;br /&gt;
	var L10N = mp.L10N;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Lazy shortcut to obtain just the first API result&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param  {Object} response API Response&lt;br /&gt;
	 * @return {Object} page object&lt;br /&gt;
	 */&lt;br /&gt;
	function justFirstQueryPage( response ) {&lt;br /&gt;
&lt;br /&gt;
		// no response no party&lt;br /&gt;
		if( !response.query || !response.query.pages ) {&lt;br /&gt;
			throw 'no valid API response';&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// the list should contain just one page&lt;br /&gt;
		var pages = response.query.pages;&lt;br /&gt;
		for( var id in pages ) {&lt;br /&gt;
			return pages[ id ];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// no page no party&lt;br /&gt;
		return false;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get a fresh MediaWiki API object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return mw.Api&lt;br /&gt;
	 */&lt;br /&gt;
	function mwApi() {&lt;br /&gt;
		return mw.loader.using( 'mediawiki.api' ).then( function() {&lt;br /&gt;
			return new mw.Api();&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if a page title already exists&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param title Page title&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function pageExists( title ) {&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'info',&lt;br /&gt;
			titles: title,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// eventually load API stuff&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request			&lt;br /&gt;
			return api.get( request ).then( function ( response ) {&lt;br /&gt;
&lt;br /&gt;
				// check if it exists&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 ) {&lt;br /&gt;
					return page;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				return false;&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query the current page plain text&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page name (or none for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryPlainText( pageName ) {&lt;br /&gt;
&lt;br /&gt;
		// complete page title with namespace&lt;br /&gt;
		pageName = pageName || mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		// See https://phabricator.wikimedia.org/T259332&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'extracts',&lt;br /&gt;
			titles: pageName,&lt;br /&gt;
			explaintext: 1,&lt;br /&gt;
			exlimit: 1,&lt;br /&gt;
			exsectionformat: 'plain',&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// this will return a Promise resolving the page plain text, returned upstream&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request and return a Promise&lt;br /&gt;
			return api.get( request ).then( function( response ) {&lt;br /&gt;
		&lt;br /&gt;
				// resolve the Promise with the page content&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 &amp;amp;&amp;amp; page.extract ) {&lt;br /&gt;
					return page.extract; &lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// no content&lt;br /&gt;
				return false;&lt;br /&gt;
				&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the wiki&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareNormalpedia() {&lt;br /&gt;
	&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Minipedia title object&lt;br /&gt;
		var miniTitleObject = new mw.Title( pageName,  mp.namespaceNum );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var miniPageName = miniTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var miniPageUrl = miniTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Go to the Minipedia page in edit mode&lt;br /&gt;
		 *&lt;br /&gt;
		 * The page in the main namespace will be preloaded.&lt;br /&gt;
		 &lt;br /&gt;
		 */&lt;br /&gt;
		function goToMinipediaEditPage() {&lt;br /&gt;
&lt;br /&gt;
			/**&lt;br /&gt;
			 * Build the query string to edit a page&lt;br /&gt;
			 *&lt;br /&gt;
			 * TODO: eventually add VisualEditor support&lt;br /&gt;
			 */&lt;br /&gt;
			var editPageQueryString = {&lt;br /&gt;
				action: 'edit',&lt;br /&gt;
				title: miniPageName,&lt;br /&gt;
				preload: pageName,&lt;br /&gt;
				editintro: mp.editIntro,			&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			// '/index.php'&lt;br /&gt;
			var wgScript = mw.config.get( 'wgScript' );&lt;br /&gt;
&lt;br /&gt;
			// go to the edit page URL&lt;br /&gt;
			window.location = wgScript + '?' + $.param( editPageQueryString );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var miniVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			miniPageUrl,&lt;br /&gt;
			L10N.minipediaShort,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			L10N.openMinipedia,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// on the mini toolback click, check if a mini version exists&lt;br /&gt;
		$( miniVersionPortletLink ).click( function( e ) {&lt;br /&gt;
		&lt;br /&gt;
			// wait for multiple information&lt;br /&gt;
			$.when(&lt;br /&gt;
				// check if the page really exists&lt;br /&gt;
				pageExists( miniPageName ),&lt;br /&gt;
&lt;br /&gt;
				// allow to open OO UI windows&lt;br /&gt;
				mw.loader.using( 'oojs-ui-windows' )&lt;br /&gt;
&lt;br /&gt;
			// callback fired when we have all the information&lt;br /&gt;
			).done( function( miniPageExists, loader ) {&lt;br /&gt;
&lt;br /&gt;
				// check if the page already exist&lt;br /&gt;
				if( miniPageExists ) {&lt;br /&gt;
&lt;br /&gt;
					// just redirect to the Minipedia version&lt;br /&gt;
					window.location = miniPageUrl;&lt;br /&gt;
				} else {&lt;br /&gt;
&lt;br /&gt;
					// ask if you want to create the page&lt;br /&gt;
&lt;br /&gt;
					// create message dialog window&lt;br /&gt;
					var messageDialog = new OO.ui.MessageDialog();&lt;br /&gt;
					var windowManager = new OO.ui.WindowManager();&lt;br /&gt;
					$( 'body' ).append( windowManager.$element );&lt;br /&gt;
					windowManager.addWindows( [ messageDialog ] );&lt;br /&gt;
&lt;br /&gt;
					// configure and open dialog&lt;br /&gt;
					var windowInstance = windowManager.openWindow( messageDialog, {&lt;br /&gt;
						title:   L10N.createMinipediaPageTitle,&lt;br /&gt;
						message: L10N.createMinipediaPageBody,&lt;br /&gt;
					} );&lt;br /&gt;
&lt;br /&gt;
					// check if you accepted the page creation&lt;br /&gt;
					windowInstance.closed.then( function ( data ) {&lt;br /&gt;
&lt;br /&gt;
						// user is confirming the action&lt;br /&gt;
						if( data.action === 'accept' ) {&lt;br /&gt;
&lt;br /&gt;
							// go go go! to mini&lt;br /&gt;
							goToMinipediaEditPage();&lt;br /&gt;
						}&lt;br /&gt;
					} );&lt;br /&gt;
&lt;br /&gt;
				}&lt;br /&gt;
				// end if page exists&lt;br /&gt;
&lt;br /&gt;
			} );&lt;br /&gt;
			// end $.when()&lt;br /&gt;
&lt;br /&gt;
			// avoid scrolling to the top&lt;br /&gt;
			e.preventDefault();&lt;br /&gt;
&lt;br /&gt;
		} );&lt;br /&gt;
		// end $( miniVersionPortletLink ).click&lt;br /&gt;
&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareNormalWiki()&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Calculate some stats over a text&lt;br /&gt;
	 */&lt;br /&gt;
	function textStats( text ) {&lt;br /&gt;
&lt;br /&gt;
		var stats = {};&lt;br /&gt;
&lt;br /&gt;
		text = text.trim();&lt;br /&gt;
&lt;br /&gt;
		// count long words&lt;br /&gt;
		var totalLongWords = 0;&lt;br /&gt;
		var word, words = text.split( /\s+/ );&lt;br /&gt;
		for( var i = 0; i &amp;lt; words.length; i++ ) {&lt;br /&gt;
			word = words[i];&lt;br /&gt;
			if( word.length &amp;gt; mp.longWordLen ) {&lt;br /&gt;
				totalLongWords++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// total amount of paragraphs&lt;br /&gt;
		// paragraphs shorter than this comment are discarded&lt;br /&gt;
		var totalLines = 0;&lt;br /&gt;
		var paragraphs = text.split( /\n+/ );&lt;br /&gt;
		var paragraph;&lt;br /&gt;
		for( var i = 0; i &amp;lt; paragraphs.length; i++ ) {&lt;br /&gt;
			paragraph = paragraphs[i].trim();&lt;br /&gt;
			if( paragraph.length &amp;gt; 30 ) {&lt;br /&gt;
				totalLines++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// how much lines?&lt;br /&gt;
		stats.totalLines = totalLines;&lt;br /&gt;
&lt;br /&gt;
		// how much words?&lt;br /&gt;
		stats.totalWords = words.length;&lt;br /&gt;
&lt;br /&gt;
		// how much of these words are so much long?&lt;br /&gt;
		// See 'longWordLen'&lt;br /&gt;
		stats.totalLongWords = totalLongWords;&lt;br /&gt;
&lt;br /&gt;
		return stats;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query content stats of the current page&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page title (or nothing for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryContentStats( pageTitle ) {&lt;br /&gt;
		return queryPlainText( pageTitle ).then( textStats );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Apply a stupid percentage&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {int} a&lt;br /&gt;
	 * @param {int} b&lt;br /&gt;
	 * @return The 'b%' applied to 'a'&lt;br /&gt;
	 */&lt;br /&gt;
	function applyPercentage( a, b ) {&lt;br /&gt;
		return parseInt( a * b / 100 );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia stats box&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipediaStatsBox() {&lt;br /&gt;
&lt;br /&gt;
		// normal page title (non-mini version)&lt;br /&gt;
		var mainPageTitle = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// body container&lt;br /&gt;
		var $contentText = $( '#mw-content-text' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the DOM tree&lt;br /&gt;
		var $container = $( '&amp;lt;div&amp;gt;' );&lt;br /&gt;
		var $table = $( '&amp;lt;table&amp;gt;' );&lt;br /&gt;
		var $thead = $( '&amp;lt;thead&amp;gt;' );&lt;br /&gt;
		var $tbody = $( '&amp;lt;tbody&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the stats container&lt;br /&gt;
		$container.addClass( 'minipedia-stats' );&lt;br /&gt;
&lt;br /&gt;
		// put a title&lt;br /&gt;
		$container.append( $( '&amp;lt;h2&amp;gt;' ).text( L10N.statsTitle ) );&lt;br /&gt;
&lt;br /&gt;
		// put the table&lt;br /&gt;
		$container.append( $table );&lt;br /&gt;
&lt;br /&gt;
		// add table headers&lt;br /&gt;
		$thead.append(&lt;br /&gt;
			$( '&amp;lt;tr&amp;gt;' ).append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSubject    ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingValue      ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingExpected   ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSimplicity ) )&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// prepare the table&lt;br /&gt;
		$table.addClass( 'wikitable' )&lt;br /&gt;
		      .append( $thead )&lt;br /&gt;
		      .append( $tbody );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Append a row (with a label and a value) into a table&lt;br /&gt;
		 *&lt;br /&gt;
		 * The data argument accepts an object with:&lt;br /&gt;
		 *&lt;br /&gt;
		 *   className:        Class name for the row&lt;br /&gt;
		 *   label:            Text displayed in row heading (left)&lt;br /&gt;
		 *   text:             Text displayed in row data (right)&lt;br /&gt;
		 *   value             Value associated to the text of the mini version&lt;br /&gt;
		 *   maxValue          Maximum suggested value&lt;br /&gt;
		 *   upstreamValue     The value of the upstream (main) version&lt;br /&gt;
		 *   upstreamLimitPerc The percentage (0-100) applied to the 'upstreamValue' to inherit a suitable 'maxValue'&lt;br /&gt;
		 *&lt;br /&gt;
		 * Note: this function uses OOUI widgets. Make sure to have them loaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 * @param {Object} jQuery table&lt;br /&gt;
		 * @param {Object} Data information&lt;br /&gt;
		 */&lt;br /&gt;
		function appendTableStatsRow( $table, data ) {&lt;br /&gt;
&lt;br /&gt;
			// read arguments&lt;br /&gt;
			var className = data.className;&lt;br /&gt;
			var label     = data.label;&lt;br /&gt;
			var value     = data.value;&lt;br /&gt;
			var maxValue  = data.maxValue;&lt;br /&gt;
			var text      = data.text || value;&lt;br /&gt;
&lt;br /&gt;
			// eventually calculate the max value&lt;br /&gt;
			if( !maxValue &amp;amp;&amp;amp; data.upstreamValue &amp;amp;&amp;amp; data.upstreamLimitPerc ) {&lt;br /&gt;
				maxValue = applyPercentage( data.upstreamValue, data.upstreamLimitPerc );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// prepare table stats row&lt;br /&gt;
			var $tr         = $( '&amp;lt;tr&amp;gt;' );&lt;br /&gt;
			var $tdLabel    = $( '&amp;lt;td&amp;gt;' ).text( label    );&lt;br /&gt;
			var $tdValue    = $( '&amp;lt;td&amp;gt;' ).text( text     );&lt;br /&gt;
			var $tdMax      = $( '&amp;lt;td&amp;gt;' ).text( maxValue );&lt;br /&gt;
			var $tdProgress = $( '&amp;lt;td&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
			// build the table row&lt;br /&gt;
			$tr.addClass( 'minipedia-stats-row-' + className );&lt;br /&gt;
			$tr.append( $tdLabel    )&lt;br /&gt;
			   .append( $tdValue    )&lt;br /&gt;
			   .append( $tdMax      )&lt;br /&gt;
			   .append( $tdProgress );&lt;br /&gt;
&lt;br /&gt;
			// if possible, plot a cute progress bar&lt;br /&gt;
			if( maxValue ) {&lt;br /&gt;
&lt;br /&gt;
				// calculate a 0-100 progress since the value and maxValue&lt;br /&gt;
				var realPercentage = parseInt( value / maxValue * 100 );&lt;br /&gt;
&lt;br /&gt;
				/**&lt;br /&gt;
				 * Calculate the inverse percentage&lt;br /&gt;
				 *&lt;br /&gt;
				 * This is the final percentage shown to the user.&lt;br /&gt;
				 *&lt;br /&gt;
				 * In short, it's always 100% but if you go over&lt;br /&gt;
				 * the limit it start decreasing and reaching zero,&lt;br /&gt;
				 * to rappresent a kind of 'understanding degradation'.&lt;br /&gt;
				 *&lt;br /&gt;
				 * To do not underrate the work of the user it should not go&lt;br /&gt;
				 * below a certain minimum amount. Example: 10%. :^)&lt;br /&gt;
				 *&lt;br /&gt;
				 * Actually the function is just linear.&lt;br /&gt;
				 */&lt;br /&gt;
				var inversePercentage = 100;&lt;br /&gt;
				if( realPercentage &amp;gt; 100 ) {&lt;br /&gt;
					inversePercentage = Math.max( 10, 200 - realPercentage );&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// generate the progress bar&lt;br /&gt;
				var progressBar = new OO.ui.ProgressBarWidget( {&lt;br /&gt;
					progress: inversePercentage,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// show the progress bar&lt;br /&gt;
				$tdProgress.append( progressBar.$element );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// attach some data to be read by scripts&lt;br /&gt;
			$tr.data( 'ministats', data );&lt;br /&gt;
&lt;br /&gt;
			// eventually emphasize if something is wrong&lt;br /&gt;
			if( value &amp;amp;&amp;amp; maxValue &amp;amp;&amp;amp; value &amp;gt; maxValue ) {&lt;br /&gt;
				$tr.addClass( 'minipedia-stats-row-problem' );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// show the row in the stats table&lt;br /&gt;
			$table.append( $tr );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// request multiple stuff at the same time&lt;br /&gt;
		$.when(&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the current mini page&lt;br /&gt;
			queryContentStats(),&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the related non-mini page&lt;br /&gt;
			queryContentStats( mainPageTitle ),&lt;br /&gt;
&lt;br /&gt;
			// require the progress bar widget&lt;br /&gt;
			mw.loader.using( 'oojs-ui-widgets' )&lt;br /&gt;
&lt;br /&gt;
		// callback fired when we have all the information&lt;br /&gt;
		).done( function( statsMini, statsMain, mwLoader ) {&lt;br /&gt;
&lt;br /&gt;
			// show the stats container at the bottom of the page when we have something&lt;br /&gt;
			$contentText.append( $container );&lt;br /&gt;
&lt;br /&gt;
			// check if we have also some information from the main namespace&lt;br /&gt;
			// in this case we can do a comparison&lt;br /&gt;
			if( statsMain ) {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they can be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'long-words',&lt;br /&gt;
					label:             L10N.statsComplexWords,&lt;br /&gt;
					value:             statsMini.totalLongWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalLongWords,&lt;br /&gt;
					upstreamLimitPerc: 10,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'words',&lt;br /&gt;
					label:             L10N.statsWords,&lt;br /&gt;
					value:             statsMini.totalWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalWords,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'lines',&lt;br /&gt;
					label:             L10N.statsLines,&lt;br /&gt;
					value:             statsMini.totalLines,&lt;br /&gt;
					maxValue:          statsMain.totalLines,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );	&lt;br /&gt;
&lt;br /&gt;
			// there is no the related main page&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they cannot be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'long-words',&lt;br /&gt;
					label:     L10N.statsComplexWords,&lt;br /&gt;
					value:     statsMini.totalLongWords,&lt;br /&gt;
					maxValue:  mp.maxComplexWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'words',&lt;br /&gt;
					label:     L10N.statsWords,&lt;br /&gt;
					value:     statsMini.totalWords,&lt;br /&gt;
					maxValue:  mp.maxStatsWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'lines',&lt;br /&gt;
					label:      L10N.statsLines,&lt;br /&gt;
					value:      statsMini.totalLines,&lt;br /&gt;
					maxValue:   mp.maxTotalLines,&lt;br /&gt;
				} );&lt;br /&gt;
			}&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia namespace&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipedia() {&lt;br /&gt;
&lt;br /&gt;
		// action of the page (edit, view etc.)&lt;br /&gt;
		var action = mw.config.get( 'wgAction' );&lt;br /&gt;
&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Normalpedia title object&lt;br /&gt;
		var normalTitleObject = new mw.Title( pageName );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var normalPageName = normalTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var normalPageUrl = normalTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var normalVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			normalPageUrl,&lt;br /&gt;
			L10N.normalpediaShort,&lt;br /&gt;
			'ca-normalpedia',&lt;br /&gt;
			L10N.openNormalpedia&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// check if we are in view mode&lt;br /&gt;
		if( action === 'view' ) {&lt;br /&gt;
&lt;br /&gt;
			// in view mode we can fetch the stats&lt;br /&gt;
			prepareMinipediaStatsBox();&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareMinipedia()&lt;br /&gt;
&lt;br /&gt;
	// work only in the main namespace&lt;br /&gt;
	var ns = mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	if( ns === 0 ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
	} else if( ns == mp.namespaceNum ) {&lt;br /&gt;
		prepareMinipedia();&lt;br /&gt;
	}&lt;br /&gt;
	// end namespace zero check&lt;br /&gt;
&lt;br /&gt;
} )( $, mw );&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=77</id>
		<title>Mini:Quaternioni</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=77"/>
		<updated>2020-08-14T14:43:37Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.  I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=76</id>
		<title>Mini:Quaternioni</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=76"/>
		<updated>2020-08-14T14:41:57Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=75</id>
		<title>Mini:Quaternioni</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=75"/>
		<updated>2020-08-14T14:41:44Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=74</id>
		<title>Mini:Quaternioni</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=74"/>
		<updated>2020-08-14T14:41:27Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;br /&gt;
[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=73</id>
		<title>MediaWiki:Gadget-minipedia.js</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=MediaWiki:Gadget-minipedia.js&amp;diff=73"/>
		<updated>2020-08-14T14:40:57Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: improve text analysis and introduce reverse progress bar starting from 100% and then degradating&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/**&lt;br /&gt;
 * Make Minipedia magics&lt;br /&gt;
 *&lt;br /&gt;
 * Dependencies: mediawiki.util&lt;br /&gt;
 *&lt;br /&gt;
 * See https://phabricator.wikimedia.org/tag/minipedia/&lt;br /&gt;
 *&lt;br /&gt;
 * @revision 2020-06-27&lt;br /&gt;
 */&lt;br /&gt;
( function ( $, mw ) {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * CONFIGURATION/LOCALIZATION INSTRUCTIONS&lt;br /&gt;
	 *&lt;br /&gt;
	 * Declare somewhere something like this:&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // assure that you do not overwrite other-people customizations&lt;br /&gt;
	 *   window.MiniPedia      = window.MiniPedia      || {};&lt;br /&gt;
	 *   window.MiniPedia.L10N = window.MiniPedia.L10N || {};&lt;br /&gt;
	 *&lt;br /&gt;
	 *   // then customize something&lt;br /&gt;
 	 *   window.MiniPedia.editIntro      = 'Project:How to create';&lt;br /&gt;
	 *   window.MiniPedia.L10N.minipedia = 'Otherpedia';&lt;br /&gt;
	 */&lt;br /&gt;
&lt;br /&gt;
	// load localization defaults&lt;br /&gt;
	var DEFAULTS = {&lt;br /&gt;
		// namespace prefix configured in your LocalSettings.php&lt;br /&gt;
		namespace: 'Mini',&lt;br /&gt;
&lt;br /&gt;
		// namespace number configured in your LocalSettings.php&lt;br /&gt;
		namespaceNum: 3002,&lt;br /&gt;
&lt;br /&gt;
		// default edit intro page title&lt;br /&gt;
		editIntro: 'Progetto:Minipedia/Creazione voce',&lt;br /&gt;
&lt;br /&gt;
		// how much characters should have a word to be considered too much lon&lt;br /&gt;
		// this somehow help people with dyslexia&lt;br /&gt;
		longWordLen: 13,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of acceptable complex words to help people with dyslexia&lt;br /&gt;
		maxComplexWords: 10,&lt;br /&gt;
&lt;br /&gt;
		// min and max number of suggested words to somehow mitigate attention span problems&lt;br /&gt;
		maxWords: 700,&lt;br /&gt;
&lt;br /&gt;
		// maximum number of suggested newlines&lt;br /&gt;
		maxTotalLines: 180,&lt;br /&gt;
&lt;br /&gt;
		// localization stuff&lt;br /&gt;
		L10N: {&lt;br /&gt;
			minipedia: &amp;quot;Minipedia&amp;quot;,&lt;br /&gt;
			minipediaShort: &amp;quot;Mini&amp;quot;,&lt;br /&gt;
			normalpedia: &amp;quot;Wikipedia Test&amp;quot;,&lt;br /&gt;
			normalpediaShort: &amp;quot;WikipediaTest&amp;quot;,&lt;br /&gt;
			openMinipedia: &amp;quot;Apri Minipedia&amp;quot;,&lt;br /&gt;
			openNormalpedia: &amp;quot;Apri Wikipedia Test&amp;quot;,&lt;br /&gt;
			createMinipediaPageTitle: &amp;quot;Accesso Minipedia&amp;quot;,&lt;br /&gt;
			createMinipediaPageBody: &amp;quot;Sii il primo a creare una versione più ridotta e più accessibile di questa voce, in Minipedia!&amp;quot;,&lt;br /&gt;
			statsTitle: &amp;quot;Mini Report&amp;quot;,&lt;br /&gt;
			statsHeadingSubject: &amp;quot;Fattore&amp;quot;,&lt;br /&gt;
			statsHeadingValue: &amp;quot;Valore attuale&amp;quot;,&lt;br /&gt;
			statsHeadingExpected: &amp;quot;Limite consigliato&amp;quot;,&lt;br /&gt;
			statsHeadingSimplicity: &amp;quot;Semplicità&amp;quot;,&lt;br /&gt;
			statsWords: &amp;quot;Parole&amp;quot;,&lt;br /&gt;
			statsLines: &amp;quot;Paragrafi&amp;quot;,&lt;br /&gt;
			statsComplexWords: &amp;quot;Parole complesse&amp;quot;,&lt;br /&gt;
		},&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	// global configuration&lt;br /&gt;
	window.MiniPedia = window.MiniPedia || {};&lt;br /&gt;
&lt;br /&gt;
	// shortcut&lt;br /&gt;
	var mp = window.MiniPedia;&lt;br /&gt;
&lt;br /&gt;
	// inherit default configurations&lt;br /&gt;
	$.extend( true, mp, DEFAULTS );&lt;br /&gt;
&lt;br /&gt;
	// another shortcut&lt;br /&gt;
	var L10N = mp.L10N;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Lazy shortcut to obtain just the first API result&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param  {Object} response API Response&lt;br /&gt;
	 * @return {Object} page object&lt;br /&gt;
	 */&lt;br /&gt;
	function justFirstQueryPage( response ) {&lt;br /&gt;
&lt;br /&gt;
		// no response no party&lt;br /&gt;
		if( !response.query || !response.query.pages ) {&lt;br /&gt;
			throw 'no valid API response';&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// the list should contain just one page&lt;br /&gt;
		var pages = response.query.pages;&lt;br /&gt;
		for( var id in pages ) {&lt;br /&gt;
			return pages[ id ];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// no page no party&lt;br /&gt;
		return false;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Get a fresh MediaWiki API object&lt;br /&gt;
	 *&lt;br /&gt;
	 * @return mw.Api&lt;br /&gt;
	 */&lt;br /&gt;
	function mwApi() {&lt;br /&gt;
		return mw.loader.using( 'mediawiki.api' ).then( function() {&lt;br /&gt;
			return new mw.Api();&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Check if a page title already exists&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param title Page title&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function pageExists( title ) {&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'info',&lt;br /&gt;
			titles: title,&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// eventually load API stuff&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request			&lt;br /&gt;
			return api.get( request ).then( function ( response ) {&lt;br /&gt;
&lt;br /&gt;
				// check if it exists&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 ) {&lt;br /&gt;
					return page;&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				return false;&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query the current page plain text&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page name (or none for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryPlainText( pageName ) {&lt;br /&gt;
&lt;br /&gt;
		// complete page title with namespace&lt;br /&gt;
		pageName = pageName || mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the API request&lt;br /&gt;
		// See https://phabricator.wikimedia.org/T259332&lt;br /&gt;
		var request = {&lt;br /&gt;
			action: 'query',&lt;br /&gt;
			prop: 'extracts',&lt;br /&gt;
			titles: pageName,&lt;br /&gt;
			explaintext: 1,&lt;br /&gt;
			exlimit: 1,&lt;br /&gt;
			exsectionformat: 'plain',&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// this will return a Promise resolving the page plain text, returned upstream&lt;br /&gt;
		return mwApi().then( function( api ) {&lt;br /&gt;
&lt;br /&gt;
			// make the API request and return a Promise&lt;br /&gt;
			return api.get( request ).then( function( response ) {&lt;br /&gt;
		&lt;br /&gt;
				// resolve the Promise with the page content&lt;br /&gt;
				var page = justFirstQueryPage( response );&lt;br /&gt;
				if( page &amp;amp;&amp;amp; page.pageid &amp;amp;&amp;amp; page.pageid &amp;gt; 0 &amp;amp;&amp;amp; page.extract ) {&lt;br /&gt;
					return page.extract; &lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// no content&lt;br /&gt;
				return false;&lt;br /&gt;
				&lt;br /&gt;
			} );&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the wiki&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareNormalpedia() {&lt;br /&gt;
	&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgPageName' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Minipedia title object&lt;br /&gt;
		var miniTitleObject = new mw.Title( pageName,  mp.namespaceNum );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var miniPageName = miniTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var miniPageUrl = miniTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Go to the Minipedia page in edit mode&lt;br /&gt;
		 *&lt;br /&gt;
		 * The page in the main namespace will be preloaded.&lt;br /&gt;
		 &lt;br /&gt;
		 */&lt;br /&gt;
		function goToMinipediaEditPage() {&lt;br /&gt;
&lt;br /&gt;
			/**&lt;br /&gt;
			 * Build the query string to edit a page&lt;br /&gt;
			 *&lt;br /&gt;
			 * TODO: eventually add VisualEditor support&lt;br /&gt;
			 */&lt;br /&gt;
			var editPageQueryString = {&lt;br /&gt;
				action: 'edit',&lt;br /&gt;
				title: miniPageName,&lt;br /&gt;
				preload: pageName,&lt;br /&gt;
				editintro: mp.editIntro,			&lt;br /&gt;
			};&lt;br /&gt;
&lt;br /&gt;
			// '/index.php'&lt;br /&gt;
			var wgScript = mw.config.get( 'wgScript' );&lt;br /&gt;
&lt;br /&gt;
			// go to the edit page URL&lt;br /&gt;
			window.location = wgScript + '?' + $.param( editPageQueryString );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var miniVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			miniPageUrl,&lt;br /&gt;
			L10N.minipediaShort,&lt;br /&gt;
			'ca-minipedia',&lt;br /&gt;
			L10N.openMinipedia,&lt;br /&gt;
			'n'&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// on the mini toolback click, check if a mini version exists&lt;br /&gt;
		$( miniVersionPortletLink ).click( function( e ) {&lt;br /&gt;
		&lt;br /&gt;
			// wait for multiple information&lt;br /&gt;
			$.when(&lt;br /&gt;
				// check if the page really exists&lt;br /&gt;
				pageExists( miniPageName ),&lt;br /&gt;
&lt;br /&gt;
				// allow to open OO UI windows&lt;br /&gt;
				mw.loader.using( 'oojs-ui-windows' )&lt;br /&gt;
&lt;br /&gt;
			// callback fired when we have all the information&lt;br /&gt;
			).done( function( miniPageExists, loader ) {&lt;br /&gt;
&lt;br /&gt;
				// check if the page already exist&lt;br /&gt;
				if( miniPageExists ) {&lt;br /&gt;
&lt;br /&gt;
					// just redirect to the Minipedia version&lt;br /&gt;
					window.location = miniPageUrl;&lt;br /&gt;
				} else {&lt;br /&gt;
&lt;br /&gt;
					// ask if you want to create the page&lt;br /&gt;
&lt;br /&gt;
					// create message dialog window&lt;br /&gt;
					var messageDialog = new OO.ui.MessageDialog();&lt;br /&gt;
					var windowManager = new OO.ui.WindowManager();&lt;br /&gt;
					$( 'body' ).append( windowManager.$element );&lt;br /&gt;
					windowManager.addWindows( [ messageDialog ] );&lt;br /&gt;
&lt;br /&gt;
					// configure and open dialog&lt;br /&gt;
					var windowInstance = windowManager.openWindow( messageDialog, {&lt;br /&gt;
						title:   L10N.createMinipediaPageTitle,&lt;br /&gt;
						message: L10N.createMinipediaPageBody,&lt;br /&gt;
					} );&lt;br /&gt;
&lt;br /&gt;
					// check if you accepted the page creation&lt;br /&gt;
					windowInstance.closed.then( function ( data ) {&lt;br /&gt;
&lt;br /&gt;
						// user is confirming the action&lt;br /&gt;
						if( data.action === 'accept' ) {&lt;br /&gt;
&lt;br /&gt;
							// go go go! to mini&lt;br /&gt;
							goToMinipediaEditPage();&lt;br /&gt;
						}&lt;br /&gt;
					} );&lt;br /&gt;
&lt;br /&gt;
				}&lt;br /&gt;
				// end if page exists&lt;br /&gt;
&lt;br /&gt;
			} );&lt;br /&gt;
			// end $.when()&lt;br /&gt;
&lt;br /&gt;
			// avoid scrolling to the top&lt;br /&gt;
			e.preventDefault();&lt;br /&gt;
&lt;br /&gt;
		} );&lt;br /&gt;
		// end $( miniVersionPortletLink ).click&lt;br /&gt;
&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareNormalWiki()&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Calculate some stats over a text&lt;br /&gt;
	 */&lt;br /&gt;
	function textStats( text ) {&lt;br /&gt;
&lt;br /&gt;
		var stats = {};&lt;br /&gt;
&lt;br /&gt;
		text = text.trim();&lt;br /&gt;
&lt;br /&gt;
		// count long words&lt;br /&gt;
		var totalLongWords = 0;&lt;br /&gt;
		var word, words = text.split( /\s+/ );&lt;br /&gt;
		for( var i = 0; i &amp;lt; words.length; i++ ) {&lt;br /&gt;
			word = words[i];&lt;br /&gt;
			if( word.length &amp;gt; mp.longWordLen ) {&lt;br /&gt;
				totalLongWords++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// total amount of paragraphs&lt;br /&gt;
		// paragraphs shorter than this comment are discarded&lt;br /&gt;
		var totalLines = 0;&lt;br /&gt;
		var paragraphs = text.split( /\n+/ );&lt;br /&gt;
		var paragraph;&lt;br /&gt;
		for( var i = 0; i &amp;lt; paragraphs.length; i++ ) {&lt;br /&gt;
			paragraph = paragraphs[i].trim();&lt;br /&gt;
			if( paragraph.length &amp;gt; 30 ) {&lt;br /&gt;
				console.log( paragraph );&lt;br /&gt;
				totalLines++;&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		// how much lines?&lt;br /&gt;
		stats.totalLines = totalLines;&lt;br /&gt;
&lt;br /&gt;
		// how much words?&lt;br /&gt;
		stats.totalWords = words.length;&lt;br /&gt;
&lt;br /&gt;
		// how much of these words are so much long?&lt;br /&gt;
		// See 'longWordLen'&lt;br /&gt;
		stats.totalLongWords = totalLongWords;&lt;br /&gt;
&lt;br /&gt;
		return stats;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Query content stats of the current page&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {String} Page title (or nothing for the current one)&lt;br /&gt;
	 * @return Promise&lt;br /&gt;
	 */&lt;br /&gt;
	function queryContentStats( pageTitle ) {&lt;br /&gt;
		return queryPlainText( pageTitle ).then( textStats );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Apply a stupid percentage&lt;br /&gt;
	 *&lt;br /&gt;
	 * @param {int} a&lt;br /&gt;
	 * @param {int} b&lt;br /&gt;
	 * @return The 'b%' applied to 'a'&lt;br /&gt;
	 */&lt;br /&gt;
	function applyPercentage( a, b ) {&lt;br /&gt;
		return parseInt( a * b / 100 );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia stats box&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipediaStatsBox() {&lt;br /&gt;
&lt;br /&gt;
		// normal page title (non-mini version)&lt;br /&gt;
		var mainPageTitle = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// body container&lt;br /&gt;
		var $contentText = $( '#mw-content-text' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the DOM tree&lt;br /&gt;
		var $container = $( '&amp;lt;div&amp;gt;' );&lt;br /&gt;
		var $table = $( '&amp;lt;table&amp;gt;' );&lt;br /&gt;
		var $thead = $( '&amp;lt;thead&amp;gt;' );&lt;br /&gt;
		var $tbody = $( '&amp;lt;tbody&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the stats container&lt;br /&gt;
		$container.addClass( 'minipedia-stats' );&lt;br /&gt;
&lt;br /&gt;
		// put a title&lt;br /&gt;
		$container.append( $( '&amp;lt;h2&amp;gt;' ).text( L10N.statsTitle ) );&lt;br /&gt;
&lt;br /&gt;
		// put the table&lt;br /&gt;
		$container.append( $table );&lt;br /&gt;
&lt;br /&gt;
		// add table headers&lt;br /&gt;
		$thead.append(&lt;br /&gt;
			$( '&amp;lt;tr&amp;gt;' ).append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSubject    ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingValue      ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingExpected   ) )&lt;br /&gt;
				   .append( $( '&amp;lt;th&amp;gt;' ).text( L10N.statsHeadingSimplicity ) )&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// prepare the table&lt;br /&gt;
		$table.addClass( 'wikitable' )&lt;br /&gt;
		      .append( $thead )&lt;br /&gt;
		      .append( $tbody );&lt;br /&gt;
&lt;br /&gt;
		/**&lt;br /&gt;
		 * Append a row (with a label and a value) into a table&lt;br /&gt;
		 *&lt;br /&gt;
		 * The data argument accepts an object with:&lt;br /&gt;
		 *&lt;br /&gt;
		 *   className:        Class name for the row&lt;br /&gt;
		 *   label:            Text displayed in row heading (left)&lt;br /&gt;
		 *   text:             Text displayed in row data (right)&lt;br /&gt;
		 *   value             Value associated to the text of the mini version&lt;br /&gt;
		 *   maxValue          Maximum suggested value&lt;br /&gt;
		 *   upstreamValue     The value of the upstream (main) version&lt;br /&gt;
		 *   upstreamLimitPerc The percentage (0-100) applied to the 'upstreamValue' to inherit a suitable 'maxValue'&lt;br /&gt;
		 *&lt;br /&gt;
		 * Note: this function uses OOUI widgets. Make sure to have them loaded.&lt;br /&gt;
		 *&lt;br /&gt;
		 * @param {Object} jQuery table&lt;br /&gt;
		 * @param {Object} Data information&lt;br /&gt;
		 */&lt;br /&gt;
		function appendTableStatsRow( $table, data ) {&lt;br /&gt;
&lt;br /&gt;
			// read arguments&lt;br /&gt;
			var className = data.className;&lt;br /&gt;
			var label     = data.label;&lt;br /&gt;
			var value     = data.value;&lt;br /&gt;
			var maxValue  = data.maxValue;&lt;br /&gt;
			var text      = data.text || value;&lt;br /&gt;
&lt;br /&gt;
			// eventually calculate the max value&lt;br /&gt;
			if( !maxValue &amp;amp;&amp;amp; data.upstreamValue &amp;amp;&amp;amp; data.upstreamLimitPerc ) {&lt;br /&gt;
				maxValue = applyPercentage( data.upstreamValue, data.upstreamLimitPerc );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// prepare table stats row&lt;br /&gt;
			var $tr         = $( '&amp;lt;tr&amp;gt;' );&lt;br /&gt;
			var $tdLabel    = $( '&amp;lt;td&amp;gt;' ).text( label    );&lt;br /&gt;
			var $tdValue    = $( '&amp;lt;td&amp;gt;' ).text( text     );&lt;br /&gt;
			var $tdMax      = $( '&amp;lt;td&amp;gt;' ).text( maxValue );&lt;br /&gt;
			var $tdProgress = $( '&amp;lt;td&amp;gt;' );&lt;br /&gt;
&lt;br /&gt;
			// build the table row&lt;br /&gt;
			$tr.addClass( 'minipedia-stats-row-' + className );&lt;br /&gt;
			$tr.append( $tdLabel    )&lt;br /&gt;
			   .append( $tdValue    )&lt;br /&gt;
			   .append( $tdMax      )&lt;br /&gt;
			   .append( $tdProgress );&lt;br /&gt;
&lt;br /&gt;
			// if possible, plot a cute progress bar&lt;br /&gt;
			if( maxValue ) {&lt;br /&gt;
&lt;br /&gt;
				// calculate a 0-100 progress since the value and maxValue&lt;br /&gt;
				var realPercentage = parseInt( value / maxValue * 100 );&lt;br /&gt;
&lt;br /&gt;
				/**&lt;br /&gt;
				 * Calculate the inverse percentage&lt;br /&gt;
				 *&lt;br /&gt;
				 * This is the final percentage shown to the user.&lt;br /&gt;
				 *&lt;br /&gt;
				 * In short, it's always 100% but if you go over&lt;br /&gt;
				 * the limit it start decreasing and reaching zero,&lt;br /&gt;
				 * to rappresent a kind of 'understanding degradation'.&lt;br /&gt;
				 *&lt;br /&gt;
				 * To do not underrate the work of the user it should not go&lt;br /&gt;
				 * below a certain minimum amount. Example: 10%. :)&lt;br /&gt;
				 */&lt;br /&gt;
				var inversePercentage = 100;&lt;br /&gt;
				if( realPercentage &amp;gt; 100 ) {&lt;br /&gt;
					inversePercentage = Math.min( 10, 100 - realPercentage );	&lt;br /&gt;
				}&lt;br /&gt;
&lt;br /&gt;
				// generate the progress bar&lt;br /&gt;
				var progressBar = new OO.ui.ProgressBarWidget( {&lt;br /&gt;
					progress: inversePercentage,&lt;br /&gt;
				} );&lt;br /&gt;
&lt;br /&gt;
				// show the progress bar&lt;br /&gt;
				$tdProgress.append( progressBar.$element );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// attach some data to be read by scripts&lt;br /&gt;
			$tr.data( 'ministats', data );&lt;br /&gt;
&lt;br /&gt;
			// eventually emphasize if something is wrong&lt;br /&gt;
			if( value &amp;amp;&amp;amp; maxValue &amp;amp;&amp;amp; value &amp;gt; maxValue ) {&lt;br /&gt;
				$tr.addClass( 'minipedia-stats-row-problem' );&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// show the row in the stats table&lt;br /&gt;
			$table.append( $tr );&lt;br /&gt;
		};&lt;br /&gt;
&lt;br /&gt;
		// request multiple stuff at the same time&lt;br /&gt;
		$.when(&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the current mini page&lt;br /&gt;
			queryContentStats(),&lt;br /&gt;
&lt;br /&gt;
			// query the page plain text of the related non-mini page&lt;br /&gt;
			queryContentStats( mainPageTitle ),&lt;br /&gt;
&lt;br /&gt;
			// require the progress bar widget&lt;br /&gt;
			mw.loader.using( 'oojs-ui-widgets' )&lt;br /&gt;
&lt;br /&gt;
		// callback fired when we have all the information&lt;br /&gt;
		).done( function( statsMini, statsMain, mwLoader ) {&lt;br /&gt;
&lt;br /&gt;
			// show the stats container at the bottom of the page when we have something&lt;br /&gt;
			$contentText.append( $container );&lt;br /&gt;
&lt;br /&gt;
			// check if we have also some information from the main namespace&lt;br /&gt;
			// in this case we can do a comparison&lt;br /&gt;
			if( statsMain ) {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they can be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'long-words',&lt;br /&gt;
					label:             L10N.statsComplexWords,&lt;br /&gt;
					value:             statsMini.totalLongWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalLongWords,&lt;br /&gt;
					upstreamLimitPerc: 10,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'words',&lt;br /&gt;
					label:             L10N.statsWords,&lt;br /&gt;
					value:             statsMini.totalWords,&lt;br /&gt;
					upstreamValue:     statsMain.totalWords,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className:         'lines',&lt;br /&gt;
					label:             L10N.statsLines,&lt;br /&gt;
					value:             statsMini.totalLines,&lt;br /&gt;
					maxValue:          statsMain.totalLines,&lt;br /&gt;
					upstreamLimitPerc: 30,&lt;br /&gt;
				} );	&lt;br /&gt;
&lt;br /&gt;
			// there is no the related main page&lt;br /&gt;
			} else {&lt;br /&gt;
&lt;br /&gt;
				// show the number of words, lines and complex words (actually just long words)&lt;br /&gt;
				// they cannot be compared to the main version&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'long-words',&lt;br /&gt;
					label:     L10N.statsComplexWords,&lt;br /&gt;
					value:     statsMini.totalLongWords,&lt;br /&gt;
					maxValue:  mp.maxComplexWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'words',&lt;br /&gt;
					label:     L10N.statsWords,&lt;br /&gt;
					value:     statsMini.totalWords,&lt;br /&gt;
					maxValue:  mp.maxStatsWords,&lt;br /&gt;
				} );&lt;br /&gt;
				appendTableStatsRow( $table, {&lt;br /&gt;
					className: 'lines',&lt;br /&gt;
					label:      L10N.statsLines,&lt;br /&gt;
					value:      statsMini.totalLines,&lt;br /&gt;
					maxValue:   mp.maxTotalLines,&lt;br /&gt;
				} );&lt;br /&gt;
			}&lt;br /&gt;
		} );&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Prepare the Minipedia namespace&lt;br /&gt;
	 */&lt;br /&gt;
	function prepareMinipedia() {&lt;br /&gt;
&lt;br /&gt;
		// action of the page (edit, view etc.)&lt;br /&gt;
		var action = mw.config.get( 'wgAction' );&lt;br /&gt;
&lt;br /&gt;
		// normal page title and mini version&lt;br /&gt;
		var pageName = mw.config.get( 'wgTitle' );&lt;br /&gt;
&lt;br /&gt;
		// prepare the Normalpedia title object&lt;br /&gt;
		var normalTitleObject = new mw.Title( pageName );&lt;br /&gt;
&lt;br /&gt;
		// minipedia page title with prefix&lt;br /&gt;
		var normalPageName = normalTitleObject.getPrefixedText();&lt;br /&gt;
&lt;br /&gt;
		// minipedia page URL&lt;br /&gt;
		var normalPageUrl = normalTitleObject.getUrl();&lt;br /&gt;
&lt;br /&gt;
		// add a &amp;quot;Minipedia&amp;quot;&lt;br /&gt;
		var normalVersionPortletLink = mw.util.addPortletLink(&lt;br /&gt;
			'p-namespaces',&lt;br /&gt;
			normalPageUrl,&lt;br /&gt;
			L10N.normalpediaShort,&lt;br /&gt;
			'ca-normalpedia',&lt;br /&gt;
			L10N.openNormalpedia&lt;br /&gt;
		);&lt;br /&gt;
&lt;br /&gt;
		// check if we are in view mode&lt;br /&gt;
		if( action === 'view' ) {&lt;br /&gt;
&lt;br /&gt;
			// in view mode we can fetch the stats&lt;br /&gt;
			prepareMinipediaStatsBox();&lt;br /&gt;
		}&lt;br /&gt;
	};&lt;br /&gt;
	// end prepareMinipedia()&lt;br /&gt;
&lt;br /&gt;
	// work only in the main namespace&lt;br /&gt;
	var ns = mw.config.get( 'wgNamespaceNumber' );&lt;br /&gt;
	if( ns === 0 ) {&lt;br /&gt;
		prepareNormalpedia();&lt;br /&gt;
	} else if( ns == mp.namespaceNum ) {&lt;br /&gt;
		prepareMinipedia();&lt;br /&gt;
	}&lt;br /&gt;
	// end namespace zero check&lt;br /&gt;
&lt;br /&gt;
} )( $, mw );&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Tommaso_d%27Aquino&amp;diff=72</id>
		<title>Mini:Tommaso d'Aquino</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Tommaso_d%27Aquino&amp;diff=72"/>
		<updated>2020-08-03T14:16:29Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: test overlink&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tommaso d'Aquino era un frate domenicano venerato come santo dalla Chiesa cattolica ed è il maggiore esponente della {{Minipedia|Scolastica}}. Rappresenta uno dei principali pilastri teologici e filosofici della Chiesa cattolica per essere stato il punto di raccordo fra la cristianità e la filosofia classica.&lt;br /&gt;
&lt;br /&gt;
Tommaso non ha inventato i {{Minipedia|Quaternioni}}&lt;br /&gt;
&lt;br /&gt;
==Biografia==&lt;br /&gt;
Tommaso dei conti d'Aquino nacque, forse nel 1225, nella contea di Aquino, attualmente in provincia di {{Minipedia|Frosinone}}, quando faceva parte del Regno di Sicilia. Secondo un'altra tesi meno accreditata, però, sarebbe invece nato a Belcastro in Calabria, sempre possedimento dei conti d'Aquino.&lt;br /&gt;
&lt;br /&gt;
La data di nascita non è certa e viene calcolata in maniera approssimativa a partire da quella di morte e dall'età che aveva nel momento in cui morì. Ad ogni modo sembra che ci sia accordo nel fissare la sua data di nascita tra il 1224 e il 1226.&lt;br /&gt;
&lt;br /&gt;
Secondo le usanze del tempo Tommaso, essendo il figlio più piccolo, era destinato alla vita ecclesiastica e per questo fu inviato a soli cinque anni nella vicina Abbazia di Montecassino, di cui suo zio era abate. Qui Tommaso ricevette i primi rudimenti delle lettere e fu iniziato alla vita religiosa benedettina.&lt;br /&gt;
&lt;br /&gt;
Nel 1236 la famiglia inviò Tommaso quasi quindicenne a Napoli per seguire studi più approfonditi. Qui nell'autunno del 1239 si iscrisse al nuovo Studium, l'Università degli studi fondata nel 1224.&lt;br /&gt;
&lt;br /&gt;
Proprio a Napoli Tommaso conobbe i Domenicani e lasciò i Benedettini per quest'ordine in cui entrò nell'aprile del 1244 contro il parere della famiglia che invece progettava per lui l'incarico di abate di Montecassino. &lt;br /&gt;
&lt;br /&gt;
Rapito dai fratelli, venne portato nel castello di famiglia di Castello di Monte San Giovanni Campano per fargli cambiare idea, ma Tommaso restò fermo nella sua decisione per cui tornò al convento di Napoli nell'estate del 1245.&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Moto_circolare&amp;diff=71</id>
		<title>Mini:Moto circolare</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Moto_circolare&amp;diff=71"/>
		<updated>2020-08-03T14:08:02Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: test overlink&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Il '''moto circolare uniforme''' è il movimento di un corpo su una circonferenza con velocità costante, cioè percorrendo la circonferenza in tempi sempre uguali.&lt;br /&gt;
&lt;br /&gt;
Non c'entra nulla coi {{minipedia|quaternioni}} o con il {{Minipedia|minimo comune multiplo}}.&lt;br /&gt;
&lt;br /&gt;
==Campo di studio==&lt;br /&gt;
Il moto circolare è uno dei moti semplici studiati dalla fisica ed ha numerose applicazioni pratiche.&lt;br /&gt;
&lt;br /&gt;
[[File:Accelerazione circolare.svg|Accelerazione circolare]]&lt;br /&gt;
&lt;br /&gt;
== Esempi==&lt;br /&gt;
* Il movimento di un seggiolino di una giostra panoramica.&lt;br /&gt;
* Il movimento della punta delle 3 lancette dell'orologio, cioè quelle dei minuti, secondi, e ore, che viaggiano senza mai fermarsi con la stessa velocità sulla circonferenza.&lt;br /&gt;
* Il movimento di una stazione orbitale intorno alla terra.&lt;br /&gt;
&lt;br /&gt;
==Note==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bibliografia==&lt;br /&gt;
* Scienze Focus,Volume A, Luigi Leopardi, Chiara Cateni, Massimo Temporelli, Francesca Bolognani, Casa editrice: Dea Scuola&lt;br /&gt;
&lt;br /&gt;
==Collegamenti esterni==&lt;br /&gt;
* [https://it.wikipedia.org/wiki/Moto_circolare wikipedia Moto circolare uniforme]&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Minimo_comune_multiplo&amp;diff=70</id>
		<title>Mini:Minimo comune multiplo</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Minimo_comune_multiplo&amp;diff=70"/>
		<updated>2020-08-03T13:58:50Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: /* Bibliografia */ -wikipedianization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Il '''minimo comune multiplo''' non è un {{Minipedia|Quaternioni|quaternione}}. È uno di due o più numeri è il più piccolo dei loro [[multipli]] comuni: m.c.m. è l'acronimo di '''minimo comune multiplo.'''&lt;br /&gt;
                                            &lt;br /&gt;
                                                   &lt;br /&gt;
==Caratteristiche==&lt;br /&gt;
I multipli comuni a due numeri sono infiniti, il più piccolo di essi è l'm.c.m.&lt;br /&gt;
* Se due numeri sono uno multiplo dell'altro, il loro m.c.m. è uguale al maggiore di essi.&lt;br /&gt;
Per esempio&lt;br /&gt;
M(60)=[60,120,180,240,300,360,420...ecc..]&amp;lt;br&amp;gt;&lt;br /&gt;
M(30)=[30,60,90,120,150,180,210...ecc..]&amp;lt;br&amp;gt;&lt;br /&gt;
          m.c.m.(60;30)=60&lt;br /&gt;
60 è il multiplo di 30, perciò è il minimo comune  multiplo dei numeri dati.&lt;br /&gt;
&lt;br /&gt;
* Il m.c.m. di due numeri primi fra loro è il loro prodotto &lt;br /&gt;
Per esempio&amp;lt;br&amp;gt;&lt;br /&gt;
M(5)=[5,10,15,20,25,30,35,40,45...60...ecc..]&amp;lt;br&amp;gt;&lt;br /&gt;
M(6)=[6,12,18,24,30,36,42...60...ecc...]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Come si calcola==&lt;br /&gt;
Prima si scompongono i numeri in fattori primi poi si prendono i fattori comuni e non comuni con l'esponente più grande.                                                                            &lt;br /&gt;
&lt;br /&gt;
Per esempio&amp;lt;br&amp;gt;&lt;br /&gt;
10=2x5&amp;lt;br&amp;gt; &lt;br /&gt;
6=2x3&amp;lt;br&amp;gt;&lt;br /&gt;
                         mcm=(10,6)=30                                                                   &lt;br /&gt;
&lt;br /&gt;
== Come usare l'm.c.m. nelle frazioni == &lt;br /&gt;
Serve per calcolare il denominatore comune di una somma o di una differenza fra frazioni; nell' addizione di più frazioni il denominatore comune è proprio  il minimo comune multiplo di tutti i singoli denominatori.&lt;br /&gt;
&lt;br /&gt;
==Bibliografia==&lt;br /&gt;
* Contaci!, Bertinetto, Metianen, Paasonen,Voutilainen, 2012, Zanichelli&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Main_Page&amp;diff=69</id>
		<title>Mini:Main Page</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Main_Page&amp;diff=69"/>
		<updated>2020-08-03T13:57:42Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: minipedization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Benvenuto in Minipedia ==&lt;br /&gt;
&lt;br /&gt;
Voci di prova:&lt;br /&gt;
&lt;br /&gt;
* {{Minipedia|Regioni di formazione stellare di Cassiopea}}&lt;br /&gt;
* {{Minipedia|Quaternioni}}&lt;br /&gt;
* {{Minipedia|Minimo comune multiplo}}&lt;br /&gt;
* {{Minipedia|Moto circolare}}&lt;br /&gt;
* {{Minipedia|Tommaso d'Aquino}}&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=68</id>
		<title>Mini:Quaternioni</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Quaternioni&amp;diff=68"/>
		<updated>2020-08-03T13:56:52Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: overlinking&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Quaternion.jpg|upright=1.4|thumb|{{Minipedia|Frattale}} costruito come {{Minipedia|insieme di Julia}}, definito con i quaternioni. Chiaro, no?]]&lt;br /&gt;
&lt;br /&gt;
I quaternioni di solito si rappresentano colorati. Hanno bei {{Minipedia|Colore|colori}}. Altrimenti non si capisce niente.&lt;br /&gt;
&lt;br /&gt;
I quaternioni si chiamano così perché sono {{Minipedia|quattro}}.&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Template:Minipedia&amp;diff=67</id>
		<title>Template:Minipedia</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Template:Minipedia&amp;diff=67"/>
		<updated>2020-08-03T13:55:21Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: +templatestyle Template:Minipedia/styles.css&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;includeonly&amp;gt;{{#ifexist:Mini:{{{1}}}|&amp;lt;templatestyles src=&amp;quot;Minipedia/styles.css&amp;quot; /&amp;gt;&amp;lt;span class=&amp;quot;minipedia-link&amp;quot;&amp;gt;[[Mini:{{{1}}}|{{{2|{{{1}}}}}}]]&amp;lt;/span&amp;gt;|{{#ifexist:{{{1}}}|[[{{{1|}}}|{{{2|{{{1}}}}}}]]|[[Mini:{{{1|}}}|{{{2|{{{1}}}}}}]]}}}}{{#if:{{{2|}}}|{{#ifeq:{{{1}}}|{{{2}}}|[[Categoria:Argomento Minipedia identico]]}}}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
Documentazione&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
		&amp;quot;1&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Titolo della pagina&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;2&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Testo visualizzato&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;Crea un collegamento interno a Minipedia&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Template:Minipedia/styles.css&amp;diff=66</id>
		<title>Template:Minipedia/styles.css</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Template:Minipedia/styles.css&amp;diff=66"/>
		<updated>2020-08-03T13:55:15Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: imported from wikipedia:eu:Txantiloi:Txp (permalink 2019) - see its chrono and credits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* imported from [[wikipedia:eu:Txantiloi:Txp]] ([[wikipedia:eu:Special:PermaLink/6863300|permalink]] 2019) - see its chrono and credits */&lt;br /&gt;
.minipedia-link {&lt;br /&gt;
	font-family: 'Gochi Hand';&lt;br /&gt;
	font-size: 1.1em;&lt;br /&gt;
	border-bottom: 2px solid #00af89;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
	<entry>
		<id>https://demo.wikimedia.ch/index.php?title=Mini:Minimo_comune_multiplo&amp;diff=65</id>
		<title>Mini:Minimo comune multiplo</title>
		<link rel="alternate" type="text/html" href="https://demo.wikimedia.ch/index.php?title=Mini:Minimo_comune_multiplo&amp;diff=65"/>
		<updated>2020-08-03T13:47:33Z</updated>

		<summary type="html">&lt;p&gt;Valerio Bozzolan: +Template:Minipedia&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Il '''minimo comune multiplo''' non è un {{Minipedia|Quaternioni|quaternione}}. È uno di due o più numeri è il più piccolo dei loro [[multipli]] comuni: m.c.m. è l'acronimo di '''minimo comune multiplo.'''&lt;br /&gt;
                                            &lt;br /&gt;
                                                   &lt;br /&gt;
==Caratteristiche==&lt;br /&gt;
I multipli comuni a due numeri sono infiniti, il più piccolo di essi è l'm.c.m.&lt;br /&gt;
* Se due numeri sono uno multiplo dell'altro, il loro m.c.m. è uguale al maggiore di essi.&lt;br /&gt;
Per esempio&lt;br /&gt;
M(60)=[60,120,180,240,300,360,420...ecc..]&amp;lt;br&amp;gt;&lt;br /&gt;
M(30)=[30,60,90,120,150,180,210...ecc..]&amp;lt;br&amp;gt;&lt;br /&gt;
          m.c.m.(60;30)=60&lt;br /&gt;
60 è il multiplo di 30, perciò è il minimo comune  multiplo dei numeri dati.&lt;br /&gt;
&lt;br /&gt;
* Il m.c.m. di due numeri primi fra loro è il loro prodotto &lt;br /&gt;
Per esempio&amp;lt;br&amp;gt;&lt;br /&gt;
M(5)=[5,10,15,20,25,30,35,40,45...60...ecc..]&amp;lt;br&amp;gt;&lt;br /&gt;
M(6)=[6,12,18,24,30,36,42...60...ecc...]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Come si calcola==&lt;br /&gt;
Prima si scompongono i numeri in fattori primi poi si prendono i fattori comuni e non comuni con l'esponente più grande.                                                                            &lt;br /&gt;
&lt;br /&gt;
Per esempio&amp;lt;br&amp;gt;&lt;br /&gt;
10=2x5&amp;lt;br&amp;gt; &lt;br /&gt;
6=2x3&amp;lt;br&amp;gt;&lt;br /&gt;
                         mcm=(10,6)=30                                                                   &lt;br /&gt;
&lt;br /&gt;
== Come usare l'm.c.m. nelle frazioni == &lt;br /&gt;
Serve per calcolare il denominatore comune di una somma o di una differenza fra frazioni; nell' addizione di più frazioni il denominatore comune è proprio  il minimo comune multiplo di tutti i singoli denominatori.&lt;br /&gt;
&lt;br /&gt;
==Bibliografia==&lt;br /&gt;
* Contaci!, Bertinetto, Metianen, Paasonen,Voutilainen, 2012, Zanichelli&lt;br /&gt;
&lt;br /&gt;
{{Portale|Matematica}}&lt;br /&gt;
[[Categoria:Numeri]]&lt;br /&gt;
[[Categoria:Aritmetica]]&lt;br /&gt;
[[wp:Minimo comune multiplo]]&lt;/div&gt;</summary>
		<author><name>Valerio Bozzolan</name></author>
	</entry>
</feed>