Jump to content

Module:MediaWiki:Talkpageheader

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Awesome Aasim (talk | contribs) at 02:02, 25 March 2023 (Created page with 'local p = {} local isIP = require('Module:IPAddress')._isIP p.main = function(frame) local args = require('Module:Arguments').getArgs(frame) local tptext = '' local pageTitle = mw.title.getCurrentTitle() local out = '' local text = frame:preprocess('{{:' .. pageTitle.fullText .. '}}') if not mw.ustring.find(text, '<table role="presentation" class="tmbox tmbox-notice talkheader plainlinks" id="talkheader" style="border-collapse: separate;">') then ou...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local p = {}
local isIP = require('Module:IPAddress')._isIP
p.main = function(frame)
	local args = require('Module:Arguments').getArgs(frame)
	local tptext = ''
	local pageTitle = mw.title.getCurrentTitle()
	local out = ''
	local text = frame:preprocess('{{:' .. pageTitle.fullText .. '}}')
	if not mw.ustring.find(text, '<table role="presentation" class="tmbox tmbox-notice talkheader plainlinks" id="talkheader" style="border-collapse: separate;">') then
		out = out .. '{{Talk header}}\n'
	end
	if not mw.ustring.find(text, '<span class="sharedIP">') and isIP(pageTitle.baseText) then
		out = out .. '{{Shared IP}}\n'
	end
	return frame:preprocess(out)
end
return p