Skip to content

Instantly share code, notes, and snippets.

@develar
Created October 8, 2014 10:25
Show Gist options
  • Save develar/b118c57640b20eb51c43 to your computer and use it in GitHub Desktop.
Save develar/b118c57640b20eb51c43 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script>
var request = new XMLHttpRequest();
// todo find effective port, ask user to select desired IDE if running several IntelliJ platform-based products
request.open("get", "http://localhost:63342/browserConnection/buildInfo");
request.send();
request.onload = function () {
if (request.status === 200 || request.status === 0) {
document.getElementById("testInfo").value = request.responseText;
}
else {
throw new Error(request.responseText)
}
};
// actual openProjectSet implementation will close window (it works in any case in Google Chrome,
// and works if opened as result of "click link on some web page" in Firefox)
//window.close();
</script>
</head>
<body>
<textarea id="testInfo" style="width: 100%; height: 100%"></textarea>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment