Skip to content

bruuhim/MAL-Button-Seanime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

166 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAL Button - Seanime Plugin

MAL Button Icon

🚀 Quick MyAnimeList Access for Seanime

One-click access to MyAnimeList from your anime & manga pages

License Version Seanime


✨ Features

  • 🎯 Native Integration - Seamlessly integrates into Seanime's UI with a native-style button
  • ⚡ Fast Loading - Optimized to appear in ~500ms with smart retry logic
  • 📺 Anime & Manga Support - Works on both anime and manga detail pages
  • 🔗 Direct Links - Opens the corresponding MyAnimeList page in a new tab
  • 🎨 Clean Design - Uses the official MAL logo with Seanime's styling
  • 🛡️ Robust - Handles edge cases, React re-renders, and API errors gracefully

🖼️ Preview

MAL Button in action

The MAL button appears next to the AniList button in the action bar


📦 Installation

From Seanime Extensions Marketplace

  1. Open Seanime → Navigate to Extensions
  2. Search for "MAL Button"
  3. Click Install
  4. The button will appear automatically on anime/manga pages!

Manual Installation

  1. Download the latest release from GitHub
  2. In Seanime, go to ExtensionsDevelopment
  3. Click Install from URL and paste:
    https://raw.githubusercontent.com/bruuhim/MAL-Button-Seanime/refs/heads/main/src/manifest.json
    

🎯 Usage

  1. Navigate to any Anime or Manga detail page in Seanime
  2. Look for the MAL button in the action bar (next to the AniList button)
  3. Click it to open the corresponding MyAnimeList page in a new tab

Note: The button only appears if the anime/manga has a MyAnimeList entry.


🛠️ How It Works

Smart DOM Injection

  • Uses Seanime's ctx.dom API to safely inject the button
  • Waits for the action bar container to be ready (500ms initial delay)
  • Retries every 500ms if the DOM isn't ready yet
  • Removes duplicate buttons automatically

Data Flow

  1. Navigation Detection - Listens to ctx.screen.onNavigate
  2. Entry Fetching - Gets anime/manga data via ctx.anime.getAnimeEntry() or ctx.manga.getMangaEntry()
  3. MAL ID Extraction - Checks if media.idMal exists
  4. Button Injection - Creates and injects the MAL button next to the AniList button

Performance

  • Initial delay: 500ms (optimized for fast loading)
  • Retry interval: 500ms (if DOM not ready)
  • Button appears: Usually within 0.5-1 second

🔧 Development

Project Structure

MAL-Button-Seanime/
├── src/
│   ├── MAL.ts           # Main plugin logic
│   ├── manifest.json    # Plugin metadata
│   ├── icon.png         # Plugin icon
│   ├── app.d.ts         # Seanime app type definitions
│   ├── core.d.ts        # Core type definitions
│   ├── plugin.d.ts      # Plugin API type definitions
│   └── system.d.ts      # System type definitions
├── assets/
│   ├── Preview-01.png   # Screenshot 1
│   ├── Preview-02.png   # Screenshot 2
│   └── Screenshot-After.png  # Main preview
├── README.md
├── LICENSE
└── package.json

Building

This plugin is written in TypeScript and uses Seanime's plugin system. No build step is required - Seanime compiles TypeScript plugins automatically.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


📝 Changelog

v1.0.18 (Latest)

  • Performance: Reduced initial delay from 2s to 500ms
  • Performance: Reduced retry increment from 2s to 500ms
  • 🚀 Button now appears 4x faster!

v1.0.17

  • 🔄 Complete sync with developer's PR version
  • ✅ Stable release with proper TypeScript definitions

v1.0.1

  • 🐛 Fixed handling of "GoError: no cached data available"
  • 🔧 Improved robustness when switching between Anime/Manga

📄 License

MIT License - See LICENSE for details


🙏 Credits

  • Original concept and implementation by bruuhim
  • Optimizations and improvements by nnotwen
  • Built for Seanime by 5rahim

Made with ❤️ for the Seanime community

If you find this useful, please ⭐ the repo!

Report Bug · Request Feature

About

Seanime plugin that adds a MyAnimeList button to anime details page

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors