Module:Librivox book: Difference between revisions

Content deleted Content added
No edit summary
update image display for dark mode per TPER
 
(7 intermediate revisions by 5 users not shown)
Line 1:
local p = {}
 
function p.book(frame)
 
 
local pframe = frame:getParent()
Line 28 ⟶ 27:
title = mw.title.getCurrentTitle().text
end
dtitle = mw.ustring.gsub(title,'%s+%([^%(]-%)$', '') -- Remove the final disambig paren
stitle = dtitle
 
if trimArg(args.stitle) then
stitle = trimArg(args.stitle)
if not trimArg(args.title) then -- For when used outside main article space
dtitle = stitle
end
Line 54 ⟶ 53:
end
 
local url = "[[ImageFile:Speaker Icon.svg|20px15px|class=skin-invert-image|link=|alt=]] " .. "[" .. urlhead .. "title=" .. stitle .. "&author=" .. lname .. "&reader=&keywords=&genre_id=0&status=all&project_type=either&recorded_language=&sort_order=catalog_date&search_page=1&search_form=advanced" .. " " .. italic .. dtitle .. italic .. "]" .. " " .. tagline
 
return url