mirror of
https://github.com/openSUSE/osem.git
synced 2026-06-12 09:45:45 -04: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:
@@ -9,15 +9,16 @@
|
||||
= javascript_include_tag "application"
|
||||
|
||||
= csrf_meta_tags
|
||||
:javascript
|
||||
window.liveSettings = {
|
||||
api_key: "#{ENV['OSEM_TRANSIFEX_APIKEY']}",
|
||||
picker: "bottom-right",
|
||||
detectlang: true,
|
||||
autocollect: true
|
||||
};
|
||||
= 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)
|
||||
%body
|
||||
|
||||
Reference in New Issue
Block a user