Skip to content

Commit 406b971

Browse files
committed
Grouped inputEvents init w/ env init
1 parent eefca8f commit 406b971

File tree

4 files changed

+12
-20
lines changed

4 files changed

+12
-20
lines changed

amazongpt/greasemonkey/amazongpt.user.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @description Add AI chat & product/category summaries to Amazon shopping, powered by the latest LLMs like GPT-4o!
44
// @author KudoAI
55
// @namespace https://kudoai.com
6-
// @version 2025.5.17.8
6+
// @version 2025.5.17.9
77
// @license MIT
88
// @icon https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon48.png?v=8e8ed1c
99
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon64.png?v=8e8ed1c
@@ -143,6 +143,8 @@
143143
env.scriptManager.supportsStreaming = /Tampermonkey|ScriptCat/.test(env.scriptManager.name)
144144
env.scriptManager.supportsTooltips = env.scriptManager.name == 'Tampermonkey'
145145
&& parseInt(env.scriptManager.version.split('.')[0]) >= 5
146+
window.inputEvents = {} ; ['down', 'move', 'up'].forEach(action =>
147+
inputEvents[action] = ( window.PointerEvent ? 'pointer' : env.browser.isMobile ? 'touch' : 'mouse' ) + action)
146148
window.xhr = typeof GM != 'undefined' && GM.xmlHttpRequest || GM_xmlhttpRequest
147149

148150
// Init APP data
@@ -261,10 +263,6 @@
261263
if (!env.scriptManager.supportsStreaming) settings.save('streamingDisabled', true) // disable Streaming in unspported env
262264
log.debug(`Success! config = ${log.prettifyObj(config)}`)
263265

264-
// Init INPUT EVENTS
265-
window.inputEvents = {} ; ['down', 'move', 'up'].forEach(action =>
266-
inputEvents[action] = ( window.PointerEvent ? 'pointer' : env.browser.isMobile ? 'touch' : 'mouse' ) + action)
267-
268266
// Define UI functions
269267

270268
const themes = {

bravegpt/greasemonkey/bravegpt.user.js

Lines changed: 3 additions & 5 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.5.17.9
151+
// @version 2025.5.17.10
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
@@ -265,6 +265,8 @@
265265
env.scriptManager.supportsStreaming = /Tampermonkey|ScriptCat/.test(env.scriptManager.name)
266266
env.scriptManager.supportsTooltips = env.scriptManager.name == 'Tampermonkey'
267267
&& parseInt(env.scriptManager.version.split('.')[0]) >= 5
268+
window.inputEvents = {} ; ['down', 'move', 'up'].forEach(action =>
269+
inputEvents[action] = ( window.PointerEvent ? 'pointer' : env.browser.isMobile ? 'touch' : 'mouse' ) + action)
268270
window.xhr = typeof GM != 'undefined' && GM.xmlHttpRequest || GM_xmlhttpRequest
269271

270272
// Init APP data
@@ -416,10 +418,6 @@
416418
if (!env.scriptManager.supportsStreaming) settings.save('streamingDisabled', true) // disable Streaming in unspported env
417419
log.debug(`Success! config = ${log.prettifyObj(config)}`)
418420

419-
// Init INPUT EVENTS
420-
window.inputEvents = {} ; ['down', 'move', 'up'].forEach(action =>
421-
inputEvents[action] = ( window.PointerEvent ? 'pointer' : env.browser.isMobile ? 'touch' : 'mouse' ) + action)
422-
423421
// Define UI functions
424422

425423
const themes = {

duckduckgpt/greasemonkey/duckduckgpt.user.js

Lines changed: 3 additions & 5 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.5.17.10
151+
// @version 2025.5.17.11
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
@@ -266,6 +266,8 @@
266266
env.scriptManager.supportsStreaming = /Tampermonkey|ScriptCat/.test(env.scriptManager.name)
267267
env.scriptManager.supportsTooltips = env.scriptManager.name == 'Tampermonkey'
268268
&& parseInt(env.scriptManager.version.split('.')[0]) >= 5
269+
window.inputEvents = {} ; ['down', 'move', 'up'].forEach(action =>
270+
inputEvents[action] = ( window.PointerEvent ? 'pointer' : env.browser.isMobile ? 'touch' : 'mouse' ) + action)
269271
window.xhr = typeof GM != 'undefined' && GM.xmlHttpRequest || GM_xmlhttpRequest
270272

271273
// Init APP data
@@ -410,10 +412,6 @@
410412
settings.save('notFirstRun', true)
411413
log.debug(`Success! config = ${log.prettifyObj(config)}`)
412414

413-
// Init INPUT EVENTS
414-
window.inputEvents = {} ; ['down', 'move', 'up'].forEach(action =>
415-
inputEvents[action] = ( window.PointerEvent ? 'pointer' : env.browser.isMobile ? 'touch' : 'mouse' ) + action)
416-
417415
// Define UI functions
418416

419417
const themes = {

googlegpt/greasemonkey/googlegpt.user.js

Lines changed: 3 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.5.17.10
152+
// @version 2025.5.17.11
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
@@ -456,6 +456,8 @@
456456
env.scriptManager.supportsStreaming = /Tampermonkey|ScriptCat/.test(env.scriptManager.name)
457457
env.scriptManager.supportsTooltips = env.scriptManager.name == 'Tampermonkey'
458458
&& parseInt(env.scriptManager.version.split('.')[0]) >= 5
459+
window.inputEvents = {} ; ['down', 'move', 'up'].forEach(action =>
460+
inputEvents[action] = ( window.PointerEvent ? 'pointer' : env.browser.isMobile ? 'touch' : 'mouse' ) + action)
459461
window.xhr = typeof GM != 'undefined' && GM.xmlHttpRequest || GM_xmlhttpRequest
460462

461463
// Init APP data
@@ -601,10 +603,6 @@
601603
settings.save('notFirstRun', true)
602604
log.debug(`Success! config = ${log.prettifyObj(config)}`)
603605

604-
// Init INPUT EVENTS
605-
window.inputEvents = {} ; ['down', 'move', 'up'].forEach(action =>
606-
inputEvents[action] = ( window.PointerEvent ? 'pointer' : env.browser.isMobile ? 'touch' : 'mouse' ) + action)
607-
608606
// Define UI functions
609607

610608
const themes = {

0 commit comments

Comments
 (0)