Module:LCCN: Difference between revisions

Content deleted Content added
switch from "https://lccn.loc.gov/$1" to "https://www.loc.gov/item/$1" links and add tracking when no "id" provided for the strange case where "long=yes" resulting in "https://lccn.loc.gov/Name?$1" links at Special:WhatLinksHere/Module:LCCN/doc
better focus tracking
Line 53:
local left_part, right_part, url
if not id then
mw.title.new(frame:getTitle()):subPageTitle('doc'):getContent() --XXX: quick and dirty transclusion tracking
url = "https://lccn.loc.gov/Name?" .. mw.title.getCurrentTitle():partialUrl()
else
Line 64 ⟶ 63:
if args.long == "yes" then
if not id then
mw.title.new(frame:getTitle()):subPageTitle('doc'):getContent() --XXX: quick and dirty transclusion tracking
end
return ("Catalog record for [%s %s] at the United States [[LCCN (identifier)|Library of Congress]]"):format(
url, title or mw.title.getCurrentTitle().text)