Skip to content

Commit

Permalink
Expanded product page detection ↞ [auto-sync from KudoAI/amazongpt]
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Oct 19, 2024
1 parent b2c128b commit 7895f0f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions chatgpt/amazongpt/amazongpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @description Adds the magic of AI to Amazon shopping
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.10.17.3
// @version 2024.10.19
// @license MIT
// @icon https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon48.png?v=0fddfc7
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon64.png?v=0fddfc7
Expand Down Expand Up @@ -2861,10 +2861,11 @@

// Get/show FIRST REPLY
const firstQuery = (
/\/dp\//.test(location.href) ? ('Tell me more about this product, including benefits and the brand if possible.'
+ ' Also talk about similar products in a markdown list. The product is: ' + document.title)
: /\/b\//.test(location.href) ? ('Tell me more about what to look for when shopping for this category: ' + document.title)
: 'Hi there'
/\/(?:dp|product)\//.test(location.href) ? (
'Tell me more about this product, including benefits and the brand if possible.'
+ ' Also talk about similar products in a markdown list. The product is: ' + document.title
) : /\/b\//.test(location.href) ? ( 'Tell me more about what to look for when shopping for this category: ' + document.title
) : 'Hi there'
)
let msgChain = [{ role: 'user', content: augmentQuery(firstQuery) }]
appAlert('waitingResponse') ; get.reply(msgChain)
Expand Down

0 comments on commit 7895f0f

Please sign in to comment.