summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-06-07 22:21:05 +0200
committerRémy Coutable <remy@rymai.me>2017-06-09 17:21:39 +0200
commitaf0c69170695f43b15db9c93ae2f2b8ebaaa96b6 (patch)
treef55f15f5e03f5596a18c8a47024ba8c07c6a5654
parent54c04f53fddc36d62a3d3d4125c9fe205138fc63 (diff)
downloadgitlab-ce-af0c69170695f43b15db9c93ae2f2b8ebaaa96b6.tar.gz
Improve the JS for the `p b` shortcut and fix its CSS
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--app/assets/javascripts/shortcuts.js7
-rw-r--r--vendor/assets/stylesheets/peek.scss5
2 files changed, 4 insertions, 8 deletions
diff --git a/app/assets/javascripts/shortcuts.js b/app/assets/javascripts/shortcuts.js
index 09cb914e884..a4a7f3fa944 100644
--- a/app/assets/javascripts/shortcuts.js
+++ b/app/assets/javascripts/shortcuts.js
@@ -58,10 +58,11 @@ import findAndFollowLink from './shortcuts_dashboard_navigation';
Shortcuts.prototype.onTogglePerfBar = function(e) {
e.preventDefault();
- if (Cookies.get('perf_bar_enabled') === 'true') {
- Cookies.remove('perf_bar_enabled', { path: '/' });
+ const performanceBarCookieName = 'perf_bar_enabled';
+ if (Cookies.get(performanceBarCookieName) === 'true') {
+ Cookies.remove(performanceBarCookieName, { path: '/' });
} else {
- Cookies.set('perf_bar_enabled', true, { path: '/' });
+ Cookies.set(performanceBarCookieName, true, { path: '/' });
}
gl.utils.refreshCurrentPage();
};
diff --git a/vendor/assets/stylesheets/peek.scss b/vendor/assets/stylesheets/peek.scss
index 3508f2e2450..f1845fb9044 100644
--- a/vendor/assets/stylesheets/peek.scss
+++ b/vendor/assets/stylesheets/peek.scss
@@ -6,12 +6,7 @@ header.navbar-gitlab.with-peek {
}
#peek {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
height: 35px;
- z-index: 400;
background: #000;
line-height: 35px;
color: #999;