Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferllings committed Aug 20, 2024
1 parent daa5ca0 commit f092435
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/views/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,21 @@ ipcRenderer.on('newVersion', (event, newVersion) => {
if (newVersion.download) {
updateSectionContent.innerHTML += ` - <a href="${newVersion.download}" class="external-link">${i18n["Download"]}</a>`
}
var externalLinks = updateSectionContent.querySelectorAll('.external-link')

var externalLinks = updateSection.querySelectorAll('.external-link')
Array.from(externalLinks).forEach(link => {
var url = link.getAttribute('href')
link.addEventListener('click', function(event) {
shell.openExternal(url)
event.preventDefault()
})
});
updateSectionContent.innerHTML += ``
updateSection.removeAttribute('hidden')
} else {
updateSection.setAttribute('hidden', '')
updateSectionContent.innerHTML = ''
}
const mainHeight = document.querySelector('main').clientHeight
ipcRenderer.send('height-changed', mainHeight)
})

function initEvents () {
Expand Down Expand Up @@ -218,7 +218,7 @@ function initEvents () {
// init Details
document.querySelectorAll('details').forEach(function(details) {
details.ontoggle = function() {
var mainHeight = document.querySelector('main').clientHeight
var mainHeight = document.querySelector('main').clientHeight
ipcRenderer.send('height-changed', mainHeight)
}
});
Expand Down

0 comments on commit f092435

Please sign in to comment.