Дополнительные действия
DarkMuse (обсуждение | вклад) Новая страница: «local ApiDoc = {} --- Checks if the current page is a documentation page. --- A documentation page is identified by having "/doc" in its title. --- @return boolean True if the current page is a documentation page, otherwise false. function ApiDoc.isDocPage() local pagename = mw.title.getCurrentTitle().text return string.find(pagename, '/doc') end return ApiDoc» |
(нет различий)
|
Текущая версия от 15:47, 31 августа 2024
Utility for {{ApiDoc}}
API[править код]
-
Программное имя: ApiDoc
Returns true if the current page is a documentation page, identified by having "/doc" in its title.
Посмотрите всю нашу документацию iCCup здесь.
local ApiDoc = {}
--- Checks if the current page is a documentation page.
--- A documentation page is identified by having "/doc" in its title.
--- @return boolean True if the current page is a documentation page, otherwise false.
function ApiDoc.isDocPage()
local pagename = mw.title.getCurrentTitle().text
return string.find(pagename, '/doc')
end
return ApiDoc