<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mindpowe.red/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AEditAtWikidata</id>
	<title>Module:EditAtWikidata - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mindpowe.red/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AEditAtWikidata"/>
	<link rel="alternate" type="text/html" href="https://mindpowe.red/wiki/index.php?title=Module:EditAtWikidata&amp;action=history"/>
	<updated>2026-04-06T06:36:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://mindpowe.red/wiki/index.php?title=Module:EditAtWikidata&amp;diff=1475&amp;oldid=prev</id>
		<title>imported&gt;WOSlinker: copy over nbsp option from sandbox</title>
		<link rel="alternate" type="text/html" href="https://mindpowe.red/wiki/index.php?title=Module:EditAtWikidata&amp;diff=1475&amp;oldid=prev"/>
		<updated>2019-09-11T18:11:45Z</updated>

		<summary type="html">&lt;p&gt;copy over nbsp option from sandbox&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Module to display an icon with a tooltip such as &amp;quot;Edit this at Wikidata&amp;quot;.&lt;br /&gt;
-- Icon will be linked to the Wikidata entry for the article where this is placed.&lt;br /&gt;
-- This message is only displayed if a local_parameter is not supplied&lt;br /&gt;
-- i.e. when called from a template, it can be coded not to display the message&lt;br /&gt;
-- when a local parameter is in use, preventing the value form Wikidata being fetched.&lt;br /&gt;
-- The qid of a Wikidata entry can optionally be supplied for testing outside the article.&lt;br /&gt;
-- Usage:&lt;br /&gt;
-- {{#invoke:EditAtWikidata|showMessage|local_parameter}}&lt;br /&gt;
-- {{#invoke:EditAtWikidata|showMessage|qid=&amp;lt;ArticleID&amp;gt;|local_parameter}}&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local i18n =&lt;br /&gt;
{&lt;br /&gt;
	[&amp;quot;message&amp;quot;] = &amp;quot;Edit this at Wikidata&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
p.showMessage = function(frame)&lt;br /&gt;
	-- There may be a local parameter supplied, if it's blank, set it to nil&lt;br /&gt;
	local local_parm =  mw.text.trim(frame.args[1] or &amp;quot;&amp;quot;)&lt;br /&gt;
	if local_parm and (local_parm == &amp;quot;&amp;quot;) then local_parm = nil end&lt;br /&gt;
&lt;br /&gt;
	-- If there is a local parameter used, we don't want to display the message&lt;br /&gt;
	if local_parm then return nil end&lt;br /&gt;
&lt;br /&gt;
	-- Can take a named parameter |qid which is the Wikidata ID for the article.&lt;br /&gt;
	-- This will not normally be used except for testing outside the article.&lt;br /&gt;
	local qid = frame.args.qid&lt;br /&gt;
	if qid and (qid == &amp;quot;&amp;quot;) then qid = nil end&lt;br /&gt;
&lt;br /&gt;
	-- The module can take a parameter pid=&lt;br /&gt;
	-- which will create a link to that property in the Wikidata entry for the article&lt;br /&gt;
	local propertyID = mw.text.trim(frame.args.pid or &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	-- Get the object containing all the claims for the article&lt;br /&gt;
	local entity = mw.wikibase.getEntityObject(qid)&lt;br /&gt;
	if entity then&lt;br /&gt;
		local thisQid&lt;br /&gt;
		if qid then thisQid = qid else thisQid = entity.id end&lt;br /&gt;
&lt;br /&gt;
		-- Named parameter nbsp allows replacing the leading space with &amp;amp;nbsp;&lt;br /&gt;
		local space&lt;br /&gt;
		if frame.args.nbsp and (frame.args.nbsp ~= &amp;quot;&amp;quot;) then&lt;br /&gt;
			space = &amp;quot;&amp;amp;nbsp;&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			space = &amp;quot; &amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		return&lt;br /&gt;
			space .. &amp;quot;[[File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=&amp;quot; ..&lt;br /&gt;
			i18n.message ..&lt;br /&gt;
			&amp;quot; |link=https://www.wikidata.org/wiki/&amp;quot; ..&lt;br /&gt;
			thisQid ..&lt;br /&gt;
			(propertyID == &amp;quot;&amp;quot; and &amp;quot;&amp;quot; or (&amp;quot;#&amp;quot; .. propertyID)) ..&lt;br /&gt;
			&amp;quot;|&amp;quot; .. i18n.message .. &amp;quot;]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;WOSlinker</name></author>
		
	</entry>
</feed>