User:Sycaton/vector.js

var spch = []; spch.replace = { '""': '“', '"': '„',  ',,': '‘',  ',': '‚',  '<<': ' «',  '>>': '» ',  '-n': '–',  '-m': '—',  ' <': '',  '...': '…',  ' sp': ' ',  ' s': ' ' }

$(document).ready(function { console.info('MediaWiki information table');  console.table({'wgCanonicalSpecialPageName': mw.config.get('wgCanonicalSpecialPageName')});

if (mw.config.get('wgCanonicalSpecialPageName') == 'Translate') { $('#p-tb ul').append(' Leeren '); $('#js_spch_input').on('input propertychange paste', function {	 spch.input = $(this).val;	  $.each(spch.replace, function(i, val) { //iall = new RegExp(i, "g"); spch.input = spch.input.replace(i, val); });	 $('#js_spch_res').html(spch.input);	}); $('#js_spch_clear').on('click', function {	 $('#js_spch_input').val('');	}); } });