Skip to content

Commit

Permalink
Added exit on support bot, split debug logs ↞ [auto-sync from `adamlu…
Browse files Browse the repository at this point in the history
…i/ai-web-extensions`]
  • Loading branch information
kudo-sync-bot committed Nov 1, 2024
1 parent f46b2d8 commit 54f5691
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions greasemonkey/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.27
// @version 2024.10.31
// @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 @@ -2829,7 +2829,13 @@

log.debug('Registering toolbar menu...') ; menu.register() ; log.debug('Success! Menu registered')

if (document.querySelector('form[action*="Captcha"], a > img[src*="/error"]')) return log.debug('Exited from Captcha/404 page')
// Exit on specific pages
if (location.pathname == '/message-us')
return log.debug('Exited from support bot')
else if (document.querySelector('form[action*="Captcha"]'))
return log.debug('Exited from Captcha page')
else if (document.querySelector('a > img[src*="/error"]'))
return log.debug('Exited from 404 page')

// Create/ID/classify/listenerize amzgpt container
const appDiv = document.createElement('div') ; appDiv.id = 'amzgpt'
Expand Down

0 comments on commit 54f5691

Please sign in to comment.