Jump to content
MediaWiki

Module:HookCategories

From mediawiki.org
Module documentation
You might want to create a documentation page for this Scribunto module.
Editors can experiment in this module’s sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this module.
 localp={}
 functionp.cat(frame)
 localextension=frame.args.extension
 ifextension==""then
 localskin=frame.args.skin
 ifskin==""then
 localtitleObj=mw.title.new("Manual:Hooks/"..frame.args[1])
 iftitleObj.existsthen
 iftitleObj:getContent():find("removed *= *1.",1,false)then
 ifframe.args.backcompat~=""then
 return"[[Category:Extensions using removed hooks (back-compat only)]]"
 end
 return"[[Category:Extensions using removed hooks"..frame:preprocess("{{#translation:}}").."]]"
 elseiftitleObj:getContent():find("deprecated *= *1.",1,false)then
 return"[[Category:Extensions using deprecated hooks"..frame:preprocess("{{#translation:}}").."]]"
 end
 else
 return"[[Category:Extensions using redlinked hooks"..frame:preprocess("{{#translation:}}").."]]"
 end
 else
 localtitleObj=mw.title.new("Skin:"..skin)
 ifnottitleObj.existsthen
 return"[[Category:Extensions using hooks from redlinked sources"..frame:preprocess("{{#translation:}}").."]]"
 end
 end
 else
 localtitleObj=mw.title.new("Extension:"..extension)
 ifnottitleObj.existsthen
 return"[[Category:Extensions using hooks from redlinked sources"..frame:preprocess("{{#translation:}}").."]]"
 end
 end
 end
 returnp

AltStyle によって変換されたページ (->オリジナル) /