const {remote, shell} = require('electron')
const path = require('path')
const electronPath = path.relative(process.cwd(), remote.process.execPath)

document.onclick = (e) => {
  e.preventDefault()
  if (e.target.tagName === 'A') {
    shell.openExternal(e.target.href)
  }
  return false
}

document.querySelector('.electron-version').innerText = `Electron v${process.versions.electron}`
document.querySelector('.chrome-version').innerText = `Chromium v${process.versions.chrome}`
document.querySelector('.node-version').innerText = `Node v${process.versions.node}`
document.querySelector('.v8-version').innerText = `v8 v${process.versions.v8}`

document.querySelector('.command-example').innerText = `${electronPath} path-to-app`

@@ -146,26 +146,147 @@
 h)%0A%0A
-document.onclic
+Array.from(document.querySelectorAll('a%5Bhref%5D')).forEach(lin
 k =
+%3E %7B%0A  const url = link.getAttribute('href')%0A  link.addEventListener('click',
  (e)
@@ -291,16 +291,18 @@
 e) =%3E %7B%0A
+  
   e.prev
@@ -320,98 +320,41 @@
 )%0A  
-if (e.target.tagName === 'A') %7B%0A    shell.openExternal(e.target.href)%0A  %7D%0A  return false
+  shell.openExternal(url)%0A  %7D)
 %0A%7D
+)
 %0A%0Ado

fix link behavior