fbpx
วิกิพีเดีย

วิกิพีเดีย:สคริปต์ผู้ใช้

สคริปต์ผู้ใช้ (user scripts) เป็นโค้ดภาษาจาวาสคริปต์ ที่ใช้ในการตกแต่ง เปลี่ยนแปลง หรือเพิ่มเติมความสามารถ รูปแบบวิกิพีเดียสำหรับผู้ใช้ดังกล่าว โดยปกติจะใส่ในหน้า __สกิน__.js ของผู้ใช้ ซึ่งความสามารถส่วนนี้สำหรับผู้ที่เป็นสมาชิกวิกิพีเดียเท่านั้น

การใส่สคริปต์ผู้ใช้

โดยให้ใส่โค้ดจาวาสคริปต์ที่ต้องการที่หน้า:

ผู้ใช้:__ชื่อผู้ใช้__/__สกิน__.js

โดยเปลี่ยน "__ชื่อผู้ใช้__" เป็นชื่อผู้ใช้ของคุณเอง และ "__สกิน__" เป็นสกินที่คุณต้องการใช้สคริปต์ เช่น vector หรือ monobook (สกินปริยายของวิกิพีเดียคือ vector)

ตัวอย่างความสามารถเพิ่มเมนูด้านบน

ตัวอย่างความสามารถที่นิยมคือ การเพิ่มเมนูด้านบน เหมือนดังรูปแสดง (หรืออาจจะเพิ่มด้านซ้ายมือ) วิธีใช้โดยการนำฟังก์ชันของจาวาสคริปต์ ไปใส่ไว้ในหน้าผู้ใช้

 
ตัวอย่างการใช้งานสคริปต์ผู้ใช้

ตัวอย่างสคริปต์ จากผู้ใช้งานคนอื่น

สคริปต์ ที่นำไปใช้ได้

สคริปต์จะแบ่งเป็น 2 แบบ คือ สคริปต์เครื่องมือ กับสคริปต์เฉพาะทาง โดยการใช้งานของสคริปต์เฉพาะทางอาจ จำเป็น ที่จะต้องใช้ สคริปต์ เครื่องมือตัวใดตัวหนึ่ง ในการช่วยแสดงผล โดยวิธีการนำไปใช้ สามารถเลือกสคริปต์ที่ต้องการไปใส่ไว้ในหน้าสคริปต์ ของตัวเองตามความเหมาะสม สำหรับสคริปต์ เครื่องมือ สามารถใส่ครั้งเดียว และสามารถเรียกใช้ได้มากกว่าหนึ่งครั้ง

สำคัญ: ทุกครั้งที่มีการเปลี่ยนแปลงหน้าจาวาสคริปต์ของคุณ ให้ทำการ Refresh หน้านั้นหลังจากบันทึกเพื่อเห็นการเปลี่ยนแปลง ขั้นตอนการ Refresh:

  • ใน IE กด Ctrl-F5
  • ใน Mozilla/Safari/Konqueror กด Shift ค้าง แล้วกด Reload (หรือ Ctrl-Shift-R)
  • ใน Opera กด F5

สคริปต์เครื่องมือ

เพิ่มแท็บด้านบน

function addTab(url, name, id, title, key) { var tabs = document.getElementById('p-cactions').getElementsByTagName('ul') [0]; addlilink(tabs, url, name, id, title, key) ; } 

เพิ่มเมนู เครื่องมือ ด้านซ้าย

function addlilink(tabs, url, name, id, title, key) { var na = document.createElement('a') ; na.href = url; na.appendChild(document.createTextNode(name)) ; var li = document.createElement('li') ; if(id) li.id = id; li.appendChild(na) ; tabs.appendChild(li) ; na.accesskey = key; var pref = 'alt-'; if(((clientPC.indexOf('AppleWebKit') !=-1) && (clientPC.indexOf('spoofer') ==-1)) || navigator.userAgent.toLowerCase().indexOf( 'mac' ) != -1 ) pref = 'control-'; if(clientPC.indexOf('opera') !=-1) pref = 'shift-esc-'; if(key && title) na.title = title + ' [' + pref + key + ']'; else if(title) na.title = title; else if(key) na.title = '[' + pref + key + ']'; return li; } 

อ่านชื่อของหน้านั้น

var articleTitle = mw.config.get('wgPageName'); 

สคริปต์เฉพาะทาง

ใส่ข้อความต้องการความช่วยเหลือ

ใส่ข้อความต้องการความช่วยเหลือ ที่ส่วนบนของบทความ และทำการเซฟบทความทันที

// ========== Quick Wikify ========== function doQwikify() { document.editform.wpTextbox1.value = "{{ช่วยดูหน่อย}}\n\n" + document.editform.wpTextbox1.value; document.editform.wpSummary.value = "ช่วยดูหน่อย"; document.editform.wpMinoredit.checked = true; document.editform.submit() ; } function addQwikify() { addTab("javascript:doQwikify() ", "ช่วย", "ca-wikify", "แจ้งว่าช่วยดูหน่อย", "") ; akeytt() ; } if (document.title.indexOf("แก้ไข ") == 0) { if (window.addEventListener) window.addEventListener("load", addQwikify, false) ; else if (window.attachEvent) window.attachEvent("onload", addQwikify) ; } 

แจ้งโฆษณา

ใส่กล่องข้อความแจ้งโฆษณา ที่ส่วนบนของบทความ และทำการเซฟบทความทันที

// ========== แจ้งโฆษณา ========== addOnloadHook(function() { //check if called from deletion request if(document.getElementById('ca-nstab-special')) { return; } if (document.title.indexOf("แก้ไข") != -1) { if (document.URL.lastIndexOf("&fakeaction=advert") == -1) return; document.editform.wpTextbox1.value = "{{โฆษณา}}\n\n" + document.editform.wpTextbox1.value; document.editform.wpSummary.value = "แจ้งโฆษณา"; document.editform.submit() ; return; } addTab("javascript:doAdvert() ", "แจ้งโฆษณา", "ca-advert", "คำสั่งแจ้งโฆษณา", "") ; }) ; function doAdvert() { //edit page var title = document.title.substr(0, document.title.lastIndexOf(' - วิกิพีเดีย')) ; location.assign("/w/index.php?title=" + title + "&action=edit&fakeaction=advert") ; } 

แจ้งลบ

ใส่กล่องข้อความแจ้งลบ ที่ส่วนบนของบทความ และทำการเซฟบทความทันที

// ========== แจ้งลบ ========== addOnloadHook(function() { //check if called from deletion request if(document.getElementById('ca-nstab-special')) { return; } if (document.title.indexOf("แก้ไข") != -1) { if (document.URL.lastIndexOf("&fakeaction=speedydel") == -1) return; document.editform.wpTextbox1.value = "{{ลบ}}\n\n" + document.editform.wpTextbox1.value; document.editform.wpSummary.value = "แจ้งลบ"; document.editform.submit() ; return; } addTab("javascript:doQsd() ", "แจ้งลบ", "ca-sd", "คำสั่งแจ้งลบ", "") ; }) ; function doQsd() { //edit page var title = document.title.substr(0, document.title.lastIndexOf(' - วิกิพีเดีย')) ; location.assign("/w/index.php?title=" + title + "&action=edit&fakeaction=speedydel") ; } 

แจ้งละเมิดลิขสิทธิ์

ใส่กล่องข้อความแจ้งละเมิดลิขสิทธิ์พร้อมเติมวันที่ในเวลาไทยให้โดยอัตโนมัติ ที่ส่วนบนของบทความ

// ========== แจ้งละเมิดลิขสิทธิ์ (รุ่นใส่เวลาไทย) ========== function doCopyViolation() { var currentDay = new Date() ; var thaiDate = new Date(currentDay.getTime() + 25200000) ; //7*1000*60*60 var month = thaiDate.getUTCMonth() +1; var year = thaiDate.getUTCFullYear() +543; document.editform.wpTextbox1.value = "{{ละเมิดลิขสิทธิ์ | url= | วันที่=" + thaiDate.getUTCDate() + "/" + month + "/" + year + " | หมายเหตุ= }}" document.editform.wpSummary.value = "แจ้งละเมิดลิขสิทธิ์ "; } function addCopyViolation() { addTab("javascript:doCopyViolation() ", "ละเมิด", "ca-vio", "แจ้งละเมิดลิขสิทธิ์", "") ; akeytt() ; } if (document.title.indexOf("แก้ไข ") == 0) { if (window.addEventListener) window.addEventListener("load", addCopyViolation, false) ; else if (window.attachEvent) window.attachEvent("onload", addCopyViolation) ; } 

เก็บกวาดนโยบายเก่า

// ========== เก็บกวาดนโยบายเก่า ========== // สคริปต์นี้ เปลี่ยนคำสั่งเก่า เช่น Category, Image, และข้อความเก่า function doCleanupTag() { text = document.editform.wpTextbox1.value; text = replace(text,'[[Category:','[[หมวดหมู่:') ; text = replace(text,'[[category:','[[หมวดหมู่:') ; text = replace(text,'[[Image:','[[ภาพ:') ; text = replace(text,'[[image:','[[ภาพ:') ; text = replace(text,'== แหล่งอ้างอิง','== อ้างอิง') ; text = replace(text,'== หนังสืออ้างอิง','== อ้างอิง') ; text = replace(text,'== เอกสารอ้างอิง','== อ้างอิง') ; text = replace(text,'== แหล่งข้อมูลอ้างอิง','== อ้างอิง') ; text = replace(text,'== หัวข้ออื่นที่เกี่ยวข้อง','== ดูเพิ่ม') ; text = replace(text,'== ดูเพิ่มที่','== ดูเพิ่ม') ; text = replace(text,'== เว็บไซต์อื่น','== แหล่งข้อมูลอื่น') ; text = replace(text,'== เว็บไซต์ภายนอก','== แหล่งข้อมูลอื่น') ; text = replace(text,'== โยงภายนอก','== แหล่งข้อมูลอื่น') ; text = replace(text,'== ลิงก์ภายนอก','== แหล่งข้อมูลอื่น') ; text = replace(text,'== ลิงค์ภายนอก','== แหล่งข้อมูลอื่น') ; text = replace(text,'== Link ภายนอก','== แหล่งข้อมูลอื่น') ; text = replace(text,'== ข้อมูลภายนอก','== แหล่งข้อมูลอื่น') ; text = replace(text,'*[','* [') ; document.editform.wpTextbox1.value = text; document.editform.wpSummary.value = "แก้ไข +เก็บกวาด"; } function addCleanupTag() { addTab("javascript:doCleanupTag() ", "เก็บกวาด", "ca-taclt", "เก็บกวาด", "") ; } if (document.title.indexOf("แก้ไข ") == 0) { if (window.addEventListener) window.addEventListener("load", addCleanupTag, false) ; else if (window.attachEvent) window.attachEvent("onload", addCleanupTag) ; } 

สลับเปลี่ยนระหว่างตัวเลขอารบิกกับเลขไทย

// ========== Replace string ========== // Javascript from http://www.irt.org/script/242.htm function replace(string,text,by) { // Replaces text with by in string var strLength = string.length, txtLength = text.length; if ((strLength == 0) || (txtLength == 0)) return string; var i = string.indexOf(text) ; if ((!i) && (text != string.substring(0,txtLength))) return string; if (i == -1) return string; var newstr = string.substring(0,i) + by; if (i+txtLength < strLength) newstr += replace(string.substring(i+txtLength,strLength) ,text,by) ; return newstr; } // ========== Thai to Arabic Numbers ========== // This script converts all Thai numbers (๑ ๒ ๓) to Arabic numbers (1 2 3) function doConvertNumber() { text = document.editform.wpTextbox1.value; text = replace(text,'๑','1') ; text = replace(text,'๒','2') ; text = replace(text,'๓','3') ; text = replace(text,'๔','4') ; text = replace(text,'๕','5') ; text = replace(text,'๖','6') ; text = replace(text,'๗','7') ; text = replace(text,'๘','8') ; text = replace(text,'๙','9') ; text = replace(text,'๐','0') ; document.editform.wpTextbox1.value = text; document.editform.wpSummary.value = "เปลี่ยนเลขไทยเป็นอารบิก"; } function addConvertNumber() { addTab("javascript:doConvertNumber() ", "๒ ->2", "ca-tanum", "เปลี่ยนเลขไทยเป็นอารบิก", "") ; akeytt() ; } if (document.title.indexOf("แก้ไข ") == 0) { if (window.addEventListener) window.addEventListener("load", addConvertNumber, false) ; else if (window.attachEvent) window.attachEvent("onload", addConvertNumber) ; } // ========== Arabic to Thai Numbers ========== // This script converts all Arabic numbers (1 2 3) to Thai numbers (๑ ๒ ๓) function doConvertToThaiNumber() { text = document.editform.wpTextbox1.value; text = replace(text,'1','๑') ; text = replace(text,'2','๒') ; text = replace(text,'3','๓') ; text = replace(text,'4','๔') ; text = replace(text,'5','๕') ; text = replace(text,'6','๖') ; text = replace(text,'7','๗') ; text = replace(text,'8','๘') ; text = replace(text,'9','๙') ; text = replace(text,'0','๐') ; document.editform.wpTextbox1.value = text; document.editform.wpSummary.value = "เปลี่ยนเลขอารบิกเป็นไทย"; } function addConvertToThaiNumber() { addTab("javascript:doConvertToThaiNumber() ", "2 ->๒", "ca-atnum", "เปลี่ยนเลขอารบิกเป็นไทย", "") ; akeytt() ; } if (document.title.indexOf("แก้ไข ") == 0) { if (window.addEventListener) window.addEventListener("load", addConvertToThaiNumber, false) ; else if (window.attachEvent) window.attachEvent("onload", addConvertToThaiNumber) ; } 

แก้ย่อหน้าแรกสุด (ย่อหน้าสรุป)

// ========== Edit Section 0 ========== function addEditSection0() { ta['ca-edit-0'] = ['', 'Edit the zeroth section of this page']; if (!document.getElementById) return; x = document.getElementById('ca-edit') ; if(!x) return; y = document.createElement('LI') ; y.id = 'ca-edit-0'; if (x.className == 'selected') { if (/&action=edit&section=0$/.test(window.location.href)) { x.className = 'istalk'; y.className = 'selected'; } else { x.className = 'selected istalk'; } } else if (x.className == 'selected istalk') { if (/&action=edit&section=0$/.test(window.location.href)) { x.className = 'istalk'; y.className = 'selected istalk'; } else { y.className = 'istalk'; } } else { y.className = x.className; x.className = 'istalk'; } z = document.createElement('A') ; if (x.children) { z.href = x.children[0].href + '&section=0'; z.appendChild(document.createTextNode('0')) ; y.appendChild(z) ; document.getElementById('p-cactions').children[1].insertBefore(y,x.nextSibling) ; } else { z.href = x.childNodes[0].href + '&section=0'; z.appendChild(document.createTextNode('0')) ; y.appendChild(z) ; document.getElementById('p-cactions').childNodes[3].insertBefore(y,x.nextSibling) ; } } if (document.title.indexOf("Editing ") == -1) { if (window.addEventListener) window.addEventListener("load", addEditSection0, false) ; else if (window.attachEvent) window.attachEvent("onload", addEditSection0) ; } 

ดูความแตกต่างล่าสุด

// ========== ดูความแตกต่างล่าสุด (Last diff) ========== var articleTitle = mw.config.get('wgPageName'); function doLastDiff() { var nurl="http://th.wikipedia.org/w/index.php?title=" + articleTitle + "&diff=cur&oldid=prev"; document.location=nurl; } function addLastDiff() { var tabs = document.getElementById('p-cactions').getElementsByTagName('ul') [0]; var l=addlilink(tabs, "javascript:doLastDiff() ", 'ล่าสุด', '') ; l.lastChild.title="ดูความแตกต่างล่าสุด"; } if (document.title.indexOf("แก้ไข") == -1) { if(wgCanonicalNamespace.indexOf("Special") == -1) { if (window.addEventListener) window.addEventListener("load", addLastDiff, false) ; else if (window.attachEvent) window.attachEvent("onload", addLastDiff) ; } } 

บังคับลาพักร้อน

เด, สคร, ปต, ใช, หน, าน, เป, นหน, าสารสนเทศซ, งอธ, บายว, ตรท, งแล, วของช, มชนแก, ไขของบางแง, มของบรรท, ดฐานและขนบธรรมเน, ยมของว, เด, งน, ไม, ใช, นโยบายหร, อแนวปฏ, ของว, เด, เพราะย, งไม, านการพ, จารณาอย, างถ, วนจากช, มชนเว, บย, usสคร, ปต, ใช, user, scripts, เป,. hnaniepnhnasarsnethssungxthibaywtrthitngaelwkhxngchumchnaekikhkhxngbangaengmumkhxngbrrthdthanaelakhnbthrrmeniymkhxngwikiphiediy thngni imichnoybayhruxaenwptibtikhxngwikiphiediy ephraayngimphankarphicarnaxyangthithwncakchumchnewbyx WP USskhriptphuich user scripts epnokhdphasacawaskhript thiichinkartkaetng epliynaeplng hruxephimetimkhwamsamarth rupaebbwikiphiediysahrbphuichdngklaw odypkticaisinhna skin js khxngphuich sungkhwamsamarthswnnisahrbphuthiepnsmachikwikiphiediyethann enuxha 1 karisskhriptphuich 2 twxyangkhwamsamarthephimemnudanbn 3 twxyangskhript cakphuichngankhnxun 4 skhript thinaipichid 4 1 skhriptekhruxngmux 4 1 1 ephimaethbdanbn 4 1 2 ephimemnu ekhruxngmux dansay 4 1 3 xanchuxkhxnghnann 4 2 skhriptechphaathang 4 2 1 iskhxkhwamtxngkarkhwamchwyehlux 4 2 2 aecngokhsna 4 2 3 aecnglb 4 2 4 aecnglaemidlikhsiththi 4 2 5 ekbkwadnoybayeka 4 2 6 slbepliynrahwangtwelkhxarbikkbelkhithy 4 2 7 aekyxhnaaerksud yxhnasrup 4 2 8 dukhwamaetktanglasud 4 2 9 bngkhblaphkrxnkarisskhriptphuich aekikhodyihisokhdcawaskhriptthitxngkarthihna phuich chuxphuich skin js odyepliyn chuxphuich epnchuxphuichkhxngkhunexng aela skin epnskinthikhuntxngkarichskhript echn vector hrux monobook skinpriyaykhxngwikiphiediykhux vector twxyangkhwamsamarthephimemnudanbn aekikhtwxyangkhwamsamarththiniymkhux karephimemnudanbn ehmuxndngrupaesdng hruxxaccaephimdansaymux withiichodykarnafngkchnkhxngcawaskhript ipisiwinhnaphuich twxyangkarichnganskhriptphuichtwxyangskhript cakphuichngankhnxun aekikhwikiphiediy skhriptcdih wikiphiediy skhriptaemw phuich AkiAkira monobook js phuich Manop monobook js phuich Posterweb monobook js phuich Panyatham vector jsskhript thinaipichid aekikhskhriptcaaebngepn 2 aebb khux skhriptekhruxngmux kbskhriptechphaathang odykarichngankhxngskhriptechphaathangxac caepn thicatxngich skhript ekhruxngmuxtwidtwhnung inkarchwyaesdngphl odywithikarnaipich samartheluxkskhriptthitxngkaripisiwinhnaskhript khxngtwexngtamkhwamehmaasm sahrbskhript ekhruxngmux samarthiskhrngediyw aelasamartheriykichidmakkwahnungkhrngsakhy thukkhrngthimikarepliynaeplnghnacawaskhriptkhxngkhun ihthakar Refresh hnannhlngcakbnthukephuxehnkarepliynaeplng khntxnkar Refresh in IE kd Ctrl F5 in Mozilla Safari Konqueror kd Shift khang aelwkd Reload hrux Ctrl Shift R in Opera kd F5skhriptekhruxngmux aekikh ephimaethbdanbn aekikh skhripttwnixacichimidaelw enuxngcaksxftaewrmiediywikimikarxphedtmahlayrunfunction addTab url name id title key var tabs document getElementById p cactions getElementsByTagName ul 0 addlilink tabs url name id title key ephimemnu ekhruxngmux dansay aekikh skhripttwnixacichimidaelw enuxngcaksxftaewrmiediywikimikarxphedtmahlayrunfunction addlilink tabs url name id title key var na document createElement a na href url na appendChild document createTextNode name var li document createElement li if id li id id li appendChild na tabs appendChild li na accesskey key var pref alt if clientPC indexOf AppleWebKit 1 amp amp clientPC indexOf spoofer 1 navigator userAgent toLowerCase indexOf mac 1 pref control if clientPC indexOf opera 1 pref shift esc if key amp amp title na title title pref key else if title na title title else if key na title pref key return li xanchuxkhxnghnann aekikh var articleTitle mw config get wgPageName skhriptechphaathang aekikh iskhxkhwamtxngkarkhwamchwyehlux aekikh skhripttwniichimidaelw enuxngcaksxftaewrmiediywikimikarxphedtmahlayruniskhxkhwamtxngkarkhwamchwyehlux thiswnbnkhxngbthkhwam aelathakaresfbthkhwamthnthi Quick Wikify function doQwikify document editform wpTextbox1 value chwyduhnxy n n document editform wpTextbox1 value document editform wpSummary value chwyduhnxy document editform wpMinoredit checked true document editform submit function addQwikify addTab javascript doQwikify chwy ca wikify aecngwachwyduhnxy akeytt if document title indexOf aekikh 0 if window addEventListener window addEventListener load addQwikify false else if window attachEvent window attachEvent onload addQwikify aecngokhsna aekikh isklxngkhxkhwamaecngokhsna thiswnbnkhxngbthkhwam aelathakaresfbthkhwamthnthi aecngokhsna addOnloadHook function check if called from deletion request if document getElementById ca nstab special return if document title indexOf aekikh 1 if document URL lastIndexOf amp fakeaction advert 1 return document editform wpTextbox1 value okhsna n n document editform wpTextbox1 value document editform wpSummary value aecngokhsna document editform submit return addTab javascript doAdvert aecngokhsna ca advert khasngaecngokhsna function doAdvert edit page var title document title substr 0 document title lastIndexOf wikiphiediy location assign w index php title title amp action edit amp fakeaction advert aecnglb aekikh isklxngkhxkhwamaecnglb thiswnbnkhxngbthkhwam aelathakaresfbthkhwamthnthi aecnglb addOnloadHook function check if called from deletion request if document getElementById ca nstab special return if document title indexOf aekikh 1 if document URL lastIndexOf amp fakeaction speedydel 1 return document editform wpTextbox1 value lb n n document editform wpTextbox1 value document editform wpSummary value aecnglb document editform submit return addTab javascript doQsd aecnglb ca sd khasngaecnglb function doQsd edit page var title document title substr 0 document title lastIndexOf wikiphiediy location assign w index php title title amp action edit amp fakeaction speedydel aecnglaemidlikhsiththi aekikh skhripttwniichimidaelw enuxngcaksxftaewrmiediywikimikarxphedtmahlayrunisklxngkhxkhwamaecnglaemidlikhsiththiphrxmetimwnthiinewlaithyihodyxtonmti thiswnbnkhxngbthkhwam aecnglaemidlikhsiththi runisewlaithy function doCopyViolation var currentDay new Date var thaiDate new Date currentDay getTime 25200000 7 1000 60 60 var month thaiDate getUTCMonth 1 var year thaiDate getUTCFullYear 543 document editform wpTextbox1 value laemidlikhsiththi url wnthi thaiDate getUTCDate month year hmayehtu document editform wpSummary value aecnglaemidlikhsiththi function addCopyViolation addTab javascript doCopyViolation laemid ca vio aecnglaemidlikhsiththi akeytt if document title indexOf aekikh 0 if window addEventListener window addEventListener load addCopyViolation false else if window attachEvent window attachEvent onload addCopyViolation ekbkwadnoybayeka aekikh ekbkwadnoybayeka skhriptni epliynkhasngeka echn Category Image aelakhxkhwameka function doCleanupTag text document editform wpTextbox1 value text replace text Category hmwdhmu text replace text category hmwdhmu text replace text Image phaph text replace text image phaph text replace text aehlngxangxing xangxing text replace text hnngsuxxangxing xangxing text replace text exksarxangxing xangxing text replace text aehlngkhxmulxangxing xangxing text replace text hwkhxxunthiekiywkhxng duephim text replace text duephimthi duephim text replace text ewbistxun aehlngkhxmulxun text replace text ewbistphaynxk aehlngkhxmulxun text replace text oyngphaynxk aehlngkhxmulxun text replace text lingkphaynxk aehlngkhxmulxun text replace text lingkhphaynxk aehlngkhxmulxun text replace text Link phaynxk aehlngkhxmulxun text replace text khxmulphaynxk aehlngkhxmulxun text replace text document editform wpTextbox1 value text document editform wpSummary value aekikh ekbkwad function addCleanupTag addTab javascript doCleanupTag ekbkwad ca taclt ekbkwad if document title indexOf aekikh 0 if window addEventListener window addEventListener load addCleanupTag false else if window attachEvent window attachEvent onload addCleanupTag slbepliynrahwangtwelkhxarbikkbelkhithy aekikh skhripttwniichimidaelw enuxngcaksxftaewrmiediywikimikarxphedtmahlayrun Replace string Javascript from http www irt org script 242 htm function replace string text by Replaces text with by in string var strLength string length txtLength text length if strLength 0 txtLength 0 return string var i string indexOf text if i amp amp text string substring 0 txtLength return string if i 1 return string var newstr string substring 0 i by if i txtLength lt strLength newstr replace string substring i txtLength strLength text by return newstr Thai to Arabic Numbers This script converts all Thai numbers 1 2 3 to Arabic numbers 1 2 3 function doConvertNumber text document editform wpTextbox1 value text replace text 1 1 text replace text 2 2 text replace text 3 3 text replace text 4 4 text replace text 5 5 text replace text 6 6 text replace text 7 7 text replace text 8 8 text replace text 9 9 text replace text 0 0 document editform wpTextbox1 value text document editform wpSummary value epliynelkhithyepnxarbik function addConvertNumber addTab javascript doConvertNumber 2 gt 2 ca tanum epliynelkhithyepnxarbik akeytt if document title indexOf aekikh 0 if window addEventListener window addEventListener load addConvertNumber false else if window attachEvent window attachEvent onload addConvertNumber Arabic to Thai Numbers This script converts all Arabic numbers 1 2 3 to Thai numbers 1 2 3 function doConvertToThaiNumber text document editform wpTextbox1 value text replace text 1 1 text replace text 2 2 text replace text 3 3 text replace text 4 4 text replace text 5 5 text replace text 6 6 text replace text 7 7 text replace text 8 8 text replace text 9 9 text replace text 0 0 document editform wpTextbox1 value text document editform wpSummary value epliynelkhxarbikepnithy function addConvertToThaiNumber addTab javascript doConvertToThaiNumber 2 gt 2 ca atnum epliynelkhxarbikepnithy akeytt if document title indexOf aekikh 0 if window addEventListener window addEventListener load addConvertToThaiNumber false else if window attachEvent window attachEvent onload addConvertToThaiNumber aekyxhnaaerksud yxhnasrup aekikh skhripttwnixacichimidaelw enuxngcaksxftaewrmiediywikimikarxphedtmahlayrun Edit Section 0 function addEditSection0 ta ca edit 0 Edit the zeroth section of this page if document getElementById return x document getElementById ca edit if x return y document createElement LI y id ca edit 0 if x className selected if amp action edit amp section 0 test window location href x className istalk y className selected else x className selected istalk else if x className selected istalk if amp action edit amp section 0 test window location href x className istalk y className selected istalk else y className istalk else y className x className x className istalk z document createElement A if x children z href x children 0 href amp section 0 z appendChild document createTextNode 0 y appendChild z document getElementById p cactions children 1 insertBefore y x nextSibling else z href x childNodes 0 href amp section 0 z appendChild document createTextNode 0 y appendChild z document getElementById p cactions childNodes 3 insertBefore y x nextSibling if document title indexOf Editing 1 if window addEventListener window addEventListener load addEditSection0 false else if window attachEvent window attachEvent onload addEditSection0 dukhwamaetktanglasud aekikh skhripttwnixacichimidaelw enuxngcaksxftaewrmiediywikimikarxphedtmahlayrun dukhwamaetktanglasud Last diff var articleTitle mw config get wgPageName function doLastDiff var nurl http th wikipedia org w index php title articleTitle amp diff cur amp oldid prev document location nurl function addLastDiff var tabs document getElementById p cactions getElementsByTagName ul 0 var l addlilink tabs javascript doLastDiff lasud l lastChild title dukhwamaetktanglasud if document title indexOf aekikh 1 if wgCanonicalNamespace indexOf Special 1 if window addEventListener window addEventListener load addLastDiff false else if window attachEvent window attachEvent onload addLastDiff bngkhblaphkrxn aekikh duhnahlkthi wikiphiediy skhriptphuich skhript bngkhblaphkrxncakwikiphiediy ekhathungcak https th wikipedia org w index php title wikiphiediy skhriptphuich amp oldid 9391097, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,

บทความ

, อ่าน, ดาวน์โหลด, ฟรี, ดาวน์โหลดฟรี, mp3, วิดีโอ, mp4, 3gp, jpg, jpeg, gif, png, รูปภาพ, เพลง, เพลง, หนัง, หนังสือ, เกม, เกม