 titleInput.value = pageTitle;
                    }
                    
                    preview.classList.add('show');
                }, 500);
                
            } catch (e) {
                preview.classList.remove('show');
            }
        }

        // Form handling
        document.getElementById('addLinkForm').addEventListener('submit', function(e) {
            e.preventDefault();
            
            const url = document.getElementById('linkUrl').value;
            const ti