localp={}localfunctionremoveFalsePositives(str)ifnotstrthenreturn''endstr=mw.ustring.gsub(str,"<!--.--->","")str=mw.ustring.gsub(str,"<nowiki>.-</nowiki>","")str=mw.ustring.gsub(str,"草稿分类-}}","")str=mw.ustring.gsub(str,"%[%[Category:使用创建条目精灵建立的页面%]%]","")str=mw.ustring.gsub(str,"%[%[Category:不合适的草稿%]%]","")str=mw.ustring.gsub(str,"%[%[Category:有关.的草稿-%]%]","")returnstrendfunctionp.checkforcats(frame)localt=mw.title.getCurrentTitle()tc=t:getContent()iftc==nilthenreturn""endtc=removeFalsePositives(tc)ifmw.ustring.match(tc,"%[%[%s-[Cc]ategory:")==nilthenreturn""elsereturn"[[Category:有分类的草稿]]"endendfunctionp.submitted(frame)ifmw.ustring.find(removeFalsePositives(mw.title.getCurrentTitle():getContent()),'{{AFC submission||',1,true)thenreturnframe.args[1]elsereturnframe.args[2]endendreturnp