Action
Core Methods
newAnimePageButton
// Create a play button for anime pages
const playButton = ctx.action.newAnimePageButton({
label: "Play All Episodes",
intent: "primary",
style: { marginRight: "8px" }
})
// Mount the button to make it visible
playButton.mount()
// Handle clicks
playButton.onClick((event) => {
const anime = event.media
console.log(`Play all episodes for: ${anime.title.userPreferred}`)
// Implement playback logic
})newAnimePageDropdownItem
newAnimeLibraryDropdownItem
newMediaCardContextMenuItem
newMangaPageButton
newEpisodeCardContextMenuItem
newEpisodeGridItemMenuItem
Action Object Methods
mount()
unmount()
setLabel(label)
setStyle(style)
onClick(callback)
Additional Properties
AnimePageButton and MangaPageButton
MediaCardContextMenuItem
Best Practices
Limit Number of Actions
Dynamic UI Updates
Conditional Mounting
Last updated