"පරිශීලක:Shameermbm/vector.js" හි සංශෝධන අතර වෙනස්කම්

Content deleted Content added
සුළුNo edit summary
සුළු පිටුව හිස් කෙරිණි
 
1 පේළිය:
/**
* Beginning of Transliteration Tool
* Author: Junaid P V [[user:Junaidpv]]
* added date: 2010-09-28
* Modified for(part): Shameermbm [[පරිශීලක:shameermbm]]
*/
function addOptionsToSimpleSearch() {
// To add checkbox for simple search box
//added by : [[User:Sadik Khalid]] (sadik.khalid@gmail.com)
//********************* Starts here **********************************
var firstone =document.getElementById('p-search');
if(firstone!= null) {
try
{
var nextone=document.getElementById('h5');
var transListBox = document.createElement("select");
transListBox.style.position ="relative";
transListBox.style.fontSize="0.7em";
transListBox.style.top="-4.5em";
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 );
}
var chkboxelement = document.createElement("input");
chkboxelement.setAttribute("type","checkbox");
chkboxelement.setAttribute("id","searchInputcb");
chkboxelement.style.position ="relative";
chkboxelement.style.left=".2em";
chkboxelement.style.top="-3.8em";
chkboxelement.value = 'searchInput'; // specifying curresponding input filed.
chkboxelement.checked = transettings.default_state;
if (chkboxelement.addEventListener)
chkboxelement.addEventListener("click", transOptionOnClick, false);
else if (chkboxelement.attachEvent)
chkboxelement.attachEvent("onclick", transOptionOnClick);
var chkboxlabel = document.createElement('chkboxlabel');
chkboxlabel.style.fontSize = '.7em';
//chkboxlabel.style.fontWeight = 'bold';
chkboxlabel.style.position ="relative";
chkboxlabel.style.left="0.5em";
chkboxlabel.style.top="-4.8em"
var linktohelp = document.createElement ('a')
linktohelp.href= transettings.checkbox.link.href;
linktohelp.title= transettings.checkbox.link.tooltip;
linktohelp.appendChild( document.createTextNode(transettings.checkbox.simple_text) );
chkboxlabel.appendChild(linktohelp);
chkboxlabel.appendChild(document.createElement('br'));
firstone.insertBefore(transListBox,nextone);
firstone.insertBefore(chkboxelement,nextone);
firstone.insertBefore(chkboxlabel,nextone);
firstone.style.position ="relative";
//firstone.style.top="-1.6em";
}
catch(ex)
{
//Error
}
}
//************************* Ends here ****************************
}
importScriptURI('http://ta.wikipedia.org/w/index.php?title=MediaWiki:T99_rules.js&action=raw&ctype=text/javascript');
importScriptURI('http://si.wikipedia.org/w/index.php?title=පරිශීලක:Shameermbm/Trans rules.js&action=raw&ctype=text/javascript');
importScriptURI('http://ml.wikipedia.org/w/index.php?title=Mediawiki:transli.js&action=raw&ctype=text/javascript');
function transetup(event) {
transettings.schemes[0] = tr_ta;
transettings.shortcut.controlkey =true;
transettings.shortcut.key = 'M';
transettings.checkbox.text = "සිංහලෙන් ලියන්න("+transettings.shortcut.toString()+")";
transettings.checkbox.link.href = "http://si.wikipedia.org/wiki/විකිපීඩියා:සිංහලෙන් ලිවිම";
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');
transettings.default_state = false;
addTransliterationOption( 'searchText', 'powerSearchText', 'wpNewTitle', 'wpReason', 'nsfrom', 'username', 'mwProtect-reason', 'nsto','wpText', 'wpUploadDescription', 'wpDestFile');
transettings.checkbox.position = "before";
addTransliterationOption( 'wpTextbox1', 'wpSummary' );
addOptionsToSimpleSearch();
initMultiScheme();
translitStateSynWithCookie('searchInput', 'wpTextbox1', 'wpSummary', 'searchText', 'powerSearchText', 'wpNewTitle', 'wpReason', 'nsfrom', 'username', 'mwProtect-reason', 'nsto','wpText');
}
if (window.addEventListener){
window.addEventListener('load', transetup, false);
} else if (window.attachEvent){
window.attachEvent('onload', transetup);
}
/* End of Transliteration Tool */
//document.getElementById("searchform")[0].value = "si";
"https://si.wikipedia.org/wiki/පරිශීලක:Shameermbm/vector.js" වෙතින් සම්ප්‍රවේශනය කෙරිණි