<script>
  const ipcRenderer = require('electron').ipcRenderer;
  let search = (new URL(document.location)).search;

  async function testIt() {
    if (search === '?clearBadge') {
      try {
        await navigator.setAppBadge(42);
        ipcRenderer.send('setAppBadge','SUCCESS setting app badge');
      } catch (error) {
        ipcRenderer.send('error', `${error.message}\n${error.stack}`);
      }
    }
    navigator.serviceWorker.register('service-worker-badge.js', {scope: './'}).then(function() {
   