mirror of
https://github.com/markusmo3/obsidian-private-mode.git
synced 2026-07-22 05:42:42 +00:00
only use electron api if available
This commit is contained in:
parent
8d67d09a55
commit
5a1962ced2
1 changed files with 3 additions and 1 deletions
4
main.ts
4
main.ts
|
|
@ -173,7 +173,9 @@ export default class PrivateModePlugin extends Plugin {
|
|||
updateGlobalRevealStyle() {
|
||||
this.removeAllClasses();
|
||||
this.setClassToDocumentBody();
|
||||
window.require("electron").remote.getCurrentWindow().setContentProtection(this.currentScreenshareProtection)
|
||||
if (window.require !== undefined) {
|
||||
window.require("electron").remote.getCurrentWindow().setContentProtection(this.currentScreenshareProtection)
|
||||
}
|
||||
}
|
||||
|
||||
removeAllClasses() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue