feat: add desktop repo (#1071)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { WebContents } from 'electron'
|
||||
import { SearchManagerInterface } from './SearchManagerInterface'
|
||||
|
||||
export function initializeSearchManager(webContents: WebContents): SearchManagerInterface {
|
||||
return {
|
||||
findInPage(text: string) {
|
||||
webContents.stopFindInPage('clearSelection')
|
||||
if (text && text.length > 0) {
|
||||
// This option arrangement is required to avoid an issue where clicking on a
|
||||
// different note causes scroll to jump.
|
||||
webContents.findInPage(text)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export interface SearchManagerInterface {
|
||||
findInPage(text: string): void
|
||||
}
|
||||
Reference in New Issue
Block a user