summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/feature_highlight/feature_highlight_options.js
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2018-01-10 22:16:27 -0600
committerEric Eastwood <contact@ericeastwood.com>2018-02-05 12:10:09 -0600
commit2fb167fa3bc1aa3d46f4edc551d1b37a9c038cac (patch)
treec53c6f8a8ccb71a20e8ae7b228e11a1cedcbdef7 /app/assets/javascripts/feature_highlight/feature_highlight_options.js
parent0a30a9ea595530499e2d3ae8062506b0a94eebad (diff)
downloadgitlab-ce-41672-emphasize-gke-cluster-to-new-users.tar.gz
Restore feature_highlight code41672-emphasize-gke-cluster-to-new-users
From https://gitlab.com/gitlab-org/gitlab-ce/issues/36760 Was reverted in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14373
Diffstat (limited to 'app/assets/javascripts/feature_highlight/feature_highlight_options.js')
-rw-r--r--app/assets/javascripts/feature_highlight/feature_highlight_options.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/feature_highlight/feature_highlight_options.js b/app/assets/javascripts/feature_highlight/feature_highlight_options.js
new file mode 100644
index 00000000000..212643b1e04
--- /dev/null
+++ b/app/assets/javascripts/feature_highlight/feature_highlight_options.js
@@ -0,0 +1,12 @@
+import { highlightFeatures } from './feature_highlight';
+import bp from '../breakpoints';
+
+export default function domContentLoaded() {
+ if (bp.getBreakpointSize() === 'lg') {
+ highlightFeatures();
+ return true;
+ }
+ return false;
+}
+
+document.addEventListener('DOMContentLoaded', domContentLoaded);