aboutsummaryrefslogtreecommitdiff
path: root/data/templates/embed.htm
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/embed.htm')
-rw-r--r--data/templates/embed.htm5
1 files changed, 3 insertions, 2 deletions
diff --git a/data/templates/embed.htm b/data/templates/embed.htm
index 0334c22..22c9b19 100644
--- a/data/templates/embed.htm
+++ b/data/templates/embed.htm
@@ -1,6 +1,7 @@
/* embedding all files of {{repo.getLink('display', null, true)}} */
-document.write('<link rel="stylesheet" href="{{htmlhelper.fullUrl('css/embed.css')}}"/>');
-document.write(
+var me = document.getElementById('phork-script-{{repo.id}}');
+me.insertAdjacentHTML('afterend', '<link rel="stylesheet" href="{{htmlhelper.fullUrl('css/embed.css')}}"/>');
+me.insertAdjacentHTML('afterend',
'<div class="phork" id="{{repo.id}}">'
{% for file in repo.getFiles %}
+ {% filter json_encode(constant('JSON_UNESCAPED_SLASHES'))|raw -%}{% include 'embed-part-file.htm' %}{%- endfilter %}