Skip to content

Instantly share code, notes, and snippets.

@ahkohd
Last active April 9, 2020 09:53
Show Gist options
  • Save ahkohd/28e2f2222c9389b75bf9113e82c9011a to your computer and use it in GitHub Desktop.
Save ahkohd/28e2f2222c9389b75bf9113e82c9011a to your computer and use it in GitHub Desktop.
const { remote } = require("electron");
// ...`fadeWindowOut` and `fadeWindowIn` functions goes here...
// Get the current window.
const currentWindow = remote.getCurrentWindow();
// Fade-out window every 2 milliseconds, step by 0.1
let fadeOutWindowIntervalRef = fadeWindowOut(currentWindow, 0.1, 2);
// Fade-in window every 2milliseconds, step by 0.1
let fadeInWindowIntervalRef = fadeWindowIn(currentWindow, 0.1, 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment