-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f77e5ee
commit 1198b24
Showing
2 changed files
with
58 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// app.js | ||
(function() { | ||
'use strict'; | ||
|
||
// Initialize the application when DOM is ready | ||
document.addEventListener('DOMContentLoaded', initApp); | ||
|
||
function initApp() { | ||
const downloadBtn = document.getElementById('downloadBtn'); | ||
if (downloadBtn) { | ||
downloadBtn.addEventListener('click', handleDownload); | ||
} | ||
} | ||
|
||
function handleDownload() { | ||
// Check if external function exists | ||
if (typeof window.rtlib === 'object' && typeof window.rtlib.downloadVCard === 'function') { | ||
window.rtlib.downloadVCard(); | ||
} else { | ||
console.error('VCard download functionality not available'); | ||
} | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters