JasonHua 0 Posted April 9 Share Posted April 9 I'm creating a .js code to add some features in Emby media detail page. Here's my code: https://github.com/XingyiHua2024/Emby-Javascript-Details/blob/main/emby_detail_page.js When creating an item container, I create in a "dumb" way: create html similar to what parsed from the page. But all the buttons/eventListeners are not included in those items. Then I have to add buttons by myself. Is there any smart way or example to use Emby internal classes/methods? Appreciate any suggestions. Link to comment Share on other sites More sharing options...
Luke 37084 Posted April 11 Share Posted April 11 HI, what are you trying to add? Link to comment Share on other sites More sharing options...
JasonHua 0 Posted April 11 Author Share Posted April 11 I'm trying to add a new scroller section, which contains some item containers to show movies that casted by same actor of current movie. Similar to the "similar section" but only by one actor. My question is: how to use Emby methods to create those scrollers and item containers. I guess it would be like: 1. require modules (smoothScroller.js, itemContainer.js); 2. const myElement = new EmbyElement? 3. myElement.fetchdata? Something like that.... I have created by just writing some html, and adding classes (itemAction/itemContainer/scroller...). The only issue is the "onclick" function of buttons are not inherited with just html. I have been looking this for many days. Appreciate your suggestions. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now