Added code to open external links in the user's default browser
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine 2023-04-06 09:49:59 -04:00
parent 338f29272c
commit 4a59b8b1d3

View File

@ -1,3 +1,16 @@
shell = require('electron').shell
document.addEventListener('DOMContentLoaded', () ->
links = document.querySelectorAll('a[href^="http"]')
i = 0
while i < links.length
links[i].addEventListener('click', (event) ->
event.preventDefault()
shell.openExternal(this.href)
)
i++
)
@openTab = (tab) -> @openTab = (tab) ->
# show the component info that's selected # show the component info that's selected
tabs = document.querySelectorAll('.tab-button') tabs = document.querySelectorAll('.tab-button')