User:Dr pda/persondata.js

Nowadays, User:Dr pda/persondata.js is a topic that has gained relevance in various areas. From politics to science, User:Dr pda/persondata.js has become a point of interest for researchers, activists, and citizens in general. With the advancement of technology and globalization, User:Dr pda/persondata.js has acquired a dimension never seen before, impacting not only the way we interact with our environment, but also our perception of the world. In this article, we will explore different aspects related to User:Dr pda/persondata.js, from its origins to its impact on modern society.
// This script used to populate the Persondata template with fields from
// infoboxes. However, it is now deprecated, and should no longer be used.
// See ] for more details.

mw.loader.using( [
	'mediawiki.jqueryMsg',
	'mediawiki.util',
], function () {
	var label, tooltip, portletLink;

	// Find the label and tooltip the same way as the old script did.
	if ( !document.forms.editform && $( '#persondata' ).length ) {
		label = 'show/hide persondata';
		tooltip = 'Show/hide persondata metadata';
	} else if (
			mw.config.get( 'wgNamespaceNumber' ) === 0  &&
			$( '#wpTextbox1' ).length &&
			!$( '#wpTextbox1' ).text().match( /persondata/i )
	) {
		label = 'add persondata';
		tooltip = 'Add persondata metadata';
	}

	// Add the portlet link. When clicked, this pops up a notification saying
	// that the script is deprecated.
	if ( label && tooltip ) {
		portletLink = mw.util.addPortletLink(
			'p-cactions',
			'#',
			label,
			'ca-pdata',
			tooltip
		);
		mw.messages.set( {
			'pdata-deprecated': "] is " +
				"]. Please remove it " +
				"from your ] page."
		} );
		$( portletLink ).click( function ( e ) {
			e.preventDefault();
			mw.notify(
				mw.message( 'pdata-deprecated' ),
				{ title: 'Script deprecated' }
			);
		} );
	}
});