summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2021-07-19 15:20:22 -0400
committerBrian Evans <grknight@gentoo.org>2021-07-19 15:20:22 -0400
commit9f092345e6bbecfde8c19e6d1490a6031a35f61f (patch)
tree2abb2398cd0df686e8608e15097ddc58b8995615 /MLEB/UniversalLanguageSelector/lib/jquery.ime
parentOAuth: Update for fixes and security (diff)
downloadextensions-9f092345e6bbecfde8c19e6d1490a6031a35f61f.tar.gz
extensions-9f092345e6bbecfde8c19e6d1490a6031a35f61f.tar.bz2
extensions-9f092345e6bbecfde8c19e6d1490a6031a35f61f.zip
Update to MLEB 2021.06
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'MLEB/UniversalLanguageSelector/lib/jquery.ime')
-rw-r--r--MLEB/UniversalLanguageSelector/lib/jquery.ime/jquery.ime.js265
-rw-r--r--MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/ann/ann-tilde.js30
-rw-r--r--MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/bas/bas-tilde.js31
-rw-r--r--MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/bkm/bkm-tilde.js41
-rw-r--r--MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/cyrl/cyrl-palochka.js46
-rw-r--r--MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/ig/ig-tilde.js3
-rw-r--r--MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/kcg/kcg-tilde.js24
-rw-r--r--MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/mad/mad-tilde.js26
-rw-r--r--MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/nia/nia-tilde.js22
-rw-r--r--MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/nus/nus-tilde.js28
-rw-r--r--MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/or/or-inscript.js2
11 files changed, 360 insertions, 158 deletions
diff --git a/MLEB/UniversalLanguageSelector/lib/jquery.ime/jquery.ime.js b/MLEB/UniversalLanguageSelector/lib/jquery.ime/jquery.ime.js
index b4b8d8c0..ac5930e8 100644
--- a/MLEB/UniversalLanguageSelector/lib/jquery.ime/jquery.ime.js
+++ b/MLEB/UniversalLanguageSelector/lib/jquery.ime/jquery.ime.js
@@ -1,17 +1,15 @@
-/*! jquery.ime - v0.2.0+20200614
+/*! jquery.ime - v0.2.0+20210414
* https://github.com/wikimedia/jquery.ime
-* Copyright (c) 2020 Santhosh Thottingal; License: (GPL-2.0-or-later OR MIT) */
+* Copyright (c) 2021 Santhosh Thottingal; License: (GPL-2.0-or-later OR MIT) */
( function ( $ ) {
'use strict';
var TextEntryFactory, TextEntry, FormWidgetEntry, ContentEditableEntry,
defaultInputMethod;
- // rangy is defined in the rangy library
- /* global rangy */
-
/**
* private function for debugging
+ *
* @param {jQuery} [$obj]
*/
function debug( $obj ) {
@@ -48,7 +46,7 @@
/**
* IME Class
*
- * @class
+ * @class IME
* @constructor
* @param {HTMLElement} element Element on which to listen for events
* @param {TextEntry} textEntry Text entry object to use to get/set text
@@ -75,6 +73,10 @@
this.language = null;
this.context = '';
if ( this.options.showSelector ) {
+ this.options.selectorInside = options.selectorInside !== undefined ?
+ options.selectorInside :
+ // eslint-disable-next-line no-jquery/no-class-state
+ this.$element.hasClass( 'ime-position-inside' );
this.selector = this.$element.imeselector( this.options );
}
this.listen();
@@ -405,7 +407,7 @@
/**
* TextEntry factory
*
- * @class
+ * @class TextEntryFactory
* @constructor
*/
TextEntryFactory = function IMETextEntryFactory() {
@@ -431,17 +433,21 @@
* Wrap an editable element with the appropriate TextEntry class
*
* @param {jQuery} $element The element to wrap
- * @return {TextEntry|undefined} A TextEntry, or undefined if no match
+ * @return {TextEntry|null} A TextEntry, or null if no match
*/
TextEntryFactory.prototype.wrap = function ( $element ) {
var i, len, TextEntryClass;
+ // eslint-disable-next-line no-jquery/no-class-state
+ if ( $element.hasClass( 'noime' ) ) {
+ return null;
+ }
for ( i = 0, len = this.TextEntryClasses.length; i < len; i++ ) {
TextEntryClass = this.TextEntryClasses[ i ];
if ( TextEntryClass.static.canWrap( $element ) ) {
return new TextEntryClass( $element );
}
}
- return undefined;
+ return null;
};
/* Initialization */
@@ -451,7 +457,7 @@
/**
* Generic text entry
*
- * @class
+ * @class TextEntry
* @abstract
*/
TextEntry = function IMETextEntry() {
@@ -496,7 +502,7 @@
/**
* TextEntry class for input/textarea widgets
*
- * @class
+ * @class FormWidgetEntry
* @constructor
* @param {jQuery} $element The element to wrap
*/
@@ -516,9 +522,7 @@
FormWidgetEntry.static.canWrap = function ( $element ) {
return $element.is( 'input:not([type]), input[type=text], input[type=search], textarea' ) &&
!$element.prop( 'readonly' ) &&
- !$element.prop( 'disabled' ) &&
- // eslint-disable-next-line no-jquery/no-class-state
- !$element.hasClass( 'noime' );
+ !$element.prop( 'disabled' );
};
/* Instance methods */
@@ -527,10 +531,10 @@
* @inheritdoc TextEntry
*/
FormWidgetEntry.prototype.getTextBeforeSelection = function ( maxLength ) {
- var pos = this.getCaretPosition();
+ var element = this.$element.get( 0 );
return this.$element.val().substring(
- Math.max( 0, pos.start - maxLength ),
- pos.start
+ Math.max( 0, element.selectionStart - maxLength ),
+ element.selectionStart
);
};
@@ -538,112 +542,24 @@
* @inheritdoc TextEntry
*/
FormWidgetEntry.prototype.replaceTextAtSelection = function ( precedingCharCount, newText ) {
- var selection,
- length,
- newLines,
- start,
- scrollTop,
- pos,
- element = this.$element.get( 0 );
-
- if ( typeof element.selectionStart === 'number' && typeof element.selectionEnd === 'number' ) {
- // IE9+ and all other browsers
- start = element.selectionStart;
+ var element = this.$element.get( 0 ),
+ start = element.selectionStart,
scrollTop = element.scrollTop;
- // Replace the whole text of the text area:
- // text before + newText + text after.
- // This could be made better if range selection worked on browsers.
- // But for complex scripts, browsers place cursor in unexpected places
- // and it's not possible to fix cursor programmatically.
- // Ref Bug https://bugs.webkit.org/show_bug.cgi?id=66630
- element.value = element.value.substring( 0, start - precedingCharCount ) +
- newText +
- element.value.substring( element.selectionEnd, element.value.length );
-
- // restore scroll
- element.scrollTop = scrollTop;
- // set selection
- element.selectionStart = element.selectionEnd = start - precedingCharCount + newText.length;
- } else {
- // IE8 and lower
- pos = this.getCaretPosition();
- selection = element.createTextRange();
- length = element.value.length;
- // IE doesn't count \n when computing the offset, so we won't either
- newLines = element.value.match( /\n/g );
-
- if ( newLines ) {
- length = length - newLines.length;
- }
-
- selection.moveStart( 'character', pos.start - precedingCharCount );
- selection.moveEnd( 'character', pos.end - length );
-
- selection.text = newText;
- selection.collapse( false );
- selection.select();
- }
- };
-
- /**
- * Get the current selection offsets inside the widget
- *
- * @return {Object} return Offsets in chars (0 means first offset *or* no selection in widget)
- * @return {number} return.start Selection start
- * @return {number} return.end Selection end
- */
- FormWidgetEntry.prototype.getCaretPosition = function () {
- var el = this.$element.get( 0 ),
- start = 0,
- end = 0,
- normalizedValue,
- range,
- textInputRange,
- len,
- newLines,
- endRange;
-
- if ( typeof el.selectionStart === 'number' && typeof el.selectionEnd === 'number' ) {
- start = el.selectionStart;
- end = el.selectionEnd;
- } else {
- // IE
- range = document.selection.createRange();
-
- if ( range && range.parentElement() === el ) {
- len = el.value.length;
- normalizedValue = el.value.replace( /\r\n/g, '\n' );
- newLines = normalizedValue.match( /\n/g );
-
- // Create a working TextRange that lives only in the input
- textInputRange = el.createTextRange();
- textInputRange.moveToBookmark( range.getBookmark() );
-
- // Check if the start and end of the selection are at the very end
- // of the input, since moveStart/moveEnd doesn't return what we want
- // in those cases
- endRange = el.createTextRange();
- endRange.collapse( false );
-
- if ( textInputRange.compareEndPoints( 'StartToEnd', endRange ) > -1 ) {
- if ( newLines ) {
- start = end = len - newLines.length;
- } else {
- start = end = len;
- }
- } else {
- start = -textInputRange.moveStart( 'character', -len );
-
- if ( textInputRange.compareEndPoints( 'EndToEnd', endRange ) > -1 ) {
- end = len;
- } else {
- end = -textInputRange.moveEnd( 'character', -len );
- }
- }
- }
- }
- return { start: start, end: end };
+ // Replace the whole text of the text area:
+ // text before + newText + text after.
+ // This could be made better if range selection worked on browsers.
+ // But for complex scripts, browsers place cursor in unexpected places
+ // and it's not possible to fix cursor programmatically.
+ // Ref Bug https://bugs.webkit.org/show_bug.cgi?id=66630
+ element.value = element.value.substring( 0, start - precedingCharCount ) +
+ newText +
+ element.value.substring( element.selectionEnd, element.value.length );
+
+ // restore scroll
+ element.scrollTop = scrollTop;
+ // set selection
+ element.selectionStart = element.selectionEnd = start - precedingCharCount + newText.length;
};
TextEntryFactory.static.singleton.register( FormWidgetEntry );
@@ -651,7 +567,7 @@
/**
* TextEntry class for ContentEditable
*
- * @class
+ * @class ContentEditableEntry
* @constructor
* @param {jQuery} $element The element to wrap
*/
@@ -669,8 +585,7 @@
* @inheritdoc TextEntry
*/
ContentEditableEntry.static.canWrap = function ( $element ) {
- // eslint-disable-next-line no-jquery/no-class-state
- return $element.is( '[contenteditable]' ) && !$element.hasClass( 'noime' );
+ return $element.is( '[contenteditable]' );
};
/* Instance methods */
@@ -693,9 +608,11 @@
* @inheritdoc SelectionWrapper
*/
ContentEditableEntry.prototype.replaceTextAtSelection = function ( precedingCharCount, newText ) {
- var range, textNode, textOffset, newOffset, newRange;
+ var textNode, textOffset, newOffset, newRange,
+ sel = window.getSelection(),
+ range = this.getSelectedRange();
- if ( !this.getSelectedRange() ) {
+ if ( !range ) {
return;
}
@@ -705,12 +622,11 @@
// browsers that do not support it.
this.$element.trigger( 'compositionstart' );
- range = this.getSelectedRange();
-
if ( !range.collapsed ) {
range.deleteContents();
}
+ newRange = document.createRange();
if ( range.startContainer.nodeType === Node.TEXT_NODE ) {
// Alter this text node's content and move the cursor
textNode = range.startContainer;
@@ -720,10 +636,8 @@
newText +
textNode.nodeValue.substr( textOffset );
newOffset = textOffset - precedingCharCount + newText.length;
- newRange = rangy.createRange();
newRange.setStart( range.startContainer, newOffset );
newRange.setEnd( range.startContainer, newOffset );
- rangy.getSelection().setSingleRange( newRange );
} else {
// XXX assert precedingCharCount === 0
// Insert a new text node with the new text
@@ -732,11 +646,11 @@
textNode,
range.startContainer.childNodes[ range.startOffset ]
);
- newRange = rangy.createRange();
newRange.setStart( textNode, textNode.length );
newRange.setEnd( textNode, textNode.length );
- rangy.getSelection().setSingleRange( newRange );
}
+ sel.removeAllRanges();
+ sel.addRange( newRange );
// Trigger any externally registered jQuery compositionend / input event listeners.
// TODO: Try node.dispatchEvent( new CompositionEvent(...) ) so listeners not
@@ -752,9 +666,9 @@
* @return {Range|null} The selection range
*/
ContentEditableEntry.prototype.getSelectedRange = function () {
- var sel, range;
- rangy.init();
- sel = rangy.getSelection();
+ var range,
+ sel = window.getSelection();
+
if ( sel.rangeCount === 0 ) {
return null;
}
@@ -784,7 +698,7 @@
data = $this.data( 'ime' );
if ( !data ) {
textEntry = TextEntryFactory.static.singleton.wrap( $this );
- if ( textEntry === undefined ) {
+ if ( !textEntry ) {
return;
}
data = new IME( this, textEntry, options );
@@ -804,7 +718,7 @@
$.ime.languages = {};
/**
- * @property {string} Relative/absolute path for the rules folder of jquery.ime
+ * @property {string} Relative or absolute path for the rules folder of jquery.ime
*/
$.ime.path = '../';
$.ime.textEntryFactory = TextEntryFactory.static.singleton;
@@ -877,7 +791,8 @@
$.ime.defaults = {
languages: [], // Languages to be used- by default all languages
helpHandler: null, // Called for each ime option in the menu
- showSelector: true
+ showSelector: true,
+ selectorInside: undefined // If not set will check if '.ime-position-inside' class is preset
};
}( jQuery ) );
@@ -1144,7 +1059,7 @@
/**
* Keydown event handler. Handles shortcut key presses
*
- * @context {HTMLElement}
+ * @this HTMLElement
* @param {jQuery.Event} e
* @return {boolean}
*/
@@ -1215,6 +1130,10 @@
this.$imeSetting.outerWidth();
}
+ if ( this.options.selectorInside ) {
+ top -= this.$imeSetting.outerHeight();
+ }
+
// While determining whether to place the selector above or below the input box,
// take into account the value of scrollTop, to avoid the selector from always
// getting placed above the input box since window.height would be less than top
@@ -1223,6 +1142,9 @@
if ( verticalRoom < this.$imeSetting.outerHeight() ) {
top = elementPosition.top - this.$imeSetting.outerHeight();
+ if ( this.options.selectorInside ) {
+ top += this.$imeSetting.outerHeight();
+ }
menuTop = this.$menu.outerHeight() +
this.$imeSetting.outerHeight();
@@ -1278,7 +1200,7 @@
* Select a language
*
* @param {string} languageCode
- * @return {string|bool} Selected input method id or false
+ * @return {string|boolean} Selected input method id or false
*/
selectLanguage: function ( languageCode ) {
var ime, imePref, language;
@@ -1341,6 +1263,7 @@
/**
* Decide on initial language to select
+ *
* @return {string}
*/
decideLanguage: function () {
@@ -1654,7 +1577,7 @@
},
getPreviousInputMethods: function () {
- return this.registry.previousInputMethods;
+ return this.registry.previousInputMethods || [];
},
// Set the given IM as the last used for the language
@@ -1722,6 +1645,10 @@
name: 'ትራንስልተራትዖን',
source: 'rules/am/am-transliteration.js'
},
+ 'ann-tilde': {
+ name: 'Obolo tilde',
+ source: 'rules/ann/ann-tilde.js'
+ },
'ar-kbd': {
name: 'لوحة المفاتيح العربية',
source: 'rules/ar/ar-kbd.js'
@@ -1758,6 +1685,10 @@
name: 'تۆرکجه',
source: 'rules/azb/azb-kbd.js'
},
+ 'bas-tilde': {
+ name: 'Ɓasaá tilde',
+ source: 'rules/bas/bas-tilde.js'
+ },
'batak-qwerty': {
name: 'Batak QWERTY',
source: 'rules/bbc/batak-qwerty.js'
@@ -1786,6 +1717,10 @@
name: 'روچ کپتین بلوچی',
source: 'rules/bgn/bgn-kbd.js'
},
+ 'bkm-tilde': {
+ name: 'Kom tilde',
+ source: 'rules/bkm/bkm-tilde.js'
+ },
'bm-alt': {
name: 'Bamanankan Alt',
source: 'rules/bm/bm-alt.js'
@@ -2078,6 +2013,10 @@
name: 'Kabɩyɛ tilde',
source: 'rules/kbp/kbp-tilde.js'
},
+ 'kcg-tilde': {
+ name: 'Tyap tilde',
+ source: 'rules/kcg/kcg-tilde.js'
+ },
'ki-tilde': {
name: 'Gĩkũyũ',
source: 'rules/ki/ki-tilde.js'
@@ -2154,6 +2093,10 @@
name: 'Lushootseed Tulalip',
source: 'rules/lut/lut-tulalip.js'
},
+ 'mad-tilde': {
+ name: 'Madhurâ tilde',
+ source: 'rules/mad/mad-tilde.js'
+ },
'mai-inscript': {
name: 'इनस्क्रिप्ट',
source: 'rules/mai/mai-inscript.js',
@@ -2268,6 +2211,10 @@
name: 'ट्रांस्लितेरेशन',
source: 'rules/ne/ne-transliteration.js'
},
+ 'nia-tilde': {
+ name: 'Li Niha tilde',
+ source: 'rules/nia/nia-tilde.js'
+ },
'nqo-standard-qwerty': {
name: "N'Ko standard QWERTY",
source: 'rules/nqo/nqo-standard-qwerty.js'
@@ -2280,6 +2227,10 @@
name: 'Sesotho sa Leboa tilde',
source: 'rules/nso/nso-tilde.js'
},
+ 'nus-tilde': {
+ name: 'Thok Naath tilde',
+ source: 'rules/nus/nus-tilde.js'
+ },
'or-inscript': {
name: 'ଇନସ୍କ୍ରିପ୍ଟ',
source: 'rules/or/or-inscript.js'
@@ -2568,6 +2519,10 @@
autonym: 'አማርኛ',
inputmethods: [ 'am-transliteration' ]
},
+ ann: {
+ autonym: 'Obolo',
+ inputmethods: [ 'ann-tilde' ]
+ },
ar: {
autonym: 'العربية',
inputmethods: [ 'ar-kbd' ]
@@ -2584,6 +2539,10 @@
autonym: 'تۆرکجه',
inputmethods: [ 'azb-kbd' ]
},
+ bas: {
+ autonym: 'ɓasaá',
+ inputmethods: [ 'bas-tilde' ]
+ },
bbc: {
autonym: 'Batak',
inputmethods: [ 'batak-qwerty' ]
@@ -2612,6 +2571,10 @@
autonym: 'भोजपुरी',
inputmethods: [ 'hi-transliteration' ]
},
+ bkm: {
+ autonym: 'Itaŋikom',
+ inputmethods: [ 'bkm-tilde' ]
+ },
bm: {
autonym: 'Bamanankan',
inputmethods: [ 'bm-alt', 'bm-tilde' ]
@@ -2652,6 +2615,10 @@
autonym: 'Dagbani',
inputmethods: [ 'dag-alt', 'dag-tilde' ]
},
+ dar: {
+ autonym: 'дарган',
+ inputmethods: [ 'cyrl-palochka' ]
+ },
de: {
autonym: 'Deutsch',
inputmethods: [ 'de-transliteration' ]
@@ -2784,6 +2751,10 @@
autonym: 'Kabɩyɛ',
inputmethods: [ 'kbp-tilde' ]
},
+ kcg: {
+ autonym: 'Tyap',
+ inputmethods: [ 'kcg-tilde' ]
+ },
ki: {
autonym: 'Gĩkũyũ',
inputmethods: [ 'ki-tilde' ]
@@ -2848,6 +2819,10 @@
autonym: 'मैथिली',
inputmethods: [ 'mai-inscript', 'mai-inscript2' ]
},
+ mad: {
+ autonym: 'madhurâ',
+ inputmethods: [ 'mad-tilde' ]
+ },
mg: {
autonym: 'Malagasy',
inputmethods: [ 'mg-tilde' ]
@@ -2892,6 +2867,10 @@
autonym: 'नेपाल भाषा',
inputmethods: [ 'hi-transliteration', 'hi-inscript' ]
},
+ nia: {
+ autonym: 'li niha',
+ inputmethods: [ 'nia-tilde' ]
+ },
nn: {
autonym: 'Norsk (nynorsk)',
inputmethods: [ 'nb-normforms', 'nb-tildeforms' ]
@@ -2904,6 +2883,10 @@
autonym: 'Sesotho sa Leboa',
inputmethods: [ 'nso-tilde' ]
},
+ nus: {
+ autonym: 'Thok Naath',
+ inputmethods: [ 'nus-tilde' ]
+ },
or: {
autonym: 'ଓଡ଼ିଆ',
inputmethods: [ 'or-phonetic', 'or-transliteration', 'or-inscript', 'or-inscript2', 'or-lekhani', 'or-OdiScript' ]
diff --git a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/ann/ann-tilde.js b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/ann/ann-tilde.js
new file mode 100644
index 00000000..b204356c
--- /dev/null
+++ b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/ann/ann-tilde.js
@@ -0,0 +1,30 @@
+( function ( $ ) {
+ 'use strict';
+
+ var annTilde = {
+ id: 'ann-tilde',
+ name: 'ann-tilde',
+ description: 'Obolo input keyboard',
+ date: '2020-11-03',
+ URL: 'https://github.com/wikimedia/jquery.ime',
+ author: 'Amir E. Aharoni',
+ license: 'GPLv3',
+ version: '1.1',
+ patterns: [
+ [ '~N', 'N̄' ],
+ [ '~n', 'n̄' ],
+ [ '~O', 'Ọ' ],
+ [ '~o', 'ọ' ],
+ [ '~S', 'Ṣ' ],
+ [ '~s', 'ṣ' ],
+ [ '~\\\\', '\u0300' ], // Combining grave accent
+ [ '~/', '\u0301' ], // Combining acute accent
+ [ '~\\^', '\u0302' ], // Combining circumflex accent
+ [ '~-', '\u0304' ], // Combining macron
+ [ '~v', '\u030C' ], // Combining caron
+ [ '~\\.', '\u0323' ] // Combining dot below
+ ]
+ };
+
+ $.ime.register( annTilde );
+}( jQuery ) );
diff --git a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/bas/bas-tilde.js b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/bas/bas-tilde.js
new file mode 100644
index 00000000..cb5cfc0b
--- /dev/null
+++ b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/bas/bas-tilde.js
@@ -0,0 +1,31 @@
+( function ( $ ) {
+ 'use strict';
+
+ var basTilde = {
+ id: 'bas-tilde',
+ name: 'bas-tilde',
+ description: 'Basaa tilde keyboard',
+ date: '2021-03-31',
+ URL: 'https://github.com/wikimedia/jquery.ime',
+ author: 'Amir E. Aharoni',
+ license: 'GPLv3',
+ version: '1.0',
+ patterns: [
+ [ '~B', 'Ɓ' ],
+ [ '~b', 'ɓ' ],
+ [ '~E', 'Ɛ' ],
+ [ '~e', 'ɛ' ],
+ [ '~N', 'Ŋ' ],
+ [ '~n', 'ŋ' ],
+ [ '~O', 'Ɔ' ],
+ [ '~o', 'ɔ' ],
+ [ '~\\\\', '\u0300' ], // Combining grave accent
+ [ '~/', '\u0301' ], // Combining acute accent
+ [ '~\\^', '\u0302' ], // Combining circumflex accent
+ [ '~-', '\u0304' ], // Combining macron
+ [ '~v', '\u030C' ] // Combining caron
+ ]
+ };
+
+ $.ime.register( basTilde );
+}( jQuery ) );
diff --git a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/bkm/bkm-tilde.js b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/bkm/bkm-tilde.js
new file mode 100644
index 00000000..920c59f2
--- /dev/null
+++ b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/bkm/bkm-tilde.js
@@ -0,0 +1,41 @@
+( function ( $ ) {
+ 'use strict';
+
+ var bkmTilde = {
+ id: 'bkm-tilde',
+ name: 'bkm-tilde',
+ description: 'Kom tilde keyboard',
+ date: '2021-03-31',
+ URL: 'https://github.com/wikimedia/jquery.ime',
+ author: 'Amir E. Aharoni',
+ license: 'GPLv3',
+ version: '1.0',
+ maxKeyLength: 2,
+ patterns: [
+ [ 'AE', 'Æ' ],
+ [ 'Ae', 'Æ' ],
+ [ 'ae', 'æ' ],
+ [ 'A~E', 'AE' ],
+ [ 'A~e', 'Ae' ],
+ [ 'a~e', 'ae' ],
+ [ '~A', 'Æ' ],
+ [ '~a', 'æ' ],
+ [ '~I', 'Ɨ' ],
+ [ '~i', 'ɨ' ],
+ [ '~N', 'Ŋ' ],
+ [ '~n', 'ŋ' ],
+ [ 'OE', 'Œ' ],
+ [ 'Oe', 'Œ' ],
+ [ 'oe', 'œ' ],
+ [ 'O~E', 'OE' ],
+ [ 'O~e', 'Oe' ],
+ [ 'o~e', 'oe' ],
+ [ '~O', 'Œ' ],
+ [ '~o', 'œ' ],
+ [ '~\\\\', '\u0300' ], // Combining grave accent
+ [ '~\\^', '\u0302' ] // Combining circumflex accent
+ ]
+ };
+
+ $.ime.register( bkmTilde );
+}( jQuery ) );
diff --git a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/cyrl/cyrl-palochka.js b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/cyrl/cyrl-palochka.js
index f4e8d8e4..36046e99 100644
--- a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/cyrl/cyrl-palochka.js
+++ b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/cyrl/cyrl-palochka.js
@@ -6,17 +6,27 @@
*
* This layout assumes that the standard Russian keyboard layout is used. All the rules produce the
* same character palochka, and the characters used are the same that are often used by the speakers
- * of these languages online: 1. Latin small 'l'. 2. Latin capital 'I'. 3. Ukrainian capital 'І'. 4.
- * Alt-1 (the digit one). 5. Alt-д (Cyrillic small 'de', on the same key as Latin 'l'). 6. Alt-ш
- * (Cyrillic small 'sha', on the same key as Latin 'i'). 7. Alt-Ш (Cyrillic capital 'sha', on the
- * same key as Latin 'I').
+ * of these languages online:
+ * 1. Latin small 'l'.
+ * 2. Latin capital 'I'.
+ * 3. Ukrainian capital 'І'.
+ * 4. Alt-1 (the digit one).
+ * 5. Alt-д (Cyrillic small 'de', on the same key as Latin 'l').
+ * 6. Alt-ш (Cyrillic small 'sha', on the same key as Latin 'i').
+ * 7. Alt-Ш (Cyrillic capital 'sha', on the same key as Latin 'I').
*/
( function ( $ ) {
'use strict';
- // All the characters are very similar in appearance,
- // so it's better to give them names to avoid confusion.
- var cyrlPalochka;
+
+ var cyrlPalochka,
+ // All the characters are very similar in appearance,
+ // so it's better to give them names to avoid confusion.
+ latinSmallL = 'l',
+ latinCapitalI = 'I',
+ ukrainianCapitalI = 'І',
+ palochka = 'Ӏ',
+ digitOne = '1';
cyrlPalochka = {
id: 'cyrl-palochka',
@@ -26,16 +36,22 @@
URL: 'http://github.com/wikimedia/jquery.ime',
author: 'Amir E. Aharoni',
license: 'GPLv3',
- version: '1.0',
+ version: '1.1',
+ contextLength: 2,
+ maxKeyLength: 3,
patterns: [
- [ 'l', 'Ӏ' ],
- [ 'I', 'Ӏ' ],
- [ 'І', 'Ӏ' ] ],
+ [ '~~' + digitOne, '~~', '~1' ],
+ [ '~' + digitOne, palochka ],
+ [ latinSmallL, palochka ],
+ [ latinCapitalI, palochka ],
+ [ ukrainianCapitalI, palochka ]
+ ],
patterns_x: [
- [ '1', 'Ӏ' ],
- [ 'д', 'Ӏ' ],
- [ 'ш', 'Ӏ' ],
- [ 'Ш', 'Ӏ' ] ]
+ [ digitOne, palochka ],
+ [ 'д', palochka ],
+ [ 'ш', palochka ],
+ [ 'Ш', palochka ]
+ ]
};
$.ime.register( cyrlPalochka );
diff --git a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/ig/ig-tilde.js b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/ig/ig-tilde.js
index bd0a4071..cef3986d 100644
--- a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/ig/ig-tilde.js
+++ b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/ig/ig-tilde.js
@@ -20,7 +20,8 @@
[ '~U', 'Ụ' ],
[ '~u', 'ụ' ],
[ '~\\\\', '\u0300' ], // Combining grave
- [ '~/', '\u0301' ] // Combining acute
+ [ '~/', '\u0301' ], // Combining acute
+ [ '~\\-', '\u0304' ] // Combining macron
]
};
diff --git a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/kcg/kcg-tilde.js b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/kcg/kcg-tilde.js
new file mode 100644
index 00000000..ec9bbaab
--- /dev/null
+++ b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/kcg/kcg-tilde.js
@@ -0,0 +1,24 @@
+( function ( $ ) {
+ 'use strict';
+
+ var kcgTilde = {
+ id: 'kcg-tilde',
+ name: 'kcg-tilde',
+ description: 'Tyap input keyboard',
+ date: '2020-12-04',
+ URL: 'https://github.com/wikimedia/jquery.ime',
+ author: 'Amir E. Aharoni',
+ license: 'GPLv3',
+ version: '1.1',
+ patterns: [
+ [ '~A', 'A\u0331' ],
+ [ '~a', 'a\u0331' ],
+ [ '~I', 'I\u0331' ],
+ [ '~i', 'i\u0331' ],
+ [ '~/', '\u0301' ], // Combining acute accent
+ [ '~_', '\u0331' ] // Combining macron below
+ ]
+ };
+
+ $.ime.register( kcgTilde );
+}( jQuery ) );
diff --git a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/mad/mad-tilde.js b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/mad/mad-tilde.js
new file mode 100644
index 00000000..44bdd4d5
--- /dev/null
+++ b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/mad/mad-tilde.js
@@ -0,0 +1,26 @@
+( function ( $ ) {
+ 'use strict';
+
+ var madTilde = {
+ id: 'mad-tilde',
+ name: 'mad-tilde',
+ description: 'Madurese tilde keyboard',
+ date: '2020-12-06',
+ URL: 'https://github.com/wikimedia/jquery.ime',
+ author: 'Amir E. Aharoni',
+ license: 'GPLv3',
+ version: '1',
+ patterns: [
+ [ '~A', 'Â' ],
+ [ '~a', 'â' ],
+ [ '~D', 'Ḍ' ],
+ [ '~d', 'ḍ' ],
+ [ '~E', 'È' ],
+ [ '~e', 'è' ],
+ [ '~T', 'Ṭ' ],
+ [ '~t', 'ṭ' ]
+ ]
+ };
+
+ $.ime.register( madTilde );
+}( jQuery ) );
diff --git a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/nia/nia-tilde.js b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/nia/nia-tilde.js
new file mode 100644
index 00000000..1c717e05
--- /dev/null
+++ b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/nia/nia-tilde.js
@@ -0,0 +1,22 @@
+( function ( $ ) {
+ 'use strict';
+
+ var niaTilde = {
+ id: 'nia-tilde',
+ name: 'nia-tilde',
+ description: 'Nias tilde keyboard',
+ date: '2021-01-13',
+ URL: 'https://github.com/wikimedia/jquery.ime',
+ author: 'Amir E. Aharoni',
+ license: 'GPLv3',
+ version: '1',
+ patterns: [
+ [ '~O', 'Ö' ],
+ [ '~o', 'ö' ],
+ [ '~W', 'Ŵ' ],
+ [ '~w', 'ŵ' ]
+ ]
+ };
+
+ $.ime.register( niaTilde );
+}( jQuery ) );
diff --git a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/nus/nus-tilde.js b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/nus/nus-tilde.js
new file mode 100644
index 00000000..e2c6e8fc
--- /dev/null
+++ b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/nus/nus-tilde.js
@@ -0,0 +1,28 @@
+( function ( $ ) {
+ 'use strict';
+
+ var nusTilde = {
+ id: 'nus-tilde',
+ name: 'nus-tilde',
+ description: 'Nuer input keyboard',
+ date: '2021-01-18',
+ URL: 'https://github.com/wikimedia/jquery.ime',
+ author: 'Amir E. Aharoni',
+ license: 'GPLv3',
+ version: '1.0',
+ patterns: [
+ [ '~E', 'Ɛ' ],
+ [ '~e', 'ɛ' ],
+ [ '~G', 'Ɣ' ],
+ [ '~g', 'ɣ' ],
+ [ '~N', 'Ŋ' ],
+ [ '~n', 'ŋ' ],
+ [ '~O', 'Ɔ' ],
+ [ '~o', 'ɔ' ],
+ [ '~:', '\u0308' ], // Combining diaeresis
+ [ '~_', '\u0331' ] // Combining macron below
+ ]
+ };
+
+ $.ime.register( nusTilde );
+}( jQuery ) );
diff --git a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/or/or-inscript.js b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/or/or-inscript.js
index 04fc9fb8..dba733a8 100644
--- a/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/or/or-inscript.js
+++ b/MLEB/UniversalLanguageSelector/lib/jquery.ime/rules/or/or-inscript.js
@@ -70,7 +70,7 @@
[ 'q', '\u0B4C' ],
[ 'd', '\u0B4D' ],
[ '/', '\u0B5F' ],
- [ '\\>', '\u0B64' ],
+ [ '\\>', '\u0964' ],
[ '0', '\u0B66' ],
[ '1', '\u0B67' ],
[ '2', '\u0B68' ],