drawio/war/dropbox.html

38 lines
685 B
HTML
Raw Normal View History

2016-09-06 14:07:11 +00:00
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
2017-02-22 13:12:09 +00:00
<script>
2017-02-28 15:40:36 +00:00
if (window.opener != null && window.opener.onDropboxCallback != null)
2017-02-22 13:12:09 +00:00
{
2017-02-28 15:40:36 +00:00
try
2017-02-22 13:12:09 +00:00
{
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);
}
2017-02-28 15:40:36 +00:00
catch (e)
{
alert('Dropbox: ' + e.toString());
window.close();
}
2017-02-22 13:12:09 +00:00
}
2016-09-06 14:07:11 +00:00
</script>
</body>
</html>