Page MenuHomeWickedGov Phorge

ext.translate.selecttoinput.js
No OneTemporary

Size
758 B
Referenced Files
None
Subscribers
None

ext.translate.selecttoinput.js

$( function () {
var appendFromSelect = function ( selectid, targetid ) {
'use strict';
var select = document.getElementById( selectid ),
target = document.getElementById( targetid );
if ( !target || !select ) {
return;
}
var atxt = select.options[ select.selectedIndex ].value;
if ( !atxt ) {
return;
}
if ( target.value.replace( /\s+/g, '' ) !== '' ) {
atxt = ', ' + atxt;
}
atxt = target.value + atxt;
atxt = atxt.replace( /\bdefault\b[,\s]*/i, '' );
target.value = atxt;
};
$( '.mw-translate-jssti' ).on( 'click', function () {
var sourceId = $( this ).data( 'translate-jssti-sourceid' ),
targetId = $( this ).data( 'translate-jssti-targetid' );
appendFromSelect( sourceId, targetId );
} );
} );

File Metadata

Mime Type
text/plain
Expires
Wed, Aug 19, 01:04 (2 w, 17 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b4/c0/937fd7d54fd513a8f1a39c6658e7
Default Alt Text
ext.translate.selecttoinput.js (758 B)

Event Timeline