Skip to content

Commit

Permalink
Added optional chaining to isEdge to support non-Chromium envs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Jun 21, 2024
1 parent 4f52975 commit 686014a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bravegpt/greasemonkey/bravegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
// @description:zu Faka izimpendulo ze-AI eceleni kwe-Brave Search. Buza kusuka kunoma yisiphi isiza. Ixhaswe yi-GPT-4o!
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.6.21.4
// @version 2024.6.21.5
// @license MIT
// @icon https://media.bravegpt.com/images/icons/bravegpt/icon48.png?0a9e287
// @icon64 https://media.bravegpt.com/images/icons/bravegpt/icon64.png?0a9e287
Expand Down Expand Up @@ -765,7 +765,7 @@ setTimeout(async () => {

// Init BROWSER FLAGS
const isFirefox = chatgpt.browser.isFirefox(),
isEdge = JSON.stringify(navigator.userAgentData.brands)?.includes('Edge'),
isEdge = JSON.stringify(navigator.userAgentData?.brands)?.includes('Edge'),
isMobile = chatgpt.browser.isMobile(),
isBraveSERP = /^https:\/\/search\.brave\.[^/]+\/search\?/.test(document.location.href)

Expand Down
4 changes: 2 additions & 2 deletions duckduckgpt/greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
// @description:zu Faka izimpendulo ze-AI eceleni kwe-DuckDuckGo. Buza kusuka kunoma yisiphi isiza. Ixhaswe yi-GPT-4o!
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.6.21.4
// @version 2024.6.21.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
Expand Down Expand Up @@ -765,7 +765,7 @@

// Init BROWSER FLAGS
const isFirefox = chatgpt.browser.isFirefox(),
isEdge = JSON.stringify(navigator.userAgentData.brands)?.includes('Edge'),
isEdge = JSON.stringify(navigator.userAgentData?.brands)?.includes('Edge'),
isMobile = chatgpt.browser.isMobile(),
isDDGserp = /^https:\/\/(?:www\.)?duckduckgo\.[^/]+\/\?/.test(document.location.href)

Expand Down
4 changes: 2 additions & 2 deletions googlegpt/greasemonkey/googlegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search. Buza kuphi noma yikuphi usayithi. Inikwa amandla yi-Google Gemma + GPT-4o!
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.6.21.5
// @version 2024.6.21.6
// @license MIT
// @icon https://media.googlegpt.io/images/icons/googlegpt/black/icon48.png?8652a6e
// @icon64 https://media.googlegpt.io/images/icons/googlegpt/black/icon64.png?8652a6e
Expand Down Expand Up @@ -962,7 +962,7 @@

// Init ENV FLAGS
const isFirefox = chatgpt.browser.isFirefox(),
isEdge = JSON.stringify(navigator.userAgentData.brands)?.includes('Edge'),
isEdge = JSON.stringify(navigator.userAgentData?.brands)?.includes('Edge'),
isMobile = chatgpt.browser.isMobile(),
isGoogleSERP = /^https:\/\/(?:www\.)?google\.[^/]+\/search\?/.test(document.location.href)
&& !document.location.search.includes('&udm=2') // exclude Google Images
Expand Down

0 comments on commit 686014a

Please sign in to comment.