2021-10-20 19:35:46 +00:00
|
|
|
function Link(el)
|
2023-01-07 16:02:38 +00: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 19:35:46 +00:00
|
|
|
return el
|
|
|
|
end
|
2022-01-17 09:43:28 +00:00
|
|
|
|
|
|
|
function Image(el)
|
2023-01-07 16:02:38 +00:00
|
|
|
-- Images that are not icons are always copied to the website root.
|
2022-05-28 23:52:58 +00:00
|
|
|
if el.src:find("^/res/icons/") == nil then
|
2023-01-07 16:02:38 +00:00
|
|
|
el.src = "/" .. el.src
|
2022-05-28 23:52:58 +00:00
|
|
|
return el
|
|
|
|
end
|
|
|
|
|
2022-01-17 09:43:28 +00:00
|
|
|
local pattern = "/res/icons/(.*)"
|
|
|
|
local image = string.gsub(el.src, pattern, "%1")
|
|
|
|
|
2023-01-07 16:02:38 +00:00
|
|
|
el.src = "/icons/" .. image
|
2022-01-17 09:43:28 +00:00
|
|
|
file = io.open("icons.txt", "a+")
|
|
|
|
file:write(image .. "\n")
|
|
|
|
file:close()
|
|
|
|
return el
|
|
|
|
end
|