User:Diegodlh/hello-world.js

// Make sure the utilities module is loaded (will only load if not already) mw.loader.using( 'mediawiki.util', function {

// Wait for the page to be parsed $( document ).ready( function { 		console.log('Loading...');        //see below "Portlets" subsection        var link = mw.util.addPortletLink( 'p-cactions', '#', 'Wikify', 'ca-wikify', 'Mark for wikification');         $( link ).click( function ( event ) { event.preventDefault; doQwikify;

} );   } ); } );

function doQwikify { // $("#wpTextbox1").val("{" + "{wikify}}\n\n" + document.editform.wpTextbox1.value); // document.editform.submit; $.ajax(   	{url: "https://en.wikipedia.org/"}	).then((data) => console.log(data)).catch((e) => console.error(e)); }