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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-05 00:09:56 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-05 00:09:56 +0300
commit20de59fb35360bb61806cfe690de57fef2f1873d (patch)
treeae8ccfb640c01e4836106013ebdc1fce00341983 /app/helpers/application_helper.rb
parent2ecc6e22e3517a2e0d9a5bd0d4297c74e2f338d4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index e8bd5ad9b9b..c73cfbcfd22 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -231,6 +231,18 @@ module ApplicationHelper
"#{request.path}?#{options.compact.to_param}"
end
+ def use_startup_css?
+ params[:startup_css] == 'true' || cookies['startup_css'] == 'true'
+ end
+
+ def stylesheet_link_tag_defer(path)
+ if use_startup_css?
+ stylesheet_link_tag(path, media: "print", onload: "this.onload=null;this.media='all'")
+ else
+ stylesheet_link_tag(path, media: "all")
+ end
+ end
+
def outdated_browser?
browser.ie?
end