@ -3,6 +3,9 @@
< head >
< head >
< meta charset = "UTF-8" >
< meta charset = "UTF-8" >
< meta name = "viewport" content = "viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" >
< meta name = "viewport" content = "viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" >
< meta http-equiv = "Cache-Control" content = "no-cache, no-store, must-revalidate" >
< meta http-equiv = "Pragma" content = "no-cache" >
< meta http-equiv = "Expires" content = "0" >
< title > DailyNotification Plugin Test< / title >
< title > DailyNotification Plugin Test< / title >
< style >
< style >
body {
body {
@ -61,11 +64,16 @@
< / div >
< / div >
< script >
< script >
// Wait for DOM to be ready
document.addEventListener('DOMContentLoaded', function() {
console.log('DOM loaded, initializing test functions...');
// Use global Capacitor and plugin objects instead of ES modules
// Use global Capacitor and plugin objects instead of ES modules
// These are provided by the Capacitor runtime
// These are provided by the Capacitor runtime
const Capacitor = window.Capacitor;
const Capacitor = window.Capacitor;
const DailyNotification = window.DailyNotification;
const DailyNotification = window.DailyNotification;
// Define global functions
window.testPlugin = async function() {
window.testPlugin = async function() {
const status = document.getElementById('status');
const status = document.getElementById('status');
status.innerHTML = 'Testing plugin...';
status.innerHTML = 'Testing plugin...';
@ -117,6 +125,9 @@
status.innerHTML = `Status check failed: ${error.message}`;
status.innerHTML = `Status check failed: ${error.message}`;
}
}
};
};
console.log('Test functions initialized');
});
< / script >
< / script >
< / body >
< / body >
< / html >
< / html >