From c9bb3585af3f02c0cd99559ead5915b9b0b59390 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 20 Nov 2015 22:36:31 +0100 Subject: [PATCH] Embed function: moving the class 'gist-iframe' from the script to the iframe --- src/Gist/Resources/views/View/embedJs.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gist/Resources/views/View/embedJs.html.twig b/src/Gist/Resources/views/View/embedJs.html.twig index 064a424..9860a64 100644 --- a/src/Gist/Resources/views/View/embedJs.html.twig +++ b/src/Gist/Resources/views/View/embedJs.html.twig @@ -13,6 +13,7 @@ iframe.setAttribute('frameborder', 0); iframe.setAttribute('src', url); iframe.setAttribute('style', 'width: 100%'); + iframe.setAttribute('class', 'gist-iframe'); document.getElementById('gist-{{ gist.file }}-{{ commit }}').appendChild(iframe); iFrameResize({}, iframe); @@ -21,7 +22,6 @@ if (typeof iFrameResize == 'undefined') { var script = document.createElement('script'); script.setAttribute('id', 'gist-iframe-resizer'); - script.setAttribute('class', 'gist-iframe'); script.setAttribute('src', '{{ app.request.getSchemeAndHttpHost() ~ web_path }}components/iframe-resizer/js/iframeResizer.min.js'); script.onload = iFrameResizeLoaded; document.getElementsByTagName('head')[0].appendChild(script);