code: function resolveProtocolRelativeURL (absolute, relative) {
    var protocol;
  
    if (absolute) {
      // Get the protocol from the absolute URL
      protocol = protocolPattern.exec(absolute)[0];
    }
    else {
      // Use the current page's protocol
      protocol = location.protocol;
    }
  
    return protocol + relative;
  }
docs: Resolves a protocol-relative URL, such as "//example.com/directory/file.json".
  
  @param {?string} absolute - The absolute URL to resolve against. Defaults to the current page URL.
  @param {string} relative - The relative URL to resolve
  @returns {string}