diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 3 | ||||
-rw-r--r-- | app/assets/javascripts/helpers/scroll_helper.js | 31 |
2 files changed, 0 insertions, 34 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 8943741df01..1cedcf70d93 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -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; diff --git a/app/assets/javascripts/helpers/scroll_helper.js b/app/assets/javascripts/helpers/scroll_helper.js deleted file mode 100644 index e921f9e2e0f..00000000000 --- a/app/assets/javascripts/helpers/scroll_helper.js +++ /dev/null @@ -1,31 +0,0 @@ -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; |