jellyfin / jellyfin-plugin-playbackreporting

Playback Statistics Plugin for Jellyfin
https://jellyfin.org
GNU General Public License v3.0
67 stars 25 forks source link

ES6 - Make plugin compatible with ES6 #28

Closed camc314 closed 3 years ago

camc314 commented 3 years ago

Summary of changes

Dashboard.getConfigurationPageUrl() is removed from Jellyfin.

const getConfigurationPageUrl = (name) => {
    return 'configurationpage?name=' + encodeURIComponent(name);
}

ApiClient -> window.ApiClient


define() is removed, export default instead of the return (ES6)


require([Dashboard.getConfigurationResourceUrl('Chart.bundle.min.js')], function (d3) {

->

import(
    window.ApiClient.getUrl("web/ConfigurationPage", {
        name: "Chart.bundle.min.js",
    })
).then(({default: d3}) => {

(ES6)