Skip to content

Commit

Permalink
Fix / Brave
Browse files Browse the repository at this point in the history
  • Loading branch information
patrik-martinko committed Jul 17, 2023
1 parent d59e258 commit a334cbc
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 1 deletion.
8 changes: 8 additions & 0 deletions package-brave/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
chrome.webRequest.onBeforeSendHeaders.addListener(data => {
for (let header of data.requestHeaders) {
if (header.name.toLowerCase() === 'user-agent') {
header.value = navigator.userAgent.split('Gecko')[0] + 'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.58';
}
}
return { requestHeaders: data.requestHeaders };
}, { urls: ['https://*.bing.com/*'] }, ['blocking', 'requestHeaders']);
Binary file added package-brave/icon-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added package-brave/icon-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added package-brave/icon-240.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added package-brave/icon-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions package-brave/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"manifest_version": 2,
"name": "Bing AI for Brave",
"description": "Allows using Bing AI chatbot with Brave.",
"version": "1.0.0",
"permissions": [
"webRequest",
"webRequestBlocking",
"https://*.bing.com/*"
],
"background": {
"scripts": [
"background.js"
]
},
"icons": {
"16": "icon-16.png",
"48": "icon-48.png",
"128": "icon-128.png"
}
}
2 changes: 1 addition & 1 deletion package/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Bing AI for Chrome",
"description": "This extension allows using Bing AI chatbot with Google Chrome and other Chromium browsers.",
"description": "Allows using Bing AI chatbot with Google Chrome and other Chromium browsers.",
"version": "1.0.0",
"permissions": [
"declarativeNetRequest"
Expand Down
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Allows using Bing AI chatbot with Google Chrome and other Chromium browsers.

[Install from Chrome Web Store](https://chrome.google.com/webstore/detail/bing-ai-for-chrome/oofdkcckpabclngcdjnkhlldcfadlfmh)

## Brave Browser

The latest version of Brave has a [bug](https://github.com/brave/brave-browser/issues/30785) that breaks the functionality so please download and install the separate package manually (Chrome Webstore doesn't support extensions with manifest v2).

## With extension in Brave

![Screenshot](screenshot-brave.jpg)
Expand Down

0 comments on commit a334cbc

Please sign in to comment.