Sync.
This commit is contained in:
@@ -1,26 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Tone3000 Download Received</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
// Parse URL parameters
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const toneUrl = urlParams.get('tone_url');
|
||||
|
||||
// Send the data back to the opener window
|
||||
if (window.opener) {
|
||||
window.opener.postMessage({
|
||||
type: 'tone3000Download',
|
||||
toneUrl: toneUrl
|
||||
}, '*');
|
||||
}
|
||||
|
||||
// Close the window after sending the data
|
||||
var popupWindow = null;;
|
||||
try {
|
||||
// Send the data back to the opener window
|
||||
if (window.opener) {
|
||||
popupWindow =
|
||||
window.opener.postMessage({
|
||||
type: 'tone3000Download',
|
||||
toneUrl: toneUrl,
|
||||
popupX: window.screenX,
|
||||
popupY: window.screenY,
|
||||
popupWidth: window.innerWidth,
|
||||
popupHeight: window.innerHeight
|
||||
}, '*');
|
||||
} else {
|
||||
alert("No opener window found.");
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
// Close the window after sending the data
|
||||
alert(e.message);
|
||||
}
|
||||
window.close();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user