1
0
mirror of https://gitnet.fr/deblan/gist.git synced 2021-08-14 08:30:49 +02:00

fix locale in embed mode

This commit is contained in:
Simon Vieille 2015-11-24 22:41:59 +01:00
parent da0428369e
commit 29ace38c61

View File

@ -3,7 +3,7 @@
var div = document.getElementById('gist-{{ gist.file }}-{{ commit }}');
var iframeId = 'gist-' + (Math.floor(Math.random() * (10000 - 1)) + 1).toString();
var iframe = document.createElement('iframe');
var url = '{{ app.request.getSchemeAndHttpHost() ~ path('embed', app.request.attributes.get('_route_params')|merge({_locale: 'en'})) }}';
var url = '{{ app.request.getSchemeAndHttpHost() ~ path('embed', app.request.attributes.get('_route_params')) }}';
if (div.getAttribute('data-key')) {
url = [url, div.getAttribute('data-key')].join('');