How to load TimelineJS development version instead of minimized storyjs-embed.js?

StackOverflow https://stackoverflow.com/questions/20090323

  •  02-08-2022
  •  | 
  •  

Вопрос

I didn't find any clue how to load the development version of storyjs-embed.js, anyone has experience on this?

Lots of files listed in https://github.com/NUKnightLab/TimelineJS and seem to included and compressed into a single file.

Tried to write to the author and yet didn't get any response...

Это было полезно?

Решение

You can run beautifier on that library to get formated code. For example http://jsbeautifier.org/ produced:

function getEmbedScriptPath(e) {
    var t = document.getElementsByTagName("script"),
        n = "",
        r = "";
    for (var i = 0; i < t.length; i++) t[i].src.match(e) && (n = t[i].src);
    n != "" && (r = "/");
    return n.split("?")[0].split("/").slice(0, -1).join("/") + r
}

function createStoryJS(e, t) {
    function g() {
        LoadLib.js(h.js, y)
    }
    ....

And than you can use that file for development.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top