User:SPage (WMF)/JStransforms.js

// Insert text input to take //	https://en.wikipedia.org/w/api.php?action=query&list=geosearch&format=json&gscoord=37.786952%7C-122.399523&gsradius=10000&gslimit=10 // and turn it into // ( function ( $, mw ) { if ( mw.config.get( 'wgTitle' ) !== 'SPage (WMF)/JS test') {	console.log( 'TEMP, not my JS_test, so returning');	return; } mw.makeApiEx = function { };

// TODO have a structure of changes to make and draw a radio button for each var transforms = { 'make ApiEx' : function( str ) { alert("Go make ApiEx for " + str ); } }; var $cpanel = $( '' ) .change(function {		var transform = $('input[name="workJStransform"]:checked').val;		alert( "Handler for .change called, radio function =" + transform );	}	);

// Create a radio button for each transform $.each( transforms, function( key, value ) {	var $element=$(' ');	$cpanel.append( $element ); } );

$cpanel.find( '#makeApiExField' ) .click( function( eventObject) {		alert( 'Clicked!');	} ); $( '#workArea' ).after(	$cpanel );

window.console.log( 'mw.makeApiEx defined' ); } )( jQuery, mediaWiki );