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 414e09b commit 1a9981b
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<!DOCTYPE html>
<html lang="en">
<head>
Expand Down Expand Up @@ -102,32 +101,32 @@ <h1>Configuration Profile Generator</h1>
"PayloadDisplayName": "Cellular and Network Settings",
"PayloadIdentifier": "com.example.cellular",
"PayloadOrganization": "Example Inc.",
"PayloadRemovalDisallowed": false,
"PayloadType": "Configuration",
"PayloadUUID": generateUniqueUUID(),
"PayloadVersion": 1
};
"PayloadRemovalDisallowed": false,
"PayloadType": "Configuration",
"PayloadUUID": generateUniqueUUID(),
"PayloadVersion": 1
};

// Convert the configuration dictionary to a plist string
const configPlist = plist.build(configDict);
// Convert the configuration dictionary to a plist string
const configPlist = plist.build(configDict);

// Create a Blob object from the configuration plist string
const configBlob = new Blob([configPlist], { type: 'application/x-apple-configurator' });
// Create a Blob object from the configuration plist string
const configBlob = new Blob([configPlist], { type: 'application/x-apple-configurator' });

// 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 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();

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

configForm.addEventListener('submit', handleFormSubmit);
configForm.addEventListener('submit', handleFormSubmit);

</script>
</script>
</body>
</html>

0 comments on commit 1a9981b

Please sign in to comment.