பயனர்:Hareesh Sivasubramanian/common.js

கட்டற்ற கலைக்களஞ்சியமான விக்கிப்பீடியாவில் இருந்து.

குறிப்பு - சேமித்த பின்னர், நீங்கள் செய்த மாற்றங்களைக் காண்பதற்கு உங்கள் உலவியின் இடைமாற்று அகற்றப்பட வேண்டும்.

  • மொஸில்லா பயர்பாக்ஸ் / சபாரி: Shift+Reload, அல்லது Ctrl-F5 அல்லது Ctrl-R (⌘-R Mac ல்)
  • கூகிள் குரோம் Ctrl-Shift-R அழுத்தவும். (⌘-Shift-R Mac ல்) ;
  • இண்டர்நெட் எக்ஸ்ப்ளோரர்: Ctrl-Refresh அல்லது Ctrl-F5 ஐ அழுத்தவும்.
  • ஒபேரா: Tools → Preferences இல் இடைமாற்றை அகற்றவும்;
/*
Thanks to [[User:Jayarathina]] for the script 
and [[User:தமிழ்க்குரிசில்]] for the list of replacable words.
Live long and prosper!!
*/
var replaceList = {
 
//==================== Months =============================
' ஜனவரி' : ' January',
' பெப்ரவரி' : ' February',
' மார்ச்' : ' March',
' ஏப்ரல்' : ' April',
' மே' : ' May',
' ஜூன்' : ' June',
' ஜூலை' : ' July',
' ஆகஸ்ட்' : ' August',
' செப்டம்பர்' : ' September',
' அக்டோபர்' : ' October',
' நவம்பர்' : ' November',
' டிசம்பர்' : ' December',
 
//==================== Infoboxes =============================
 
 '= இல்லை': '= No',
 '= உண்டு': '= Yes',
'= நகரம்': '= City',
'= இந்தியா': '= India',
'= நிறுவப்பட்ட நாள் ': '= Established',
'= மொழிகள் ': '= Languages',
'= ஆட்சி்': '= Official',
'= தொலைபேசிக் குறியீடு': '= Telephone code',
'<references': '<சான்றுகள்',
'=மாவட்டம் ': '=District ',
'= மாவட்டம் ': '= District ',
'= நாடு': '= Country',
'=நாடு': '=Country',
'=தலைமையகம்': '=Headquarters',
'= தலைமையகம்': '= Headquarters',
'= செயல்படுகிறது': '= Functioning',
'|மாநிலம்]]' : /\|State\]\]/gi,
'|மாவட்டம்]]' : /\|District\]\]/gi, 
'= நகராட்சி': '= municipality',
'=நகராட்சி': '=municipality',
'=நகரம்' :'= Town',
 
'= தமிழ்':'= Tamil',
'= தெலுங்கு':'= Telugu',
'= கன்னடம்' :'= Kannada',
'= மலையாளம்':'= Malayalam',
'= இந்தி':'= Hindi',
 
 
//==================== Article sectioning =============================
'==சான்றுகள்==':  '==References==',
'==வெளிப்புற இணைப்புகள்==': '==External links==',
'==மக்கள் தொகை==': '==Demographics==',
'==வரலாறு==':  '==History==',
'== சான்றுகள் ==':  '== References ==',
'== வரலாறு ==':  '== History ==',
'== இணைப்புகள் ==': '== External links ==',
'== மக்கள் தொகை ==': '== Demographics ==',
'==தட்பவெப்ப நிலை==': '==Climate==',
'== தட்பவெப்ப நிலை ==': '== Climate ==',
'==பொருளாதாரம்==': '==Economy==',
'== பொருளாதாரம் ==': '== Economy ==',
'==போக்குவரத்து==': '==Transport==',
'== போக்குவரத்து ==': '== Transport ==',
'== மேலும் பார்க்க ==': '== See also ==',
'==மேலும் பார்க்க==': '==See also==',
'==அமைவிடமும் அமைப்பும்==': '==Location and Layout==',
 
//Punctuation, Cleanup and wiki syntax related
', ':' ,',
'. ': / \./g,
'|-':/\| -/g,
'|}':/\| }/g,
 

//Tamil grammar rules, spelling mistakes and related
 
 
//==================== Naming conventions =============================
'முதலாம்':'1st ',
'இரண்டாம்':'2nd ',
'மூன்றாம்':'3rd ',
'நான்காவது':'4th ',
'ஐந்தாம்':'5th ',
'ஆறாம்':'6th ',
'ஏழாம்':'7th ',
'எட்டாம்':'8th ',
'ஒன்பதாம்':'9th ',
'பத்தாம்':'10th ',
'பதினொன்றாம்':'11th ',
'பன்னிரண்டாம்':'12th ',
'பதின்மூன்றாம்':'13th ',
'பதினான்காம்':'14th ',
'பதினைந்தாம்':'15th ',
'பதினாறாம்':'16th ',
'பதினேழாம்':'17th ',
'பதினெட்டாம்':'18th ',
'பத்தொன்பதாம்':'19th ',
'இருபதாம்':'20th ',
'இருபத்து ஒன்றாம்':'21st ',
' இருபத்திரண்டாம்':'22nd ',
'இருபத்துமூன்றாம்':'23rd ',
'இருபத்துநான்காம்':'24th ',
'இருபத்தைந்தாம்':'25th ',
'இருபத்தாறாம்':'26th ',
'இருபத்தேழாம்':'27th ',
'இருபத்தெட்டாம்':'28th ',
'இருபத்தொன்பதாம்':'29th ',
'முப்பதாம்':'30th ',
'முப்பத்தொன்றாம்':'31st ',
'முப்பத்திரண்டாம்':'32nd ',
'முப்பத்துமுன்றாம்':'33rd ',
'முப்பத்து நான்காம்':'34th ',
'முப்பத்தைந்தாம்':'35th ',
'முப்பத்தாறாம்':'36th ',
'முப்பத்தேழாம்':'37th ',
'முப்பத்தெட்டாம்':'38th ',
'முப்பத்தொன்பதாம்':'39th ',
'நாற்பதாம்':'40th ',
 
//=================== Place Names ==========================
'|பெங்களூர்]]' : /\|Bangalore\]\]/gi,
'|சென்னை]]' : /\|Chennai\]\]/gi,
'|தில்லி]]' : /\|Delhi\]\]/gi,
'|கவுகாத்தி]]' : /\|Guwahati\]\]/gi,
'|இந்தோர்]]' : /\|Indore\]\]/gi,
'|ஜெய்ப்பூர்]]' : /\|Jaipur\]\]/gi,
'|கொல்கத்தா]]' : /\|Kolkatta\]\]/gi,
'|மும்பை]]' : /\|Mumbai\]\]/gi,
'|மைசூர்]]' : /\|mysore\]\]/gi,
'|மதுரை]]' : /\|madurai\]\]/gi,
'|கோயம்புத்தூர்]]' : /\|coimbatore\]\]/gi,
'|கொச்சி]]' : /\|kochi\]\]/gi,
'|ராஞ்சி]]' : /\|ranchi\]\]/gi,
'|புனே]]' : /\|pune\]\]/gi,
'|ஐதராபாத்]]' : /\|hyderabad\]\]/gi,
'|அகமதாபாத்]]' : /\|ahmedabad\]\]/gi,
'|திருவனந்தபுரம்]]' : /\|Thiruvananthapuram\]\]/gi,  

 
//================= Transport ================
 'புறநகர்': 'suburban',
'பேருந்து நிலையம்': 'bus stand',
'விமான நிலையம்': 'Airport',
'தேசிய நெடுஞ்சாலை': 'National Highway ',
'Infobox station' : 'Infobox நிலையம்',			
 
//politics and related
'மக்களவைத் தொகுதி': 'Lok Sabha constituency',
'==சட்டமன்றத் தொகுதிகள்==':'==Assembly segments==',
'சட்டமன்றத் தொகுதி':'(Vidhan Sabha constituency)',
'அவை:':'These are:',
'|தொகுதியின் எண்' : /\|Constituency number/gi,
'|பெயர்' : /\|Name/gi,
'|ஒதுக்கீடு' : /\|Reserved for/gi,
'|மாவட்டம்' : /\|District/gi,
'|இல்லை' : /\|None/gi,
'==பாராளுமன்ற உறுப்பினர்கள்==':'==Members of Parliament==',
 
//============== Cinema and related ================
 

'|| தமிழ்' : /\|\| Tamil /gi,
'|| மலையாளம்' : /\|\| Malayalam /gi,
'|| கன்னடம்' : /\|\| Kannada /gi,
'|| தெலுங்கு' : /\|\| Telugu /gi,
'|| பெங்காலி' : /\|\| Bengali /gi,
'|| இந்தி' : /\|\| Hindi /gi,
'|| மராத்தி' : /\|\| Marathi /gi,
'|| சிங்களம்' : /\|\| Sinhala /gi,
'|| ஆங்கிலம்' : /\|\| English /gi,
'|| போஜ்புரி' : /\|\| Bhojpuri /gi,
'|| பிரெஞ்சு' : /\|\| French /gi,
 
'திரைப்படம்)|' : /film\)\|/gi,  
 
'== நடிப்பு==':'== Cast==',
'==நடிப்பு==':'==Cast==',
'==கதை==':'==Plot==',
'== கதை ==':'== Plot ==',
};

//Custom Script:

function setCookie(e,t,n){n="undefined"===n?30:n;var r=new Date;r.setTime(r.getTime()+864e5*n);document.cookie=e+"="+t+";expires="+r.toUTCString()+";path=/"}function getCookie(e){return(e=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)"))?e[2]:null}function alert1(e,t,n){myMsgBx.config({height:t+"em",background:n}).show().append(e).write()}var txt,myMsgBx,langCookie="iwtLangPref",customizeToolbar=function(){txt=$("#wpTextbox1");txt.wikiEditor("addToToolbar",{sections:{interWikiLinker:{type:"toolbar",label:"InterWiki Translator",groups:{tamSorting:{tools:{searchReplaceList:{labelMsg:"விருப்பப் பட்டியலில் இருக்கும் சொற்களைத்  தேடிக்கண்டுபிடித்து மாற்றவும்",type:"button",icon:"//upload.wikimedia.org/wikipedia/commons/thumb/1/17/System-search.svg/200px-System-search.svg.png",action:{type:"callback",execute:function(e){if(0===t)if("undefined"==typeof replaceList){var n="",n="undefined"!=typeof en_words?'IWTஇல் மாற்றங்கள் செய்யப்பட்டுள்ளன. உங்கள் விருப்பப்பட்டியலை புதுப்பிக்கவும் «<small><a href="//ta.wikipedia.org/wiki/பயனர்:Jayarathina/iwt#Replace_list_of_predefined_words">மேலும் அறிய</a></small>»':"விருப்பப் பட்டியல் கொடுக்கப்படவில்லை";alert1(n,1.5,"#fed")}else{e=txt.val();for(n in replaceList)e=e.replace("string"!==typeof replaceList[n]?RegExp(replaceList[n]):RegExp(replaceList[n],"gi"),n);txt.val(e);alert1("நிறைவுற்றது",1.5,"#efd")}}}}}},linker:{tools:{interWikiLink:{labelMsg:"பிற மொழி விக்கி இணைப்புகளுக்கு இணையான தமிழ் விக்கி இணைப்புகளைத் தேடிக்கண்டுபிடித்து மாற்றவும்",type:"button",icon:"//upload.wikimedia.org/wikipedia/commons/thumb/2/20/Go-jump.svg/200px-Go-jump.svg.png",action:{type:"callback",execute:function(i){if(0===t){i=e(txt[0]);var s=txt.val();i.start!=i.end?(s=s.slice(i.start,i.end),alert1("தேர்வு செய்யப்பட்ட உரையின் இணைப்புகளுக்கு மட்டும் ","10","#E0EEF7")):alert1("","10","#E0EEF7");myMsgBx.appendWrite("கருவி இயங்குகின்றது.... காத்திருக்கவும்...");if(i=s.match(/\[\[([^\]]+(?:[^|\]]*\|)?)\]\]/gmi)){t=0;n=!1;for(var s=[],o=0;o<i.length;o++){var u=i[o].substr(2,i[o].length-4),a=u.indexOf("[[");-1<a&&(u=u.substr(a+2,u.length));/(?:F|f)ile:|(?:I|i)mage:/.test(u)||(u=u.split("|")[0],u=u.split("#")[0],u=$.trim(u),0===u.length||/[஀-௿]+/.test(u)||/^\d+$/g.test(u)||-1!=s.indexOf(u)||(s.push(u),r(u)))}0===t?myMsgBx.appendWrite("<br/>நிறைவுற்றது: தகுந்த இணைப்புகள் ஏதுமில்லை"):(myMsgBx.appendWrite("<br/>விக்கி இணைப்புகளின் எண்ணிக்கை: "+t),$(".msgDisplay_floatingMenu").hide(),txt.attr("readonly","readonly"),txt.css({"background-color":"#F0F0F0"}),document.body.style.cursor="wait")}else myMsgBx.appendWrite("<span style='display:block;background:#fed;'>விக்கி இணைப்புகள் ஏதுமில்லை</span>")}}}},pref:{labelMsg:"பிற மொழி விக்கியின் குறியீட்டினை மாற்ற",type:"button",icon:"//upload.wikimedia.org/wikipedia/commons/thumb/1/11/Preferences-system.svg/200px-Preferences-system.svg.png",action:{type:"callback",execute:function(e){e=prompt("எந்த மொழி விக்கிப்பீடியாவிலிருந்து  இணைப்புகளைப் பெறவேண்டும்? \n\n(சுருக்கக் குறியீடு மட்டும்)",getCookie(langCookie));null!=e&&""!=e&&setCookie(langCookie,e,365)}}}}}}}}});var e=function(e){e.focus();var t=0,n=0,r,i,s;"number"==typeof e.selectionStart&&"number"==typeof e.selectionEnd?(t=e.selectionStart,n=e.selectionEnd):(i=document.selection.createRange())&&i.parentElement()==e&&(s=e.value.length,r=e.value.replace(/\r\n/g,"\n"),n=e.createTextRange(),n.moveToBookmark(i.getBookmark()),e=e.createTextRange(),e.collapse(!1),-1<n.compareEndPoints("StartToEnd",e)?t=n=s:(t=-n.moveStart("character",-s),t+=r.slice(0,t).split("\n").length-1,-1<n.compareEndPoints("EndToEnd",e)?n=s:(n=-n.moveEnd("character",-s),n+=r.slice(0,n).split("\n").length-1)));return{start:t,end:n}},t=0,n=!1,r=function(e){t++;null==getCookie(langCookie)&&setCookie(langCookie,"en",365);$.ajax({url:"//"+getCookie(langCookie)+".wikipedia.org/w/api.php?action=query&format=json&callback=?",dataType:"json",type:"GET",cache:!0,data:{prop:"langlinks",lllang:"ta",titles:e,redirects:""},beforeSend:function(){myMsgBx.appendWrite("<span id='"+e+"' style='display:block;background:#FFFCC5;' >"+t+"."+e+"  </span>")}}).done(function(t){n=!0;var r=$("<p />").html("<span class='a' id='"+e+"'></span>").find(".a").attr("id"),r=$("#msgDisplay_interWikiLinker > [id='"+r+"']");try{for(var i in t.query.pages){wikitext=t.query.pages[i].langlinks[0]["*"];wikitext=$.trim(wikitext);0<wikitext.length&&(e=e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),txt.val(txt.val().replace(RegExp("\\[\\["+e+"( *)(\\]\\]|\\||#)","gi"),"[["+wikitext+"$1$2")),r.append(" »» "+wikitext+" (ஆயிற்று)").css("background","#efd"));break}}catch(s){r.append(" »» இணைப்பில்லை ("+s.message+")").css("background","#fed")}}).always(function(){t--;0===t&&(txt.prop('readonly', false),txt.css({"background-color":"#FFFFFF"}),document.body.style.cursor="default",$(".msgDisplay_floatingMenu").show(),myMsgBx.appendWrite("<span style='display:block;background:#EFD;'>நிறைவுற்றது</span>"))});setTimeout(function(){n||0==t||(alert1('தரவு வழங்கல் பிழை.  உங்கள்  பிற மொழி விக்கியின் குறியீட்டினை  <a href="//'+getCookie(langCookie)+'.wikipedia.org" target="_blank">சரிபார்க்கவும்</a>.',1.5,"#fed"),txt.prop('readonly', false),txt.css({"background-color":"#FFFFFF"}),document.body.style.cursor="default",$(".msgDisplay_floatingMenu").show(),t=0)},1e4)}};-1!==$.inArray(mw.config.get("wgAction"),["edit","submit"])&&mw.loader.using("user.options",function(){mw.user.options.get("usebetatoolbar")&&(mw.loader.using("ext.wikiEditor",function(){$(document).ready(customizeToolbar)}),$.ajax({url:"//en.wikipedia.org/w/index.php?title=User:V111P/js/msgDisplay.js&action=raw&ctype=text/javascript",dataType:"script",cache:!0}).done(function(){null==getCookie(langCookie)&&setCookie(langCookie,"en",365);myMsgBx=mediaWiki.libs.msgDisplay("interWikiLinker").config({insertRelTo:"#wikiEditor-ui-toolbar",insertRel:"append"});alert1("","1","#FFFCC5");$(".msgDisplay_floatingMenu").prepend("<small>Close </small>»»»");$(".msgDisplay_menuButton").remove();$(".msgDisplay_okButton").remove();$(".msgDisplay_helpLink").remove();$(".msgDisplay_upButton").remove();$(".msgDisplay_expandedSection").removeClass("msgDisplay_expandedSection").addClass("msgDisplay_menuButton");myMsgBx.remove()}))});

// Original Script URL:
// mw.loader.load('//ta.wikipedia.org/w/index.php?title=User:Jayarathina/iwt.js&action=raw&ctype=text/javascript');
importScript('User:Kaldari/wikilove.js');
"https://ta.wikipedia.org/w/index.php?title=பயனர்:Hareesh_Sivasubramanian/common.js&oldid=3355586" இலிருந்து மீள்விக்கப்பட்டது