Jump to content

Module:Editnotice-host-stub

From Wikitech

Documentation for this module may be created at Module:Editnotice-host-stub/doc (Test casesTest results)

return {
	render = function (frame)
		local title = mw.title.getCurrentTitle()
		if (
			title
			and title.namespace == 0
			and not title.isSubpage
			and title.id == 0
			and (
				mw.ustring.sub( title.text, -4 ) == ".org"
				or mw.ustring.match( title.text, "[0-9][0-9]$" )
			)
		) then
			return '<div class="mw-message-box">' .. frame:preprocess( '<strong>Related pages:</strong>{{Special:WhatLinksHere/{{FULLPAGENAME}}}}' ) .. '</div>'
		end
    end
}