1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Scroll Bars can now be hidden (#2713)

* Scroll Bars can now be hidden

* Fix lint problems

* fix lint errors

* Fix lint

* Fix lint

* Change scrollBar to showScrollBar
This commit is contained in:
Gonçalo Santos
2020-02-24 08:14:35 +00:00
committed by GitHub
parent 76de78a72e
commit fd54a7b85c
4 changed files with 32 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import { store, history } from './store'
import React, { Fragment } from 'react'
import ReactDOM from 'react-dom'
require('!!style!css!stylus?sourceMap!./global.styl')
import config from 'browser/main/lib/ConfigManager'
import { Route, Switch, Redirect } from 'react-router-dom'
import { ConnectedRouter } from 'connected-react-router'
import DevTools from './DevTools'
@@ -77,6 +78,16 @@ document.addEventListener('click', function(e) {
if (infoPanel) infoPanel.style.display = 'none'
})
if (!config.get().ui.showScrollBar) {
document.styleSheets[54].insertRule('::-webkit-scrollbar {display: none}')
document.styleSheets[54].insertRule(
'::-webkit-scrollbar-corner {display: none}'
)
document.styleSheets[54].insertRule(
'::-webkit-scrollbar-thumb {display: none}'
)
}
const el = document.getElementById('content')
function notify(...args) {