Module:LatestEditedPage: Difference between revisions
Jump to navigation
Jump to search
Module |
mNo edit summary |
||
| Line 6: | Line 6: | ||
-- extract the first link from the RecentChanges output | -- extract the first link from the RecentChanges output | ||
local title = rc:match('%[%[( | local title = rc:match('%[%[([^|%]]+)') | ||
if not title then | if not title then | ||
return 'No recent edits' | return 'No recent edits' | ||
Revision as of 23:34, 9 March 2026
local p = {}
function p.main()
local frame = mw.getCurrentFrame()
local rc = frame:expandTemplate{ title = 'Special:RecentChanges', args = { '1' } }
-- extract the first link from the RecentChanges output
local title = rc:match('%[%[([^|%]]+)')
if not title then
return 'No recent edits'
end
return string.format('Latest Edited Page', title)
end
return p