code: function isCrossOriginURL(url) {
    var parts = url.match(REGEXP_ORIGINS);
  
    return parts && (parts[1] !== location.protocol || parts[2] !== location.hostname || parts[3] !== location.port);
  }
docs: Check if the given URL is a cross origin URL.
  @param {string} url - The target URL.
  @returns {boolean} Returns `true` if the given URL is a cross origin URL, else `false`.