From b15db861a6b3f641be2136c966a1aa1cd8959d19 Mon Sep 17 00:00:00 2001 From: adamlui Date: Fri, 12 Jul 2024 07:13:21 +0000 Subject: [PATCH] =?UTF-8?q?Added=20link=20referralization=20=E2=86=9E=20[a?= =?UTF-8?q?uto-sync=20from=20`adamlui/chatgpt-apps`]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- greasemonkey/duckduckgpt.user.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/greasemonkey/duckduckgpt.user.js b/greasemonkey/duckduckgpt.user.js index 8a2102ffc97..c1398f110d8 100644 --- a/greasemonkey/duckduckgpt.user.js +++ b/greasemonkey/duckduckgpt.user.js @@ -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) @@ -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