Module:RSI

Revision as of 06:56, 28 January 2023 by Nomad (talk | contribs) (Created page with "-- Optionally add "https://robertsspaceindustries.com/" to url if it is not present. local p = {} function p.rsi_url(frame) local base_url = "https://robertsspaceindustries.com/" local support_url = "https://support.robertsspaceindustries.com/" local url = frame.args[1] local return_val if (string.sub(url,1,string.len(base_url))==base_url) or (string.sub(url,1,string.len(support_url))==support_url) then return_val = url else return_val = base_url .....")
Module documentation[view][edit][history][purge]
This documentation is transcluded from Module:RSI/doc. Changes can be proposed in the talk page.
Function list
L 3 — p.rsi_url

Module:RSI optionally adds "https://robertsspaceindustries.com/" to url if it is not present.


-- Optionally add "https://robertsspaceindustries.com/" to url if it is not present. 
local p = {}
function p.rsi_url(frame)
  local base_url = "https://robertsspaceindustries.com/"
  local support_url = "https://support.robertsspaceindustries.com/"
  local url = frame.args[1]
  local return_val
  if (string.sub(url,1,string.len(base_url))==base_url) or (string.sub(url,1,string.len(support_url))==support_url) then
    return_val = url
  else
    return_val = base_url .. url
  end
  return return_val
end
return p