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