Module:Edit button

Revision as of 15:07, 22 March 2024 by Gau Cho (talk | contribs) (First module, ported from RSC/OS/RS3)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Module documentation
This documentation is transcluded from Module:Edit button/doc. [edit] [history] [purge]
This module does not have any documentation. Please consider adding documentation at Module:Edit button/doc. [edit]
Module:Edit button is required by Module:Infobox.
Module:Edit button is required by Module:Infobox Recipe.

-- Creates a link that opens the editor screen for whatever page this module is invoked on

return function(text)
	local page_title = mw.title.getCurrentTitle().fullText
	local url = tostring(mw.uri.fullUrl(page_title,'action=edit'))
	return '['..url..' '..(text or 'edit')..']'
end