drawio/war/dropbox.html
Gaudenz Alder 5798efc85f 6.2.3 release
Former-commit-id: 3dc20ef7b4
2017-02-28 16:40:36 +01:00

37 lines
685 B
HTML

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script>
if (window.opener != null && window.opener.onDropboxCallback != null)
{
try
{
var hash = window.location.hash;
var i1 = hash.indexOf('access_token=');
var token = null;
if (i1 >= 0)
{
var i2 = hash.indexOf('&', i1 + 13);
if (i2 > i1)
{
token = hash.substring(i1 + 13, i2);
}
}
// Continues execution of main program flow
window.opener.onDropboxCallback(token, window);
}
catch (e)
{
alert('Dropbox: ' + e.toString());
window.close();
}
}
</script>
</body>
</html>