Skip to content

Commit 784241a

Browse files
committed
Moved url init for GET reqs outside xhrConfig init in get.reply() to align w/ get.related() code
1 parent c3a7a5a commit 784241a

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

amazongpt/greasemonkey/amazongpt.user.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @description Adds the magic of AI to Amazon shopping
44
// @author KudoAI
55
// @namespace https://kudoai.com
6-
// @version 2025.1.18.6
6+
// @version 2025.1.18.7
77
// @license MIT
88
// @icon https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon48.png?v=0fddfc7
99
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon64.png?v=0fddfc7
@@ -2606,10 +2606,11 @@
26062606
},
26072607
onload: resp => dataProcess.text(resp, { caller: get.reply, callerAPI: reqAPI }),
26082608
onloadstart: resp => dataProcess.stream(resp, { caller: get.reply, callerAPI: reqAPI }),
2609-
url: ( apis[reqAPI].endpoints?.completions || apis[reqAPI].endpoint )
2610-
+ ( reqMethod == 'GET' ? `?q=${encodeURIComponent(msgChain[msgChain.length -1].content)}` : '' )
2609+
url: apis[reqAPI].endpoints?.completions || apis[reqAPI].endpoint
26112610
}
26122611
if (reqMethod == 'POST') xhrConfig.data = await api.createPayload(reqAPI, msgChain)
2612+
else if (reqMethod == 'GET')
2613+
xhrConfig.url += `?q=${encodeURIComponent(msgChain[msgChain.length -1].content)}`
26132614
xhr(xhrConfig)
26142615
}
26152616
}

bravegpt/greasemonkey/bravegpt.user.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.1.18.5
151+
// @version 2025.1.18.6
152152
// @license MIT
153153
// @icon https://assets.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0
154154
// @icon64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0
@@ -3306,10 +3306,11 @@
33063306
},
33073307
onload: resp => dataProcess.text(resp, { caller: get.reply, callerAPI: reqAPI }),
33083308
onloadstart: resp => dataProcess.stream(resp, { caller: get.reply, callerAPI: reqAPI }),
3309-
url: ( apis[reqAPI].endpoints?.completions || apis[reqAPI].endpoint )
3310-
+ ( reqMethod == 'GET' ? `?q=${encodeURIComponent(msgChain[msgChain.length -1].content)}` : '' )
3309+
url: apis[reqAPI].endpoints?.completions || apis[reqAPI].endpoint
33113310
}
33123311
if (reqMethod == 'POST') xhrConfig.data = await api.createPayload(reqAPI, msgChain)
3312+
else if (reqMethod == 'GET')
3313+
xhrConfig.url += `?q=${encodeURIComponent(msgChain[msgChain.length -1].content)}`
33133314
xhr(xhrConfig)
33143315

33153316
// Get/show related queries if enabled on 1st get.reply()

duckduckgpt/greasemonkey/duckduckgpt.user.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.1.18.3
151+
// @version 2025.1.18.4
152152
// @license MIT
153153
// @icon https://assets.ddgpt.com/images/icons/duckduckgpt/icon48.png?v=06af076
154154
// @icon64 https://assets.ddgpt.com/images/icons/duckduckgpt/icon64.png?v=06af076
@@ -3193,10 +3193,11 @@
31933193
},
31943194
onload: resp => dataProcess.text(resp, { caller: get.reply, callerAPI: reqAPI }),
31953195
onloadstart: resp => dataProcess.stream(resp, { caller: get.reply, callerAPI: reqAPI }),
3196-
url: ( apis[reqAPI].endpoints?.completions || apis[reqAPI].endpoint )
3197-
+ ( reqMethod == 'GET' ? `?q=${encodeURIComponent(msgChain[msgChain.length -1].content)}` : '' )
3196+
url: apis[reqAPI].endpoints?.completions || apis[reqAPI].endpoint
31983197
}
31993198
if (reqMethod == 'POST') xhrConfig.data = await api.createPayload(reqAPI, msgChain)
3199+
else if (reqMethod == 'GET')
3200+
xhrConfig.url += `?q=${encodeURIComponent(msgChain[msgChain.length -1].content)}`
32003201
xhr(xhrConfig)
32013202

32023203
// Get/show related queries if enabled on 1st get.reply()

googlegpt/greasemonkey/googlegpt.user.js

Lines changed: 4 additions & 3 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.1.18.3
152+
// @version 2025.1.18.4
153153
// @license MIT
154154
// @icon https://assets.googlegpt.io/images/icons/googlegpt/black/icon48.png?v=59409b2
155155
// @icon64 https://assets.googlegpt.io/images/icons/googlegpt/black/icon64.png?v=59409b2
@@ -3486,10 +3486,11 @@
34863486
},
34873487
onload: resp => dataProcess.text(resp, { caller: get.reply, callerAPI: reqAPI }),
34883488
onloadstart: resp => dataProcess.stream(resp, { caller: get.reply, callerAPI: reqAPI }),
3489-
url: ( apis[reqAPI].endpoints?.completions || apis[reqAPI].endpoint )
3490-
+ ( reqMethod == 'GET' ? `?q=${encodeURIComponent(msgChain[msgChain.length -1].content)}` : '' )
3489+
url: apis[reqAPI].endpoints?.completions || apis[reqAPI].endpoint
34913490
}
34923491
if (reqMethod == 'POST') xhrConfig.data = await api.createPayload(reqAPI, msgChain)
3492+
else if (reqMethod == 'GET')
3493+
xhrConfig.url += `?q=${encodeURIComponent(msgChain[msgChain.length -1].content)}`
34933494
xhr(xhrConfig)
34943495

34953496
// Get/show related queries if enabled on 1st get.reply()

0 commit comments

Comments
 (0)