Javascript questions for skins

Hi, I’m doing some experiments with a skin extension, and would like to pull in the https://github.com/Albejr/jquery-albe-timeline library.

I just red throught the https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/SkinExtensionsTutorial but all the code in there is to be copy-pasted in a JS object - and that works.

I would like to link the extensions from the CDN, like suggested in point 4 of the page you mention, but I can’t figure out where I should add that <script /> line, all the places I tried either end up as plain text or as javascript errors.

I won’t go with the webjar version yet, because I’m evaluating the library and may chage it later.

After some trial and errors, I saw that it’s just a matter of surroinding that with {{html}} tags, turning:

<script href="$services.webjars.url('momentjs', 'min/moment.js')"
  type="text/javascript" ></script>

into:

{{html}}
<script href="$services.webjars.url('momentjs', 'min/moment.js')"
  type="text/javascript" ></script>
{{/html}}