MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-

View on GitHub
src/renderer/generic/core/index.js

Summary

Maintainability
A
0 mins
Test Coverage
import { remote } from 'electron';

if (remote.getGlobal('DEV_MODE')) {
  // Attempt to install DevTron
  try {
    if (!remote.BrowserWindow.getDevToolsExtensions().hasOwnProperty('devtron')) {
      require('devtron').install();
    }
  } catch (e) {
    // Who cares
  }

  window.addEventListener('load', () => {
    const webview = document.querySelector('webview');
    if (!webview) {
      return;
    }
    window.openGPMDevTools = () => {
      webview.openDevTools();
    };
  });
}