You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Module:Editnotice-host-stub

From Wikitech-static
Jump to navigation Jump to search

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:expandTemplate{ title = 'Stub-links' } .. '</div>'
		end
    end
}