reggi 409 Posted March 29, 2016 Share Posted March 29, 2016 Hi everyone, I'm working on a new plugin for Emby to view some nice statistics of the library and users. At the moment, I have a very basic webpage with some data (total movies, movies viewed, genres + count, ...) and I want to include some nice charts so I have a better visual representation of the data. SO I tried to include a couple of lightweight Javascript libraries for visualising chars (d3.js, chartist.js, ...) but for some reason the scripts don't work. I tried to add my script in the <head> tags but then it isn't even loaded in the HTML page. So I include the follwing <script> in the body tags but that doesn't work either. <script src="http://d3js.org/d3.v3.min.js"charset="utf-8"></script> I check my network traffic and it seems that the files are never loaded. So my question, is there a reason why external javascript files are blocked/not loaded in plugin pages? Thanks, Reggi Link to comment Share on other sites More sharing options...
Luke 37272 Posted March 29, 2016 Share Posted March 29, 2016 Hi, content outside of your page element is ignored. Instead of loading it in the markup, load it in javascript using require. Link to comment Share on other sites More sharing options...
reggi 409 Posted March 31, 2016 Author Share Posted March 31, 2016 Thanks Luke!!! I got it working now. Link to comment Share on other sites More sharing options...
Luke 37272 Posted March 31, 2016 Share Posted March 31, 2016 Well done 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