Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #64 from anaclumos/1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
anaclumos committed Apr 4, 2023
2 parents 06a36c6 + 4250b76 commit 4986b74
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 58 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

# Bing Chat for All Browsers

> **Note**<br/>
> **You need a Microsoft account that has access to the new Bing Chat to use this extension!**
> **Note**<br/> > **You need a Microsoft account that has access to the new Bing Chat to use this extension!**
> If you don't have access to the new Bing Chat, you can join the waitlist at [bing.com/chat](https://bing.com/chat).

## [Chrome](https://chrome.google.com/webstore/detail/bing-chat-for-all-browser/jofbglonpbndadajbafmmaklbfbkggpo)

N/A. It should work out of the box!
Expand Down
64 changes: 32 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"name": "bing-chat-for-all-browsers",
"version": "1.0.4",
"version": "1.0.5",
"description": "bing-chat-for-all-browsers",
"main": "index.js",
"scripts": {
"watch": "webpack --config webpack/webpack.dev.js --watch",
"build": "$npm_execpath run clean && webpack --config webpack/webpack.chrome.js && webpack --config webpack/webpack.firefox.js",
"build": "$npm_execpath run clean && $npm_execpath run chrome && $npm_execpath run firefox",
"chrome": "webpack --config webpack/webpack.chrome.js",
"firefox": "webpack --config webpack/webpack.firefox.js",
"safari": "xcrun safari-web-extension-converter release/firefox --swift --no-open --copy-resources --project-location safari --force --bundle-identifier sh.cho.bing-chat-for-all-browsers",
"clean": "rimraf release",
"test": "npx jest",
"style": "prettier --write \"**/*.{ts,tsx,json,js,jsx,css,scss,html,md}\"",
Expand Down
4 changes: 2 additions & 2 deletions public/chrome.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Bing Chat for All Browsers",
"description": "Bing Chat for All Browsers",
"version": "1.0.4",
"version": "1.0.5",
"icons": {
"16": "icon16.png",
"32": "icon32.png",
Expand All @@ -23,6 +23,6 @@
}
]
},
"permissions": ["webRequest", "declarativeNetRequest"],
"permissions": ["webRequest", "declarativeNetRequestWithHostAccess"],
"host_permissions": ["http://*.bing.com/*", "https://*.bing.com/*"]
}
2 changes: 1 addition & 1 deletion public/firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Bing Chat for All Browsers",
"description": "Bing Chat for All Browsers",
"version": "1.0.4",
"version": "1.0.5",
"background": {
"scripts": ["js/background.js"]
},
Expand Down
2 changes: 1 addition & 1 deletion public/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"header": "User-Agent",
"operation": "set",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.100.0"
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/111.0.1661.62"
}
]
},
Expand Down
Binary file added release/chrome.zip
Binary file not shown.
Binary file added release/firefox.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{
"header": "User-Agent",
"operation": "set",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.100.0"
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.61"
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ On Firefox it will replace the entire user agent with a hard coded Chrome user a

//Microsoft Edge has two user agent suffixes, one for mobile and one for desktop
const MOBILE_UA_SUFFIX = 'EdgA/110.0.1587.41'
const DESKTOP_UA_SUFFIX = 'Edg/110.0.100.0'
const DESKTOP_UA_SUFFIX = 'Edg/111.0.1661.62'

const DESKTOP_UA_PREFIX =
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36'
Expand Down Expand Up @@ -40,7 +40,7 @@ chrome.webRequest.onBeforeSendHeaders.addListener(
const newHeaders = requestHeaders.map((header) => {
if (header.name.toLowerCase() === 'user-agent') {
if (header.value?.toLowerCase().includes('mobile')) header.value = uaMaker(MOBILE_UA_SUFFIX, true)
else header.value = uaMaker(MOBILE_UA_SUFFIX, false)
else header.value = uaMaker(DESKTOP_UA_SUFFIX, false)
}
return header
})
Expand Down
45 changes: 31 additions & 14 deletions src/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ const Popup = () => {
style={{
backgroundColor: 'white',
color: 'black',
border: '1px solid rgb(156 163 175)',
border: '1px solid rgb(126 133 145)',
padding: '10px 20px',
borderRadius: '5px',
fontSize: '1rem',
cursor: 'pointer',
boxShadow: '0 0 0 1px rgb(156 163 175), 0 1px 3px 0 rgb(156 163 175)',
boxShadow: '0 0 0 1px rgb(126 133 145), 0 1px 3px 0 rgb(126 133 145)',
}}
>
<img src={BingIcon} style={{ width: '1rem', height: '1rem', padding: 'auto', verticalAlign: 'middle' }} />
Expand All @@ -41,44 +41,61 @@ const Popup = () => {
fontSize: '0.8rem',
fontWeight: 400,
lineHeight: '1.5',
color: 'rgb(156 163 175)',
color: 'rgb(126 133 145)',
}}
>
Found a Bug?{' '}
Leave me a review for{' '}
<a
style={{ color: 'black', textDecoration: 'underline', cursor: 'pointer' }}
onClick={() => {
chrome.tabs.create({
url: 'https://github.com/anaclumos/bing-chat-for-all-browsers',
url: 'https://chrome.google.com/webstore/detail/bing-chat-for-all-browser/jofbglonpbndadajbafmmaklbfbkggpo',
})
}}
>
Let me know on GitHub
Chrome
</a>{' '}
or{' '}
<a
style={{ color: 'black', textDecoration: 'underline', cursor: 'pointer' }}
onClick={() => {
chrome.tabs.create({
url: 'https://addons.mozilla.org/en-US/firefox/addon/bing-chat-for-all-browsers/',
})
}}
>
Firefox
</a>
{'. '}
Or, Leave us a review for{' '}
. <br />
<br />
If you love my work, please check out my other open-sourced AI project,{' '}
<a
style={{ color: 'black', textDecoration: 'underline', cursor: 'pointer' }}
onClick={() => {
chrome.tabs.create({
url: 'https://chrome.google.com/webstore/detail/bing-chat-for-all-browser/jofbglonpbndadajbafmmaklbfbkggpo',
url: 'https://hn.cho.sh/?ref=bingchat&utm_source=bingchat&utm_medium=extension&utm_campaign=bingchat',
})
}}
>
Chrome
hn.cho.sh
</a>{' '}
or{' '}
— a free AI-summarized newsletter for tech, supporting 29 languages, including Korean, Japanese, English,
Chinese and more.
<br />
<br />
<strong>Solution for common problems.</strong> Clear Cache and Cookies on Bing. Disable VPN or Adblock on Bing.
Make sure you are logged-in with Microsoft account with Bing Chat enabled. If you still have problems,{' '}
<a
style={{ color: 'black', textDecoration: 'underline', cursor: 'pointer' }}
onClick={() => {
chrome.tabs.create({
url: 'https://addons.mozilla.org/en-US/firefox/addon/bing-chat-for-all-browsers/',
url: 'https://github.com/anaclumos/bing-chat-for-all-browsers',
})
}}
>
Firefox
Let me know on GitHub
</a>
. Thank you!
{'. '}
</p>
</>
)
Expand Down

0 comments on commit 4986b74

Please sign in to comment.