Skip to content
Snippets Groups Projects

Resolve "User-generated permalink IDs collide with GitLab interface"

Merged Mike Greiling requested to merge 22781-user-generated-permalinks into master
All threads resolved!
2 files
+ 19
28
Compare changes
  • Side-by-side
  • Inline
Files
2
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-unused-expressions, no-param-reassign, no-else-return, quotes, object-shorthand, comma-dangle, camelcase, one-var, vars-on-top, one-var-declaration-per-line, no-return-assign, consistent-return, padded-blocks, max-len */
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-unused-expressions, no-param-reassign, no-else-return, quotes, object-shorthand, comma-dangle, camelcase, one-var, vars-on-top, one-var-declaration-per-line, no-return-assign, consistent-return, padded-blocks, max-len */
(function() {
(function() {
(function(w) {
(function(w) {
var base;
var base;
w.gl || (w.gl = {});
w.gl || (w.gl = {});
@@ -94,5+94,5 @@
@@ -94,5+94,5 @@
return $(document).off('scroll');
return $(document).off('scroll');
};
};
w.gl.utils.shiftWindow = function() {
// automatically adjust scroll position for hash urls taking the height of the navbar into account
return w.scrollBy(0, -100);
// https://github.com/twitter/bootstrap/issues/1768
};
w.gl.utils.handleLocationHash = function() {
 
var navbar = document.querySelector('.navbar-gitlab');
 
var subnav = document.querySelector('.layout-nav');
 
var fixedTabs = document.querySelector('.js-tabs-affix');
 
 
var adjustment = 0;
 
if (navbar) adjustment -= navbar.offsetHeight;
 
if (subnav) adjustment -= subnav.offsetHeight;
 
if (fixedTabs) adjustment -= fixedTabs.offsetHeight;
 
window.scrollBy(0, adjustment);
 
};
gl.utils.updateTooltipTitle = function($tooltipEl, newTitle) {
gl.utils.updateTooltipTitle = function($tooltipEl, newTitle) {
return $tooltipEl.tooltip('destroy').attr('title', newTitle).tooltip('fixTitle');
return $tooltipEl.tooltip('destroy').attr('title', newTitle).tooltip('fixTitle');
Loading