Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
AiGptCode authored May 19, 2024
1 parent d49b9e0 commit a7ae462
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,15 @@ <h4 class="alert-heading dns">DNS:</h4>
// Create a Blob object from the configuration plist string
const configBlob = new Blob([configPlist], { type: 'application/xml' });

// Create a download link and click it to download the file
const downloadLink = document.createElement('a');
downloadLink.href = URL.createObjectURL(configBlob);
downloadLink.download = 'config.mobileconfig';
downloadLink.click();
// Create an object URL for the Blob
const configUrl = URL.createObjectURL(configBlob);

// Open a new window or tab with the configuration file
window.open(configUrl, '_blank');

// Wait for the download to complete before revoking the object URL
setTimeout(() => {
URL.revokeObjectURL(downloadLink.href);
URL.revokeObjectURL(configUrl);
}, 1000);
}

Expand Down

0 comments on commit a7ae462

Please sign in to comment.