My plugin needs to be able to generate an absolute URL to form a base for loading static images included with the plugin. At the moment, my code parses (window.location.pathname) to detect Friendly URLs by the presence of "/r/" in it.
I'm not sure that I can rule out the possibility that someone, somewhere, has a webserver that has /r/ somewhere in its path even though it is using legacy URLs.
Is this the best way to detect this? Should my plugin instead query apex_applications.friendly_url to determine this?