-- This module implements {{policy shortcut}}.-- Set constantslocalcfg=require('Module:Shortcut/config')cfg['shortcut-heading']='[[วิกิพีเดีย:เว็บย่อ|เว็บย่อนโยบาย {{PLURAL:$1|}}]]'-- Load required moduleslocalmShortcut=require('Module:Shortcut')localp={}functionp.main(frame)localargs=require('Module:Arguments').getArgs(frame,{wrappers='แม่แบบ:เว็บย่อนโยบาย'})-- Separate shortcuts from optionslocalshortcuts,options={},{}fork,vinpairs(args)doiftype(k)=='number'thenshortcuts[k]=velseoptions[k]=vendend-- Compress the shortcut array, which may contain nils.localfunctioncompressArray(t)localnums,ret={},{}forkinpairs(t)donums[#nums+1]=kendtable.sort(nums)fori,numinipairs(nums)doret[i]=t[num]endreturnretendshortcuts=compressArray(shortcuts)returnmShortcut._main(shortcuts,options,frame,cfg)endreturnp
กุมภาพันธ์ 18, 2022
มอด, shortcut, policy, อการใช, งานมอด, สร, าง, ณอาจจะต, องการสร, างค, อการใช, งานของมอด, ลน, เข, ยนสามารถทำการทดลองได, กระบะทราย, สร, าง, ดลอก, และช, ดทดสอบ, สร, าง, ของมอด, ลน, โปรดเพ, มหมวดหม, ไปท, หน, าย, อย, หน, าย, อยของมอด, ลน, this, module, implements, . khumuxkarichnganmxdul srang khunxaccatxngkarsrangkhumuxkarichngankhxngmxdulniphuekhiynsamarththakarthdlxngidthikrabathray srang khdlxk aelachudthdsxb srang khxngmxdulnioprdephimhmwdhmuipthihnayxy doc hnayxykhxngmxdulni This module implements policy shortcut Set constants local cfg require Module Shortcut config cfg shortcut heading wikiphiediy ewbyx ewbyxnoybay PLURAL 1 Load required modules local mShortcut require Module Shortcut local p function p main frame local args require Module Arguments getArgs frame wrappers aemaebb ewbyxnoybay Separate shortcuts from options local shortcuts options for k v in pairs args do if type k number then shortcuts k v else options k v end end Compress the shortcut array which may contain nils local function compressArray t local nums ret for k in pairs t do nums nums 1 k end table sort nums for i num in ipairs nums do ret i t num end return ret end shortcuts compressArray shortcuts return mShortcut main shortcuts options frame cfg end return p ekhathungcak https th wikipedia org w index php title mxdul Shortcut policy amp oldid 8220272, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,