ผู้ใช้:Jutiphan/Scripts/inlineInterLink/monobook.js
จากวิกิพีเดีย สารานุกรมเสรี
หมายเหตุ: หลังจากบันทึกแล้ว, คุณต้องล้างแคชของเบราว์เซอร์เสียก่อน จึงจะเห็นการเปลี่ยนแปลง: Mozilla/Safari/Konqueror: กด Shift ค้าง แล้วกด Reload (หรือ Ctrl-Shift-R), IE: กด Ctrl-F5, Opera: กด F5
/* <pre><nowiki> */ // ========== ลิงก์ข้าม ========== addOnloadHook(function() { //Add tab if it is an article if(wgIsArticle) { addTab("javascript:doInterLink()", "แจ้งลิงก์ข้าม", "ca-interLink", "แจ้งมีลิงก์ข้ามไปภาษาอื่นในเนื้อหา", ""); } if (document.title.indexOf("แก้ไข") != -1) { if (document.URL.lastIndexOf("&fakeaction=interLink") == -1) return; if(document.editfrom.wpTextbox1.value.indexOf("{{ลิงก์ไปภาษาอื่น}}") != -1) { alert("บทความนี้ได้รับแจ้งลิงก์ข้ามไปภาษาอื่นเรียบร้อยแล้ว"); return; } document.editform.wpTextbox1.value = "{{ลิงก์ไปภาษาอื่น}}\n\n" + document.editform.wpTextbox1.value; document.editform.wpSummary.value = "แจ้งลิงก์ข้ามภาษาในเนื้อหาด้วย[[ผู้ใช้:Jutiphan/Scripts|สคริปต์จัดให้]]"; document.editform.submit(); return; } }); function doInterLink() { //edit page var title = document.title.substr(0, document.title.lastIndexOf(' - วิกิพีเดีย')); location.assign("/w/index.php?title=" + title + "&action=edit&fakeaction=interLink"); } /* </nowiki></pre> */