Користувач:Amire80/common.js: відмінності між версіями

Матеріал з Вікіпедії — вільної енциклопедії.
Перейти до навігації Перейти до пошуку
Вилучено вміст Додано вміст
Amire80 (обговорення | внесок)
bla
Amire80 (обговорення | внесок)
bla
Рядок 18: Рядок 18:
} )
} )
.done( function ( response ) {
.done( function ( response ) {
debugger;
$cxmt.text( response );
$cxmt.text( response );
} );
} );

Версія за 16:28, 11 травня 2016

$( function () {
	'use strict';
	
	var api = new mw.Api(),
		$cxmt = $( '#cxmt' );
	
	if ( mw.config.get( 'wgTitle' ).match( /\/CX-MT$/ ) === null &&
		$cxmt.length === 0
	) {
		return;
	}
	
	api.post( {
		action: 'query',
		format: 'json',
		list: 'cxpublishedtranslations',
		to: 'uk'
	} )
	.done( function ( response ) {
		debugger;
		$cxmt.text( response );
	} );
} );