2021-10-20 15:35:46 -04:00
|
|
|
function Link(el)
|
2023-01-07 11:02:38 -05:00
|
|
|
el.target = string.gsub(el.target, "file:///bin/.*", "/cant-run-application.html")
|
|
|
|
el.target = string.gsub(el.target, "help://man/([^/]*)/(.*)", "/man%1/%2.html")
|
2021-10-20 15:35:46 -04:00
|
|
|
return el
|
|
|
|
end
|
2022-01-17 04:43:28 -05:00
|
|
|
|
|
|
|
function Image(el)
|
2023-01-07 11:02:38 -05:00
|
|
|
-- Images that are not icons are always copied to the website root.
|
2022-05-28 19:52:58 -04:00
|
|
|
if el.src:find("^/res/icons/") == nil then
|
2023-01-07 11:02:38 -05:00
|
|
|
el.src = "/" .. el.src
|
2022-05-28 19:52:58 -04:00
|
|
|
return el
|
|
|
|
end
|
|
|
|
|
2022-01-17 04:43:28 -05:00
|
|
|
local pattern = "/res/icons/(.*)"
|
|
|
|
local image = string.gsub(el.src, pattern, "%1")
|
|
|
|
|
2023-01-07 11:02:38 -05:00
|
|
|
el.src = "/icons/" .. image
|
2022-01-17 04:43:28 -05:00
|
|
|
file = io.open("icons.txt", "a+")
|
|
|
|
file:write(image .. "\n")
|
|
|
|
file:close()
|
|
|
|
return el
|
|
|
|
end
|