🧩
Seanime Extensions
🧩
Seanime Extensions
  • Seanime
    • Getting started
    • Core APIs
    • Changelog
  • Content Providers
    • Write, test, share
    • Anime torrent provider
    • Manga provider
    • Online streaming provider
  • Plugins
    • Introduction
    • Write, test, share
    • APIs
      • Helpers
      • Store
      • Storage
      • Database
      • AniList
      • System
        • Permissions
        • OS
        • Filepath
        • Commands
        • Buffers, I/O
        • MIME
    • UI
      • Basics
      • User Interface
        • Tray
        • Toast
        • Screen
        • Command Palette
        • Action
        • DOM
      • Anime/Library
        • Anime
        • Playback
        • Continuity
        • Auto Downloader
        • Auto Scanner
        • Filler Manager
        • External Player Link
      • Downloading
        • Downloader
        • Torrent Client
      • Other
        • Manga
        • Discord
        • MPV
    • Hooks
    • Example
  • Frequently asked
    • Feature requests
Powered by GitBook
On this page
  • Listen to navigation
  • Navigate
  • Reload the screen
  • Get the current screen
  1. Plugins
  2. UI
  3. User Interface

Screen

Observe and control navigation within the app.

Pitfall

Users having multiple tabs open can lead to unexpected behavior.

This happens because navigation events are received from all connected clients.

Listen to navigation

// Listen to navigation
ctx.screen.onNavigate(e => {
    // User navigated to the 'One Piece' anime page
    console.log(e.pathname) // /entry
    console.log(e.searchParams) // { "id": "21" }
})

Navigate

// Navigate to the 'Sakamoto Days' anime page
ctx.screen.navigateTo("/entry", { "id": "177709" })

Reload the screen

// Hard reload the webapp/desktop client screen.
ctx.screen.reload()

Get the current screen

Calling this will trigger onNavigate

This is useful if you want to know the current screen without having to wait for the user to navigate.

ctx.screen.loadCurrent()

PreviousToastNextCommand Palette

Last updated 23 days ago