Skip to content

Commit

Permalink
fix tooltips, re: #258
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsage committed Oct 6, 2024
1 parent 56412ff commit 9edd329
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions renderer/renderJS/util/util_lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ function enhanceI18N() {
return window.i18n.get(this.key).then((result) => {
this.response = result.entry

if ( result.title !== null ) {
if ( result.title !== null && window.use_tooltips ) {
const parent = this.parentElement
if ( parent !== null && (parent.tagName === 'BUTTON' || parent.tagName === 'LABEL' ) ) {
parent.setAttribute('title', `${result.title}${this.extra}`)
Expand Down Expand Up @@ -542,7 +542,10 @@ window.addEventListener('error', (e) => {

// MARK: PAGE LOAD
window.addEventListener('DOMContentLoaded', () => {
enhanceI18N()
window.settings.get('show_tooltips').then((value) => {
window.use_tooltips = value
enhanceI18N()
})

window.fontSheet = new CSSStyleSheet()
document.adoptedStyleSheets.push(window.fontSheet)
Expand Down

0 comments on commit 9edd329

Please sign in to comment.