title: Electron / Browser: Detect when the app is opened again from taskbar (after being minimized)
body: <p>I'm struggling to find a solution to my problem - I am developing an Electron app and I really need to find a way (with JavaScript) to detect when the user opens the app again from the taskbar when it's minimized.
  Any kind of help is appreciated!</p>
  
  <pre><code>const remote = require('electron').remote;
          document.getElementById("minApp").addEventListener("click", function (e) {
              document.getElementById('minApp').style.opacity = '0.55';
              document.getElementById('minApp').onmouseover = function() {
                  document.getElementById('minApp').style.opacity = '0.55'; 
              }
              document.getElementById('minApp').onmouseout = function() {
                  document.getElementById('minApp').style.opacity = '0.55'; 
              }
              var window = remote.getCurrentWindow();
              window.minimize();
          });
          document.getElementById("closeApp").addEventListener("click", function (e) {
              var window = remote.getCurrentWindow();
              window.close();
          });
          var window = remote.getCurrentWindow();
          window.on('restore', () =&gt; {
              document.getElementById('minApp').style.opacity = '0.55';
              document.getElementById('minApp').onmouseover = function() {
                  document.getElementById('minApp').style.opacity = '1'; 
              }
              document.getElementById('minApp').onmouseout = function() {
                  document.getElementById('minApp').style.opacity = '0.55'; 
              }
              alert(1);
          })
  </code></pre>