/** * Example FurryPlace Plugin - Info Modal Customization * * This demonstrates how to add custom sections to the info modal * (the one that shows rules, YouTube video, etc.) * * To use this plugin, add it to your HTML: * */ (function() { 'use strict'; // Set this to true to disable this example plugin (for reference only) const EXAMPLE_DISABLED = true; // Wait for SDK to be available function waitForSDK(callback) { if (window.FurryPlaceSDK) { callback(); } else { setTimeout(() => waitForSDK(callback), 100); } } // Example 1: Simple text section function addWelcomeSection() { window.FurryPlaceSDK.addInfoSection({ id: 'custom-welcome', title: '👋 Welcome!', position: 'top', content: `

Welcome to our custom FurryPlace server! This is a demonstration of how plugins can add custom content to the info modal.

` }); } // Example 2: Section with interactive content function addStatsSection() { window.FurryPlaceSDK.addInfoSection({ id: 'server-stats', title: '📊 Server Statistics', position: 'after-video', content: () => { const div = document.createElement('div'); div.className = 'text-sm space-y-2'; const stats = [ { label: 'Total Players', value: '10,000+' }, { label: 'Pixels Painted', value: '5,000,000+' }, { label: 'Active Alliances', value: '250' } ]; stats.forEach(stat => { const statDiv = document.createElement('div'); statDiv.className = 'flex justify-between items-center p-2 bg-base-200 rounded'; statDiv.innerHTML = ` ${stat.label}: ${stat.value} `; div.appendChild(statDiv); }); return div; } }); } // Example 3: Custom links section function addLinksSection() { window.FurryPlaceSDK.addInfoSection({ id: 'custom-links', title: '🔗 Useful Links', position: 'bottom', content: `
📚 Wiki 💬 Discord 🐦 Twitter
` }); } // Example 4: Dynamic content with user state function addUserInfoSection() { window.FurryPlaceSDK.addInfoSection({ id: 'user-quick-info', title: '👤 Your Info', position: 'after-video', content: () => { const div = document.createElement('div'); div.className = 'text-sm'; // Check if user is logged in if (!window.FurryPlaceSDK.isLoggedIn()) { div.innerHTML = '

Please log in to see your stats

'; return div; } const droplets = window.FurryPlaceSDK.getDroplets(); const level = window.FurryPlaceSDK.getLevel(); const charges = window.FurryPlaceSDK.getCharges(); div.innerHTML = `
Level
${level}
Droplets
${droplets}
Paint Charges
${charges.current}/${charges.max}
`; return div; } }); } // Example 5: Announcement section function addAnnouncementSection() { window.FurryPlaceSDK.addInfoSection({ id: 'announcements', title: '📢 Announcements', position: 'top', className: 'bg-primary/10 p-4 rounded-lg', content: `
New Event: Double droplets weekend starts Friday!
Server maintenance completed successfully
` }); } // Example 6: Tips & Tricks section function addTipsSection() { window.FurryPlaceSDK.addInfoSection({ id: 'tips-tricks', title: '💡 Tips & Tricks', position: 'bottom', content: ` ` }); } // Example 7: Changelog section function addChangelogSection() { window.FurryPlaceSDK.addInfoSection({ id: 'changelog', title: '📝 Recent Updates', position: 'bottom', content: `
v2.0.0 - Latest
  • Added plugin system
  • Improved performance
  • Bug fixes
v1.9.0
  • Alliance system improvements
  • New color palette
` }); } // Example 8: Embed section with custom styling function addFeaturedArtSection() { window.FurryPlaceSDK.addInfoSection({ id: 'featured-art', title: '🎨 Featured Artwork', position: 'after-video', content: `

Check out this amazing artwork created by our community!

🖼️
🎭
🌈
` }); } // Initialize plugin waitForSDK(() => { if (EXAMPLE_DISABLED) { console.log('[Info Modal Plugin] Disabled - set EXAMPLE_DISABLED to false to enable'); return; } console.log('[Info Modal Plugin] Initializing...'); // Register all example sections // Comment out the ones you don't want to use addWelcomeSection(); addAnnouncementSection(); addStatsSection(); addUserInfoSection(); addTipsSection(); addLinksSection(); addFeaturedArtSection(); addChangelogSection(); console.log('[Info Modal Plugin] Loaded successfully!'); console.log('[Info Modal Plugin] Registered sections:', window.FurryPlaceSDK.getInfoSections()); }); })();