Commit 863114b4 authored by Jacob Schatz's avatar Jacob Schatz

Remove scroll helper... not being used anymore.

parent 40347b78
......@@ -68,7 +68,6 @@ import VersionCheckImage from './version_check_image';
import Wikis from './wikis';
import ZenMode from './zen_mode';
import initSettingsPanels from './settings_panels';
import ScrollHelper from './helpers/scroll_helper';
import initExperimentalFlags from './experimental_flags';
import OAuthRememberMe from './oauth_remember_me';
import PerformanceBar from './performance_bar';
......@@ -99,8 +98,6 @@ import UserFeatureHelper from './helpers/user_feature_helper';
return false;
}
ScrollHelper.setScrollWidth();
path = page.split(':');
shortcut_handler = null;
......
import $ from 'jquery';
const ScrollHelper = {
getScrollWidth() {
const $rulerContainer = $('<div>').css({
visibility: 'hidden',
width: 100,
overflow: 'scroll',
});
const $ruler = $('<div>').css({
width: 100,
});
$ruler.appendTo($rulerContainer);
$rulerContainer.appendTo('body');
const scrollWidth = $ruler.get(0).offsetWidth;
$rulerContainer.remove();
return 100 - scrollWidth;
},
setScrollWidth() {
$('body').attr('data-scroll-width', ScrollHelper.getScrollWidth());
},
};
export default ScrollHelper;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment