mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Only include transifex JS if the ENV var is set
... otherwise, don't bother loading this blocking external resource.
This commit is contained in:
parent
0e16b5d0ae
commit
fba12aef24
1 changed files with 9 additions and 8 deletions
|
|
@ -9,15 +9,16 @@
|
||||||
= javascript_include_tag "application"
|
= javascript_include_tag "application"
|
||||||
|
|
||||||
= csrf_meta_tags
|
= csrf_meta_tags
|
||||||
:javascript
|
|
||||||
window.liveSettings = {
|
|
||||||
api_key: "#{ENV['OSEM_TRANSIFEX_APIKEY']}",
|
|
||||||
picker: "bottom-right",
|
|
||||||
detectlang: true,
|
|
||||||
autocollect: true
|
|
||||||
};
|
|
||||||
= content_for(:script_head)
|
= content_for(:script_head)
|
||||||
= javascript_include_tag "//cdn.transifex.com/live.js"
|
- if ENV['OSEM_TRANSIFEX_APIKEY']
|
||||||
|
:javascript
|
||||||
|
window.liveSettings = {
|
||||||
|
api_key: "#{ENV['OSEM_TRANSIFEX_APIKEY']}",
|
||||||
|
picker: "bottom-right",
|
||||||
|
detectlang: true,
|
||||||
|
autocollect: true
|
||||||
|
};
|
||||||
|
= javascript_include_tag "//cdn.transifex.com/live.js"
|
||||||
|
|
||||||
= yield(:head)
|
= yield(:head)
|
||||||
%body
|
%body
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue