Get a files extension https://www.jstips.co/en/javascript/get-file-extension/ url - Usually the href of a link
Test whether a link is external
Test whether a URL matches a given domain
url - The URL to test
[domain=window.location.host] - The domain to match against. Defaults to the current host.
trueif the URL's domain matches the given domain,false` otherwise
Add attributes to links links - The links to process