summaryrefslogtreecommitdiff
path: root/app/views/layouts/_init_client_detection_flags.html.haml
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2018-12-24 15:55:56 +0530
committerKushal Pandya <kushalspandya@gmail.com>2019-01-22 14:07:48 +0530
commit44ae410a80a180f89044f172791c701053bdb064 (patch)
treed6e4eceb64e337a4be7b12d5e6c4316a12abe874 /app/views/layouts/_init_client_detection_flags.html.haml
parent9cce812af9e409d83f3c50b9453f3cd63bcfbe71 (diff)
downloadgitlab-ce-44ae410a80a180f89044f172791c701053bdb064.tar.gz
Add `client` to gl object for browser and platform flags
Diffstat (limited to 'app/views/layouts/_init_client_detection_flags.html.haml')
-rw-r--r--app/views/layouts/_init_client_detection_flags.html.haml7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/views/layouts/_init_client_detection_flags.html.haml b/app/views/layouts/_init_client_detection_flags.html.haml
new file mode 100644
index 00000000000..c729f8aa696
--- /dev/null
+++ b/app/views/layouts/_init_client_detection_flags.html.haml
@@ -0,0 +1,7 @@
+- client = client_js_flags
+
+- if client
+ -# haml-lint:disable InlineJavaScript
+ :javascript
+ gl = window.gl || {};
+ gl.client = #{client.to_json};