Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
// Zen mode
if (evt.key === 'F11') {
evt.preventDefault()
evt.stopPropagation()
evt.returnValue = false
if (evt.ctrlKey) {
if (this.isElectron) {
const win = this.$electron.remote.getCurrentWindow()
win.setFullScreen(!win.isFullScreen())
this.isFullscreen = win.isFullScreen()
}
else {
screenfull.toggle(screenfull.element || document.documentElement)
this.isFullscreen = screenfull.isFullscreen
}
}
}
},
convertMdToHtml (md) {
changeFullscreenModeHandler() {
// Add indication class if fullscreen mode was entered
if (Screenfull.isFullscreen && (Screenfull.element === this.$wrapper.get(0))) {
this.attachFullscreenStyles();
}
// Remove indicator class if fullscreen mode was exited
if (!Screenfull.isFullscreen) {
this.detachFullscreenStyles();
}
}
.filter(() => screenfull.element !== element)
.map( () => setControlProperty("fullscreen", "enabled", false) ),
onFullscreenChange = () => {
if (!this.containerRef || !this.containerRef.current) {
return;
}
this.setStateSafely({ fullScreen: !!screenfull.element && this.containerRef.current === screenfull.element });
};
onChangeFullscreen: function (e) {
var isFullscreen = screenfull.isFullscreen;
this.setState({
isFullscreen: isFullscreen,
fullScreenElement: screenfull.element
});
if (isFullscreen) {
typeof this.onEnterFullscreen === 'function' && this.onEnterFullscreen(e);
} else {
typeof this.onExitFullscreen === 'function' && this.onExitFullscreen(e);
}
}
};