Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/layouts/_startup_css_activation.haml')
-rw-r--r--app/views/layouts/_startup_css_activation.haml7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/views/layouts/_startup_css_activation.haml b/app/views/layouts/_startup_css_activation.haml
new file mode 100644
index 00000000000..0b1cce06f47
--- /dev/null
+++ b/app/views/layouts/_startup_css_activation.haml
@@ -0,0 +1,7 @@
+- return unless use_startup_css?
+
+= javascript_tag nonce: true do
+ :plain
+ document.querySelectorAll('link[media="print"]').forEach(linkTag => {
+ linkTag.addEventListener('load', function() {this.media='all'}, {once: true});
+ })