Skip to content

Commit

Permalink
Limited Minimize/Maximize btn creation to uncentered desktop mode ↞ […
Browse files Browse the repository at this point in the history
…auto-sync from `adamlui/chatgpt-apps`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Jul 12, 2024
1 parent 955ec10 commit d0c51bc
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.7.12
// @version 2024.7.12.1
// @license MIT
// @icon https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302
// @icon64 https://media.ddgpt.com/images/icons/duckduckgpt/icon64.png?af89302
Expand Down Expand Up @@ -2471,12 +2471,14 @@
appDiv.append(cornerBtnsDiv)

// Create/append Chevron button
const chevronSpan = document.createElement('span'),
chevronSVG = icons[`chevron${ config.minimized ? 'Up' : 'Down' }`].create()
chevronSpan.id = 'chevron-btn' // for toggle.tooltip()
chevronSpan.className = 'corner-btn' ; chevronSpan.style.margin = '-1.5px 1px 0 11px'
chevronSpan.style.display = 'none' // to activate from anchorStyles only
chevronSpan.append(chevronSVG) ; cornerBtnsDiv.append(chevronSpan)
if (!isCentered && !isMobile) {
var chevronSpan = document.createElement('span'),
chevronSVG = icons[`chevron${ config.minimized ? 'Up' : 'Down' }`].create()
chevronSpan.id = 'chevron-btn' // for toggle.tooltip()
chevronSpan.className = 'corner-btn' ; chevronSpan.style.margin = '-1.5px 1px 0 11px'
chevronSpan.style.display = 'none' // to activate from anchorStyles only
chevronSpan.append(chevronSVG) ; cornerBtnsDiv.append(chevronSpan)
}

// Create/append About button
const aboutSpan = document.createElement('span'),
Expand Down Expand Up @@ -2532,7 +2534,7 @@
if (!isMobile) appDiv.append(tooltipDiv)

// Add corner button listeners
chevronSVG.onclick = toggle.minimized
if (chevronSVG) chevronSVG.onclick = toggle.minimized
aboutSVG.onclick = modals.about.show
settingsSVG.onclick = modals.settings.show
if (speakerSVG) speakerSVG.onclick = () => {
Expand Down

0 comments on commit d0c51bc

Please sign in to comment.