export function getDomain ( url ) { return url . replace ( 'http://' , '' ) . replace ( 'https://' , '' ) . split ( '/' ) [ 0 ] ; } export function isExternal ( url ) { return getDomain ( document . location . href ) !== getDomain ( url ) ; }