Jump to content

Module:Freeze/same page link

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by PleaseStand (talk | contribs) at 13:34, 6 February 2024 (fix silly mistake). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = {}

function p._main(page, offset, text)
	local query = string.format('action=history&offset=%s&limit=2', offset)
	local url = tostring(mw.uri.fullUrl(page, query))
	return string.format('<span class="plainlinks">[%s %s]</span>', url, text)
end

function p.main(frame)
	return p._main(frame:getParent():getTitle(), frame.args[1], frame.args[2])
end

return p