# Weblazer Infinite Scroll for Block Themes

High-performance infinite scroll for WordPress. Native JS, SEO-friendly with URL synchronization. Optimized for Block Themes and the Query Loop block.

## Description

Weblazer Infinite Scroll provides a way to add infinite scrolling to your WordPress archives. Built with performance in mind, it is written in Vanilla JS and relies on the native Intersection Observer API for efficient scroll detection.

This plugin is specifically optimized for modern WordPress block themes and the Query Loop block, ensuring seamless integration with the Site Editor. It also features URL synchronization, which updates the browser address bar as users scroll through different pages.

## Key Features

* **Zero Dependencies**: No jQuery. Pure Vanilla JS.
* **Efficient**: Optimized with the Intersection Observer API.
* **URL Sync**: Browser address bar updates as you scroll.
* **Block Theme Optimized**: Works seamlessly with modern Query Loop blocks.
* **i18n Ready**: Ready for translation.

## Installation

1. Upload the plugin directory to your `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. The plugin will automatically detect post lists on your archive pages.

## For Developers

You can hook into the event when new posts are loaded:

```javascript
document.addEventListener('weblazer:infinite-scroll:posts-loaded', (e) => {
    console.log('Page loaded:', e.detail.page);
    console.log('URL:', e.detail.url);
});
```

## License

GPL v2 or later.
