Skip to content

Commit 1f545c3

Browse files
committed
1 parent e0c4d6b commit 1f545c3

1 file changed

Lines changed: 19 additions & 16 deletions

File tree

chatgpt/googlegpt/googlegpt.user.js

Lines changed: 19 additions & 16 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 2026.7.24
152+
// @version 2026.7.25
153153
// @license MIT
154154
// @icon data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22170.667%22%20height=%22170.667%22%3E%3Cstyle%3E:root%7B--fill:%23000%7D@media%20(prefers-color-scheme:dark)%7B:root%7B--fill:%23fff%7D%7D%3C/style%3E%3Cpath%20fill=%22var(--fill)%22%20d=%22M82.346%20159.79c-18.113-1.815-31.78-9.013-45.921-24.184C23.197%20121.416%2017.333%20106.18%2017.333%2086c0-21.982%205.984-36.245%2021.87-52.131C55.33%2017.74%2069.27%2011.867%2091.416%2011.867c17.574%200%2029.679%203.924%2044.309%2014.363l8.57%206.116-8.705%208.705-8.704%208.704-4.288-3.608c-13.91-11.704-35.932-14.167-53.085-5.939-3.4%201.631-9.833%206.601-14.297%2011.045C44.669%2061.753%2040.95%2070.811%2040.95%2086c0%2014.342%203.594%2023.555%2013.26%2033.995%2019.088%2020.618%2048.46%2022.539%2070.457%204.608l5.333-4.348%2011.333%203.844c6.234%202.114%2011.54%203.857%2011.791%203.873.252.015-2.037%203.008-5.087%206.65-6.343%207.577-20.148%2017.217-30.493%2021.295-8.764%203.454-23.358%205.06-35.198%203.873zM92%2086.333V74.667h60.648l-11.41%2011.41-11.411%2011.41-18.914.257L92%2098z%22/%3E%3C/svg%3E
155155
// @icon64 data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22170.667%22%20height=%22170.667%22%3E%3Cstyle%3E:root%7B--fill:%23000%7D@media%20(prefers-color-scheme:dark)%7B:root%7B--fill:%23fff%7D%7D%3C/style%3E%3Cpath%20fill=%22var(--fill)%22%20d=%22M82.346%20159.79c-18.113-1.815-31.78-9.013-45.921-24.184C23.197%20121.416%2017.333%20106.18%2017.333%2086c0-21.982%205.984-36.245%2021.87-52.131C55.33%2017.74%2069.27%2011.867%2091.416%2011.867c17.574%200%2029.679%203.924%2044.309%2014.363l8.57%206.116-8.705%208.705-8.704%208.704-4.288-3.608c-13.91-11.704-35.932-14.167-53.085-5.939-3.4%201.631-9.833%206.601-14.297%2011.045C44.669%2061.753%2040.95%2070.811%2040.95%2086c0%2014.342%203.594%2023.555%2013.26%2033.995%2019.088%2020.618%2048.46%2022.539%2070.457%204.608l5.333-4.348%2011.333%203.844c6.234%202.114%2011.54%203.857%2011.791%203.873.252.015-2.037%203.008-5.087%206.65-6.343%207.577-20.148%2017.217-30.493%2021.295-8.764%203.454-23.358%205.06-35.198%203.873zM92%2086.333V74.667h60.648l-11.41%2011.41-11.411%2011.41-18.914.257L92%2098z%22/%3E%3C/svg%3E
@@ -507,9 +507,9 @@
507507
url: `${app.urls.aiwebAssets}/data/katex-delimiters.json`
508508
}))
509509
app.apis = Object.assign(Object.create(null), await new Promise(resolve => env.xhr({
510-
method: 'GET', onload: ({ responseText }) => resolve(Object.fromEntries(
511-
Object.entries(JSON5.parse(responseText)).filter(([, api]) => !api.disabled))),
512-
url: `${app.urls.aiwebAssets}/data/ai-chat-apis.json5`
510+
method: 'GET', url: `${app.urls.aiwebAssets}/data/ai-chat-apis.json5`,
511+
onload: ({ responseText }) => resolve(Object.fromEntries(
512+
Object.entries(JSON5.parse(responseText)).filter(([, api]) => !api.disabled)))
513513
})))
514514
app.apis.AIchatOS.userID = `#/chat/${Date.now()}`
515515
app.inputEvents = {} ; ['down', 'move', 'up'].forEach(action =>
@@ -1132,7 +1132,8 @@
11321132
* boostPercent -1 // reduced to boosted entries needed
11331133
for (let i = 0 ; i < entriesNeeded ; i++) boostedList.push([name, data]) // saturate list
11341134
boostedListLength += entriesNeeded // update for subsequent calculations
1135-
}})
1135+
}
1136+
})
11361137
return boostedList
11371138
}
11381139
},
@@ -1150,7 +1151,7 @@
11501151
['sm', 'med', 'lg'].forEach(size =>
11511152
document.querySelectorAll(`[id*=particles-${size}]`).forEach(particlesDiv =>
11521153
particlesDiv.id = app.config.bgAnimationsDisabled ? `particles-${size}-off`
1153-
: `${ env.ui.app.scheme == 'dark' ? 'white' : 'gray' }-particles-${size}`))
1154+
: `${ env.ui.app.scheme == 'dark' ? 'white' : 'gray' }-particles-${size}`))
11541155
},
11551156

11561157
rqVisibility() {
@@ -1192,8 +1193,8 @@
11921193
if (getComputedStyle(app.div).transitionProperty.includes('width')) // update byline visibility
11931194
app.div.addEventListener('transitionend', function onTransitionEnd(event) { // ...after width transition
11941195
if (event.propertyName == 'width') {
1195-
update.bylineVisibility() ; app.div.removeEventListener('transitionend', onTransitionEnd)
1196-
}})
1196+
update.bylineVisibility() ; app.div.removeEventListener('transitionend', onTransitionEnd) }
1197+
})
11971198
if (modals.settings.get()) { // update visual state of Settings toggle
11981199
const anchorToggle = document.querySelector('[id*=anchor] input')
11991200
if (anchorToggle.checked != app.config.anchored) modals.settings.toggle.switch(anchorToggle)
@@ -1245,11 +1246,12 @@
12451246
if (getComputedStyle(app.div).transitionProperty.includes('width')) // update byline visibility
12461247
app.div.addEventListener('transitionend', function onTransitionEnd(event) { // ...after width transition
12471248
if (event.propertyName == 'width') {
1248-
update.bylineVisibility() ; app.div.removeEventListener('transitionend', onTransitionEnd)
1249-
}})
1249+
update.bylineVisibility() ; app.div.removeEventListener('transitionend', onTransitionEnd) }
1250+
})
12501251
const expandBtn = app.div.querySelector(`#${app.slug}-arrows-btn`)
1251-
if (expandBtn) expandBtn.firstChild.replaceWith(
1252-
icons.create({ key: `arrowsDiagonal${ app.config.expanded ? 'In' : 'Out' }`, size: 17 }))
1252+
if (expandBtn)
1253+
expandBtn.firstChild.replaceWith(
1254+
icons.create({ key: `arrowsDiagonal${ app.config.expanded ? 'In' : 'Out' }`, size: 17 }))
12531255
},
12541256

12551257
manualGen(mode) { // Prefix/Suffix modes
@@ -2308,8 +2310,9 @@
23082310

23092311
observeRemoval(modal, modalType, modalSubType) { // to maintain stack for proper nav
23102312
const modalBG = modal.parentNode
2311-
new MutationObserver(([mutation], obs) => {
2312-
mutation.removedNodes.forEach(removedNode => { if (removedNode == modalBG) {
2313+
new MutationObserver(([mutation], obs) =>
2314+
mutation.removedNodes.forEach(removedNode => {
2315+
if (removedNode != modalBG) return
23132316
if (modals.stack[0].includes(modalSubType || modalType)) { // new modal not launched so nav back
23142317
modals.stack.shift() // remove this modal type from stack 1st
23152318
const prevModalType = modals.stack[0]
@@ -2319,8 +2322,8 @@
23192322
}
23202323
}
23212324
obs.disconnect()
2322-
}})
2323-
}).observe(modalBG.parentNode, { childList: true, subtree: true })
2325+
})
2326+
).observe(modalBG.parentNode, { childList: true, subtree: true })
23242327
},
23252328

23262329
open(modalType, modalSubType) { // custom ones

0 commit comments

Comments
 (0)