- Electron version: 0.37.6
- Operating system: OS X

As of https://github.com/electron/electron/issues/2687, unknown schemes are automatically opened in an external app. There appears to be no way to prevent this behavior or prompt the user for permission before the external app is opened.

One way to solve this would be to allow wildcards in `protocol.registerXXXProtocol`; then the Electron app can do whatever checks it wants before calling `shell.openExternal` on the URL.

atom/common/native_mate_converters/content_converter.cc
v8::Isolate* isolate,
    v8::Local<v8::Value> val,
    content::StopFindAction* out) {
  std::string action;
  if (!ConvertFromV8(isolate, val, &action))
    return false;
  if (action == "clearSelection")
    *out = content::STOP_FIND_ACTION_CLEAR_SELECTION;
  else if (action == "keepSelection")
    *out = content::STOP_FIND_ACTION_KEEP_SELECTION;
  else if (action == "activateSelection")
    *out = content::STOP_FIND_ACTION_ACTIVATE_SELECTION;
  else
    return false;
  return true;
}
v8::Local<v8::Value> Converter<content::WebContents*>::ToV8(
    v8::Isolate* isolate, content::WebContents* val) {
  if (!val)
    return v8::Null(isolate);
  return atom::api::WebContents::CreateFrom(isolate, val).ToV8();
}
}