Skip to content

Commit

Permalink
Utilized window.scrollY as primary addend in asktip visibility menu…
Browse files Browse the repository at this point in the history
… style since `window.pageYOffset` deprecated
  • Loading branch information
adamlui committed Jun 21, 2024
1 parent 8308851 commit ba8de3b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bravegpt/greasemonkey/bravegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
// @description:zu Faka izimpendulo ze-AI eceleni kwe-Brave Search. Buza kusuka kunoma yisiphi isiza. Ixhaswe yi-GPT-4o!
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.6.21
// @version 2024.6.21.1
// @license MIT
// @icon https://media.bravegpt.com/images/icons/bravegpt/icon48.png?0a9e287
// @icon64 https://media.bravegpt.com/images/icons/bravegpt/icon64.png?0a9e287
Expand Down Expand Up @@ -2643,7 +2643,7 @@ setTimeout(async () => {
hideAsktipMenu.style.display = 'grid'
hideAsktipMenu.style.left = `${hideTipSpan.getBoundingClientRect().left}px`
hideAsktipMenu.style.top = `${ hideTipSpan.getBoundingClientRect().bottom
+ ( window.pageYOffset || document.documentElement.scrollTop ) +6 }px`
+ ( window.scrollY || window.pageYOffset || document.documentElement.scrollTop ) +6 }px`
}}
hideTipSpan.onmouseout = () => hideTipSpan.style.background = 'none' // unhighlight bg
hideTipSVG.append(hideTipSVGpath) ; hideTipSpan.append(hideTipSVG) ; asktip.append(hideTipSpan)
Expand Down
4 changes: 2 additions & 2 deletions duckduckgpt/greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
// @description:zu Faka izimpendulo ze-AI eceleni kwe-DuckDuckGo. Buza kusuka kunoma yisiphi isiza. Ixhaswe yi-GPT-4o!
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.6.21
// @version 2024.6.21.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 @@ -2681,7 +2681,7 @@
hideAsktipMenu.style.display = 'grid'
hideAsktipMenu.style.left = `${hideTipSpan.getBoundingClientRect().left}px`
hideAsktipMenu.style.top = `${ hideTipSpan.getBoundingClientRect().bottom
+ ( window.pageYOffset || document.documentElement.scrollTop ) +6 }px`
+ ( window.scrollY || window.pageYOffset || document.documentElement.scrollTop ) +6 }px`
}}
hideTipSpan.onmouseout = () => hideTipSpan.style.background = 'none' // unhighlight bg
hideTipSVG.append(hideTipSVGpath) ; hideTipSpan.append(hideTipSVG) ; asktip.append(hideTipSpan)
Expand Down
4 changes: 2 additions & 2 deletions googlegpt/greasemonkey/googlegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search. Buza kuphi noma yikuphi usayithi. Inikwa amandla yi-Google Gemma + GPT-4o!
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.6.21.1
// @version 2024.6.21.2
// @license MIT
// @icon https://media.googlegpt.io/images/icons/googlegpt/black/icon48.png?8652a6e
// @icon64 https://media.googlegpt.io/images/icons/googlegpt/black/icon64.png?8652a6e
Expand Down Expand Up @@ -2899,7 +2899,7 @@
hideAsktipMenu.style.display = 'grid'
hideAsktipMenu.style.left = `${hideTipSpan.getBoundingClientRect().left}px`
hideAsktipMenu.style.top = `${ hideTipSpan.getBoundingClientRect().bottom
+ ( window.pageYOffset || document.documentElement.scrollTop ) +6 }px`
+ ( window.scrollY || window.pageYOffset || document.documentElement.scrollTop ) +6 }px`
}}
hideTipSpan.onmouseout = () => hideTipSpan.style.background = 'none' // unhighlight bg
hideTipSVG.append(hideTipSVGpath) ; hideTipSpan.append(hideTipSVG) ; asktip.append(hideTipSpan)
Expand Down

0 comments on commit ba8de3b

Please sign in to comment.