enable highlight bar for macos web reader

This commit is contained in:
Satindar Dhillon 2022-06-29 22:09:52 -07:00
parent aa79137223
commit af6f8dd416
4 changed files with 3 additions and 3 deletions

View file

@ -58,7 +58,6 @@ struct WebReader: PlatformViewRepresentable {
webView.scrollView.delegate = context.coordinator
webView.scrollView.contentInset.top = readerViewNavBarHeight
webView.scrollView.verticalScrollIndicatorInsets.top = readerViewNavBarHeight
// TODO: unsure if needed for macos
webView.configuration.userContentController.add(webView, name: "viewerAction")
#else
webView.setValue(false, forKey: "drawsBackground")

View file

@ -87,6 +87,7 @@ struct WebReaderContent {
window.lineHeight = \(lineHeight)
window.localStorage.setItem("theme", "\(themeKey)")
window.prefersHighContrastFont = \(prefersHighContrastText)
window.enableHighlightBar = \(isMacApp)
</script>
<script src="bundle.js"></script>
<script src="mathJaxConfiguration.js" id="MathJax-script"></script>

File diff suppressed because one or more lines are too long

View file

@ -37,7 +37,7 @@ const App = () => {
article={window.omnivoreArticle}
labels={window.omnivoreArticle.labels}
isAppleAppEmbed={true}
highlightBarDisabled={true}
highlightBarDisabled={!window.enableHighlightBar}
highlightsBaseURL="https://example.com"
fontSize={window.fontSize ?? 18}
fontFamily={window.fontFamily ?? 'inter'}