/** * 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: ` ` }); } // 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 = `Check out this amazing artwork created by our community!