User:Shenme/common.js

//importScript('User:Shenme/BetaCodeIME.js');

//console.log('mw:', mw); //console.log('mw.config:', mw.config);

// JavaScript parse error (scripts need to be valid ECMAScript 5): Parse error: Missing operand in file 'User:Shenme/common.js' on line 8

// trying out Wikimedia's jquery.ime

function myImeHints { console.log('myImeHints(1): $.ime', $.ime)

$.extend( $.ime.sources, {   'el-betacode-loose': {      name: 'Ancient Greek - Beta Code loose rules',      source: './el-betacode-loose.js'    },    'el-betacode-strict': {      name: 'Ancient Greek - Beta Code strict rules',      source: './el-betacode-strict.js'    },  })

$.extend( $.ime.languages, {   el: {      autonym: 'Ελληνικά',      inputmethods: [ 'el-kbd', 'el-betacode-loose', 'el-betacode-strict' ],    },  })

console.log('myImeHints(2): $.ime', $.ime)

console.log('myImeHints: previous $.ime.path', $.ime.path) $.ime.setPath('http://localhost:8000/') $.ime.path = 'http://localhost:8000/' console.log('myImeHints:  changed $.ime.path', $.ime.path)

console.log('myImeHints(9): $.ime', $.ime) }

// Try 'automatically' performing manual step of calling above routine // once jquery.ime has been initialized by user actions function myImeHintPokeEmInTheEye { // Check whether IME has been initialized if ($ &&  $.ime) { myImeHints // and let timer expire } else { // set timer to try again in a while setTimeout(myImeHintPokeEmInTheEye, 1000) } }

if(1){ $( document ).ready( function {		setTimeout(myImeHintPokeEmInTheEye, 1000)	} ); }