Common.js
/* M'adrono Chat Widget for Talmido */
mw.loader.using(['mediawiki.util'], function() {
$(document).ready(function() {
// Only load on certain pages if needed, or remove this if statement for all pages
// if (mw.config.get('wgPageName') === 'Main_Page') { // Example: only on Main Page
const script = document.createElement('script');
script.src = "https://storage.googleapis.com/creatorsagi-scripts/creatorsagi-widget.min.js";
script.setAttribute('data-domain', 'ai.talmido.org');
script.setAttribute('data-dialog-title', 'Ask M\'adrono... 🙏');
script.setAttribute('data-mobile-button-text', 'Chat with M\'adrono');
script.setAttribute('data-dialog-subtitle', 'Your AI assistant for Malankara Orthodox Sunday School teaching. Supporting teachers in forming young disciples of Christ 💫');
script.setAttribute('data-suggestions', '["Lesson Planning", "Teaching Activities", "Learning Assessment", "Orthodox Doctrine"]');
script.setAttribute('data-extended-suggestions', '["Grade Resources", "Liturgical Calendar", "Children Engagement", "Talmido Curriculum"]');
script.setAttribute('data-primary-color', '#1aafe3');
script.setAttribute('data-placeholder-texts', '["Help me plan a lesson for my class", "What are some effective ways to teach this lesson?", "How can I assess and check if my students understood this lesson?"]');
document.body.appendChild(script);
// Optional: Add console log for debugging
console.log('M\'adrono widget loaded');
// }
});
});