Skip to content

Commit 1a25069

Browse files
committed
Lowered standby buttons + app in Anchor mode, auto-anchored in Google AI mode (closes KudoAI/googlegpt#111) ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/googlegpt]
1 parent 9e7ef72 commit 1a25069

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

chatgpt/googlegpt/googlegpt.user.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
150150
// @author KudoAI
151151
// @namespace https://kudoai.com
152-
// @version 2025.6.2.1
152+
// @version 2025.6.8
153153
// @license MIT
154154
// @icon https://assets.googlegpt.io/images/icons/app/black/icon48.png?v=12a91c0
155155
// @icon64 https://assets.googlegpt.io/images/icons/app/black/icon64.png?v=12a91c0
@@ -732,7 +732,7 @@
732732
)
733733
},
734734

735-
appBottomPos() { app.div.style.bottom = `${ config.minimized ? 35 - app.div.offsetHeight : -33 }px` },
735+
appBottomPos() { app.div.style.bottom = `${ config.minimized ? 22 - app.div.offsetHeight : -33 }px` },
736736

737737
appStyle() { // used in toggle.animations() + update.scheme() + main's app init
738738
const isParticlizedDS = env.ui.app.scheme == 'dark' && !config.bgAnimationsDisabled,
@@ -906,7 +906,7 @@
906906
-o-transition: var(--font-size-slider-thumb-transition) ;
907907
-ms-transition: var(--font-size-slider-thumb-transition)` }}
908908
${ env.browser.isMobile ? '' : `#${app.slug}-font-size-slider-thumb:hover { transform: scale(1.125) }`}
909-
.${app.slug}-standby-btns { margin: 15px 0 -14px }
909+
.${app.slug}-standby-btns { margin: 20px 0 -14px }
910910
.${app.slug}-standby-btn {
911911
--skew: skew(-13deg) ; --counter-skew: skew(13deg) ;
912912
--content-color: ${ env.ui.app.scheme == 'dark' ? 'white' : 'black' };
@@ -3012,7 +3012,7 @@
30123012
document.head.append(dom.create.style(GM_getResourceText(`${cssType}CSS`))))
30133013

30143014
// Hide GF alert on GitHub if found
3015-
if (location.host == 'github.com') {
3015+
if (location.host == 'github.com') { // hide GF alert
30163016
const gfAlert = [...document.querySelectorAll('.markdown-alert')]
30173017
.find(alert => alert.textContent.includes('Greasy Fork'))
30183018
return !gfAlert ? undefined : gfAlert.style.display = 'none'
@@ -3030,8 +3030,16 @@
30303030
appDivParent.prepend(app.div)
30313031
setTimeout(() => app.div.classList.add('active'), 100) // fade in
30323032

3033+
// ANCHOR GoogleGPT in Google AI Mode
3034+
if (/udm=50(?:&|$)/.test(location.search)) {
3035+
toggle.anchorMode('on')
3036+
if (!env.browser.isMobile) { // hide Pin button + Anchor Mode setting
3037+
dom.get.loadedElem(`#${app.slug}-pin-btn`).then(btn => btn.style.display = 'none')
3038+
document.head.append(dom.create.style('li#anchored-settings-entry { display: none }'))
3039+
}
3040+
30333041
// Strip Google TRACKING
3034-
document.addEventListener(inputEvents.down, event => {
3042+
} else document.addEventListener(inputEvents.down, event => {
30353043
let a = event.target ; while (a && !a.href) a = a.parentElement ; if (!a) return // find closest ancestor href
30363044
a.removeAttribute('ping') // prevent pingback on link click
30373045
if (a.getAttribute('onmousedown')?.includes('rwt(')) {

0 commit comments

Comments
 (0)