~hristoast/hristoast

f79fb3ab388c681764cb4b344a4c224e9a6ffc34 — Hristos N. Triantafillou 1 year, 6 months ago e889a81
Inject the js at the end of body, not somewhere in the middle
2 files changed, 7 insertions(+), 3 deletions(-)

M site/init.el.html
M soupault.conf
M site/init.el.html => site/init.el.html +1 -3
@@ 6,6 6,4 @@

<noscript class="bold center">If you allow javascript, my init.el will load here!</noscript>

<pre><code>Loading my init.el ...</code></pre>

<script src="/js/init.el.js" type="text/javascript"></script>
<pre id="init-el"><code>Loading my init.el ...</code></pre>

M soupault.conf => soupault.conf +6 -0
@@ 80,6 80,12 @@
  selector = "body"
  check_selector = "video#stream"

[widgets.init-el-js]
  widget = "insert-if"
  html = "<script src='/js/init.el.js' type='text/javascript'></script>"
  selector = "body"
  check_selector = "pre#init-el"

[widgets.stream-js]
  widget = "insert-if"
  html = "<script src='/js/stream.js' type='text/javascript'></script>"