मिडियाविकि:Monobook.js

विकिपिडिया नं

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/**
 * Beginning of Transliteration Tool
 * Author: Junaid P V [[user:Junaidpv]]
 * added date: 2010-09-28
 */
function addOptionToSimpleSearch() {
	var searchform=document.getElementById('searchform');
	var searchInput=document.getElementById('searchInput');
	
	var transListBox = document.createElement("select");
	transListBox.style.fontSize="0.9em";
	transListBox.style.marginBottom = "0.1em";
	if (transListBox.addEventListener) 
		transListBox.addEventListener("change", writingStyleLBChanged, false);
	else if (transListBox.attachEvent) 
		transListBox.attachEvent("onchange", writingStyleLBChanged);
	
	var numOfSchemes = transettings.schemes.length;
	for(var i=0; i < numOfSchemes; i++) {
		var schemeOption = document.createElement("option");
		schemeOption.appendChild( document.createTextNode(transettings.schemes[i].text) );
		schemeOption.value = transettings.schemes[i].text;
		if(transettings.default_scheme_index==i) schemeOption.selected=true;
		transListBox.appendChild( schemeOption );
	}
	searchform.insertBefore(transListBox,searchInput);
}
$.when(
	mw.loader.load( '/w/index.php?title=User:Eukesh/translit.js&action=raw&ctype=text/javascript' ),
	$,
).then(transetup);

mw.loader.load( '/w/index.php?title=User:Eukesh/Inscript.js&action=raw&ctype=text/javascript' );
mw.loader.load( '/w/index.php?title=User:Eukesh/Nepali.js&action=raw&ctype=text/javascript' );
function transetup() {

	transettings.schemes[0] = tr_sa;
	transettings.schemes[1] = tr_sa_inscript;
	transettings.shortcut.controlkey =true;
	transettings.shortcut.key = 'M';
	transettings.checkbox.text =  "नेपाली ("+transettings.shortcut.toString()+")";
	transettings.checkbox.link.href = "//sa.wikipedia.org/wiki/Help:Typing";
	transettings.checkbox.simple_text = 'नेपाली';
	transettings.checkbox.link.tooltip = "नेपाली टाइप गर्न यसको प्रयोग गर्नुहोस्, की बोर्डबाट: "+transettings.shortcut.toString();
	setDefaultSchmeIndex(readCookie("transToolIndex"));

	transliterate('searchInput', 'wpTextbox1', 'wpSummary', 'searchText', 'powerSearchText', 'wpNewTitle', 'wpReason', 'nsfrom', 'username', 'mwProtect-reason', 'nsto','wpText',  'wpUploadDescription', 'wpDestFile');
	addTransliterationOption('searchInput', 'searchText', 'powerSearchText', 'wpNewTitle', 'wpReason', 'nsfrom', 'username', 'mwProtect-reason', 'nsto','wpText', 'wpUploadDescription', 'wpDestFile');
	transettings.checkbox.position = "before";
	addTransliterationOption( 'wpTextbox1', 'wpSummary' );
	addOptionToSimpleSearch();
	initMultiScheme();
	translitStateSynWithCookie('searchInput', 'wpTextbox1', 'wpSummary', 'searchText', 'powerSearchText', 'wpNewTitle', 'wpReason', 'nsfrom', 'username', 'mwProtect-reason', 'nsto','wpText');
}

/* End of Transliteration Tool */