Module:EditAtWikidata: Difference between revisions
update from Module:EditAtWikidata/sandbox per talk: tweaks + greatly reduce memory usage + class=noprint |
EnWikiAdmin (talk | contribs) No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 27: | Line 27: | ||
-- Parameter qid=x specifies the Wikidata ID for the article. | -- Parameter qid=x specifies the Wikidata ID for the article. | ||
-- This is not normally used except for testing outside the article. | -- This is not normally used except for testing outside the article. | ||
local qid = trimToNil(args.qid) or mw.wikibase.getEntityIdForCurrentPage() | local qid = trimToNil(args.qid) -- or mw.wikibase.getEntityIdForCurrentPage() | ||
if qid and mw.wikibase.entityExists(qid) then | if qid then -- and mw.wikibase.entityExists(qid) then | ||
-- Parameter pid=x uses x as an anchor in the link to the Wikidata entry. | -- Parameter pid=x uses x as an anchor in the link to the Wikidata entry. | ||
local anchor = trimToNil(args.pid) | local anchor = trimToNil(args.pid) |