सदस्यः:Siddhartha Ghai/vector.js

विकिपीडिया, कश्चन स्वतन्त्रः विश्वकोशः

सूचना : भवता/भवत्या कृतानि सम्पादनानि संरक्ष्य तानि परिवर्तनेषु द्रष्टुं गवेषकस्य पृष्ठस्य पुनरारोपणम् (reload) आवश्यकं भवति ।

  • Firefox / Safari: Shiftकुड्मलेन सह Reloadकुड्मलं नुदतु ।
  • Google Chrome: Ctrl-Shift-R नोदनेन पुनरारोपणं भवति । (⌘-R इति Mac तन्त्रांशप्रयोक्तॄभ्यः)
  • Internet Explorer: Ctrlकुड्मलेन सह Refreshकुड्मलं नुदतु, Ctrl-F5 नुदतु वा ।
  • Opera: Tools → Preferences इत्यत्र गत्वा कर्तुं शक्नोति ।
mw.loader.using('ext.narayam.rules.hi', function nrules() {

var hi_rules = $.narayam.getScheme( 'hi' ).rules;

  /* customization here */
var custom_rules = [
		['([क-ह]़?)', '//~ ', '$1् '],
		['([क-ह]़?)् ', '', '$1 '], //full alphabet on space
/*The following rules are useless due to use of Normalization form C
//place the following above ['([क-ह])्\\`', '', '$1़्'] to override it
		['(ड)्\\`', '', 'ड़'],
		['(ढ)्\\`', '', 'ढ़'],
		['(ज)्\\`', '', 'ज़्'],
		['(F|f्\\`)', '', 'फ़्'], //this replaces ['F', '', 'फ़्']
		['(क)्\\`', '', 'क़्'], //merge with ['q', '', 'क़्']?
		['(ख)्\\`', '', 'ख़्'],
		['(ग)्\\`', '', 'ग़्'],
		['(य)्\\`', '', 'य़्'],
//end overriding ones
*/
//z/Z modification, replaces the single rule ['(z|Z)', '', '.']
		['z', '', 'ज़्'],
		['Z', '', '.'],
//O correction
		['([क-ह]़?)्O', '', '$1ॉ'], //replaces ['([क-ह]़?)्O', '', '$1ो']
		['O', '', 'ऑ'], //replaces ['O', '', 'ओ']
//E correction
		['([क-ह]़?)्E', '', '$1ॅ'], //replaces ['([क-ह]़?)्E', '', '$1े']
//oo and ee correction
		['([क-ह]़?)(ुu|्U|ोo)', '', '$1ू'], //oo gives ू, replaces ['([क-ह]़?)(ुu|्U|ॊo)', '', '$1ू']
		['([क-ह]़?)(्I|िi|ेe)', '', '$1ी'], //ee gives ी, replaces ['([क-ह]़?)(्I|िi|ॆe)', '', '$1ी']
//q correction
		['q', '', 'क़्'], //replaces ['q', '', '\u0951']
//gY and jY for ज्ञ
		['([ग्|ज्]़?)्Y', '', 'ज्ञ्'],
//disable double-nukta
		['([क-ह]़)(्?)\\`', '', '$1$2'], //should be placed above ['([क-ह])्\\`', '', '$1़्'] to override it
//place nukta before matra after alphabet even if it is input after the matra, same with halant. Why isn't this covered in NFC?
		['([क-ह])(ा|ि|ी|ु|ू|े|ै|ॅ|ो|ौ|ॉ|ृ|्)\\`', '', '$1़$2'] //replaces ['([क-ह])्\\`', '', '$1़्']
];

hi_rules.unshift.apply(hi_rules, custom_rules);
//duplicate rules ['j', '', 'ज्'], and ['j', '', 'ज़्'], latter should be removed

$.narayam.getScheme( 'hi' ).keyBufferLength = 2;

});
"https://sa.wikipedia.org/w/index.php?title=सदस्यः:Siddhartha_Ghai/vector.js&oldid=188333" इत्यस्माद् प्रतिप्राप्तम्