Skip to content

Commit

Permalink
Added link referralization ↞ [auto-sync from adamlui/chatgpt-apps]
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui authored and kudo-sync-bot committed Jul 12, 2024
1 parent bf1ac29 commit b15db86
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.7.11.4
// @version 2024.7.11.5
// @license MIT
// @icon https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302
// @icon64 https://media.ddgpt.com/images/icons/duckduckgpt/icon64.png?af89302
// @antifeature ads A very tiny text ad displays below DuckDuckGPT chatbar (only in Sidebar mode). This motivates me to spend otherwise unpaid time upgrading script w/ new features & APIs.
// @antifeature referral-link
// @compatible chrome except for Streaming Mode w/ Tampermonkey (use ScriptCat instead)
// @compatible firefox
// @compatible edge except for Streaming Mode w/ Tampermonkey (use ScriptCat instead)
Expand Down Expand Up @@ -3018,6 +3019,13 @@
}
})

// REFERRALIZE links to support author
setTimeout(() =>
document.querySelectorAll('a[href^="https://www.amazon."]').forEach(anchor => {
const url = new URL(anchor.href) ; url.searchParams.set('tag', 'kudo-ai-20')
anchor.href = url.toString()
}), 1500)

// Show STANDBY mode or get/show ANSWER
let msgChain = [{ role: 'user', content: augmentQuery(new URL(location.href).searchParams.get('q')) }]
if (!config.autoGet && !/src=(?:first-run|asktip)/.test(location.href) // Auto-Get disabled and not queried from other site or 1st run
Expand Down

0 comments on commit b15db86

Please sign in to comment.