├── .github ├── FUNDING.yml └── workflows │ └── staml.yaml ├── .gitattributes ├── misc ├── chrome.png ├── bing.afphoto ├── firefox.png ├── chrome-download.png └── firefox-download.png ├── public ├── favicon.ico ├── icon128.png ├── icon16.png ├── icon192.png ├── icon32.png ├── icon512.png ├── icon1024.png ├── popup.html ├── firefox.json ├── chrome.json └── rules.json ├── release ├── chrome.zip └── firefox.zip ├── jest.config.js ├── .prettierrc ├── README.md ├── tsconfig.json ├── rules.json ├── install.md ├── webpack ├── webpack.chrome.js ├── webpack.firefox.js └── webpack.common.js ├── LICENSE ├── uninstall.md ├── package.json ├── .gitignore └── src ├── background.ts └── popup.tsx /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: anaclumos 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | webpack/*.js linguist-language=TypeScript 2 | -------------------------------------------------------------------------------- /misc/chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/misc/chrome.png -------------------------------------------------------------------------------- /misc/bing.afphoto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/misc/bing.afphoto -------------------------------------------------------------------------------- /misc/firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/misc/firefox.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/public/icon128.png -------------------------------------------------------------------------------- /public/icon16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/public/icon16.png -------------------------------------------------------------------------------- /public/icon192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/public/icon192.png -------------------------------------------------------------------------------- /public/icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/public/icon32.png -------------------------------------------------------------------------------- /public/icon512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/public/icon512.png -------------------------------------------------------------------------------- /release/chrome.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/release/chrome.zip -------------------------------------------------------------------------------- /public/icon1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/public/icon1024.png -------------------------------------------------------------------------------- /release/firefox.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/release/firefox.zip -------------------------------------------------------------------------------- /misc/chrome-download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/misc/chrome-download.png -------------------------------------------------------------------------------- /misc/firefox-download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anaclumos/bing-chat-for-all-browsers/HEAD/misc/firefox-download.png -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | roots: ['src'], 3 | transform: { 4 | '^.+\\.ts$': 'ts-jest', 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "arrowParens": "always", 5 | "tabWidth": 2, 6 | "useTabs": false, 7 | "printWidth": 120, 8 | "trailingComma": "es5", 9 | "endOfLine": "lf", 10 | "bracketSpacing": true 11 | } 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Bing Chat for All Browsers 4 | 5 | > **Warning**
I am shutting down the extension. https://github.com/anaclumos/bing-chat-for-all-browsers/issues/119 6 | 7 | -------------------------------------------------------------------------------- /public/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bing Chat for All Browsers 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "module": "commonjs", 5 | "target": "es6", 6 | "esModuleInterop": true, 7 | "sourceMap": false, 8 | "rootDir": "src", 9 | "outDir": "release/js", 10 | "noEmitOnError": true, 11 | "jsx": "react", 12 | "typeRoots": ["node_modules/@types"] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /rules.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "priority": 1, 5 | "action": { 6 | "type": "modifyHeaders", 7 | "requestHeaders": [ 8 | { 9 | "header": "User-Agent", 10 | "operation": "set", 11 | "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" 12 | } 13 | ] 14 | }, 15 | "condition": { 16 | "regexFilter": ".*bing\\.com.*", 17 | "resourceTypes": ["main_frame"] 18 | } 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /public/firefox.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Bing Chat for All Browsers", 4 | "description": "Bing Chat for All Browsers", 5 | "version": "1.0.7", 6 | "background": { 7 | "scripts": ["js/background.js"] 8 | }, 9 | "browser_action": { 10 | "default_popup": "popup.html" 11 | }, 12 | "icons": { 13 | "16": "icon16.png", 14 | "32": "icon32.png", 15 | "128": "icon128.png", 16 | "192": "icon192.png", 17 | "512": "icon512.png", 18 | "1024": "icon1024.png" 19 | }, 20 | "permissions": ["webRequest", "webRequestBlocking", "http://*.bing.com/*", "https://*.bing.com/*"] 21 | } 22 | -------------------------------------------------------------------------------- /.github/workflows/staml.yaml: -------------------------------------------------------------------------------- 1 | name: Close inactive issues 2 | on: 3 | schedule: 4 | - cron: "59 2 * * *" 5 | 6 | jobs: 7 | close-issues: 8 | runs-on: ubuntu-latest 9 | permissions: 10 | issues: write 11 | pull-requests: write 12 | steps: 13 | - uses: actions/stale@v5 14 | with: 15 | days-before-issue-stale: 30 16 | days-before-issue-close: 14 17 | stale-issue-label: "stale" 18 | stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." 19 | close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." 20 | days-before-pr-stale: -1 21 | days-before-pr-close: -1 22 | repo-token: ${{ secrets.GITHUB_TOKEN }} 23 | -------------------------------------------------------------------------------- /install.md: -------------------------------------------------------------------------------- 1 | # Welcome! 2 | 3 | Some of the common problems people get: 4 | 5 | - Clear the cache and cookies on bing.com. 6 | - Whitelist bing.com if you have any Adblock or VPN. 7 | - Bing Chat is not available in China. [Link](https://answers.microsoft.com/en-us/microsoftedge/forum/all/new-bingsorry-looks-like-you-no-longer-have-access/6d21c57f-0484-4a9a-a9ac-c46c706722cc) 8 | - Firefox Users, you **must** use version 110 or up! Please update your browser. 9 | 10 | ## Check out [Oneliner News](https://hn.cho.sh/subscribe?ref=bing-chat-readme)! 11 | 12 | - ✅ AI 🤖 newsletter that reads 3M+ words from Tech News every day, and curates you an **industry report**! 13 | - ✅ Loved by engineers at Apple, Microsoft, Amazon, Goldman Sachs, and More 14 | - ✅ Completely Free 15 | - ✅ State-of-the-art i18n, Supports 29 Languages 16 | -------------------------------------------------------------------------------- /public/chrome.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 3, 3 | "name": "Bing Chat for All Browsers", 4 | "description": "Bing Chat for All Browsers", 5 | "version": "1.0.7", 6 | "icons": { 7 | "16": "icon16.png", 8 | "32": "icon32.png", 9 | "128": "icon128.png", 10 | "192": "icon192.png", 11 | "512": "icon512.png", 12 | "1024": "icon1024.png" 13 | }, 14 | "action": { 15 | "default_popup": "popup.html" 16 | }, 17 | "background": { 18 | "service_worker": "js/background.js" 19 | }, 20 | "declarative_net_request": { 21 | "rule_resources": [ 22 | { 23 | "id": "1", 24 | "enabled": true, 25 | "path": "rules.json" 26 | } 27 | ] 28 | }, 29 | "permissions": ["webRequest", "declarativeNetRequestWithHostAccess"], 30 | "host_permissions": ["http://*.bing.com/*", "https://*.bing.com/*"] 31 | } 32 | -------------------------------------------------------------------------------- /webpack/webpack.chrome.js: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge') 2 | const CopyPlugin = require('copy-webpack-plugin') 3 | const path = require('path') 4 | const common = require('./webpack.common.js') 5 | const webpack = require("webpack"); 6 | 7 | module.exports = merge(common, { 8 | mode: 'production', 9 | output: { 10 | path: path.join(__dirname, '../release/chrome/js'), 11 | filename: '[name].js', 12 | }, 13 | plugins: [ 14 | new webpack.DefinePlugin({ 15 | firefox: JSON.stringify(false), 16 | }), 17 | new CopyPlugin({ 18 | patterns: [ 19 | { 20 | from: './public', 21 | to: ({ absoluteFilename }) => { 22 | if (absoluteFilename.endsWith('chrome.json')) { 23 | return path.join(__dirname, '../release/chrome') + '/manifest.json' 24 | } else { 25 | return path.join(__dirname, '../release/chrome') + '/[name][ext]' 26 | } 27 | }, 28 | }, 29 | ], 30 | }), 31 | ], 32 | }) 33 | -------------------------------------------------------------------------------- /webpack/webpack.firefox.js: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge') 2 | const CopyPlugin = require('copy-webpack-plugin') 3 | const path = require('path') 4 | const common = require('./webpack.common.js') 5 | const webpack = require("webpack"); 6 | 7 | module.exports = merge(common, { 8 | mode: 'production', 9 | output: { 10 | path: path.join(__dirname, '../release/firefox/js'), 11 | filename: '[name].js', 12 | }, 13 | plugins: [ 14 | new webpack.DefinePlugin({ 15 | firefox: JSON.stringify(true), 16 | }), 17 | new CopyPlugin({ 18 | patterns: [ 19 | { 20 | from: './public', 21 | to: ({ absoluteFilename }) => { 22 | if (absoluteFilename.endsWith('firefox.json')) { 23 | return path.join(__dirname, '../release/firefox') + '/manifest.json' 24 | } else { 25 | return path.join(__dirname, '../release/firefox') + '/[name][ext]' 26 | } 27 | }, 28 | }, 29 | ], 30 | }), 31 | ], 32 | }) 33 | -------------------------------------------------------------------------------- /webpack/webpack.common.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const srcDir = path.join(__dirname, '..', 'src') 3 | 4 | module.exports = { 5 | entry: { 6 | popup: path.join(srcDir, 'popup.tsx'), 7 | background: path.join(srcDir, 'background.ts'), 8 | }, 9 | output: { 10 | path: path.join(__dirname, '../release/js'), 11 | filename: '[name].js', 12 | }, 13 | optimization: { 14 | splitChunks: { 15 | name: 'vendor', 16 | chunks(chunk) { 17 | return chunk.name !== 'background' 18 | }, 19 | }, 20 | }, 21 | module: { 22 | rules: [ 23 | { 24 | test: /\.tsx?$/, 25 | use: 'ts-loader', 26 | exclude: /node_modules/, 27 | }, 28 | { 29 | test: /\.(png|jpg|gif)$/i, 30 | use: [ 31 | { 32 | loader: 'url-loader', 33 | options: { 34 | limit: 8192, 35 | }, 36 | }, 37 | ], 38 | }, 39 | ], 40 | }, 41 | resolve: { 42 | extensions: ['.ts', '.tsx', '.js'], 43 | }, 44 | } 45 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Sunghyun Cho 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /uninstall.md: -------------------------------------------------------------------------------- 1 | # Give Me One More Chance! 2 | 3 | ### Most people fixed their problems with the following quick fixes: 4 | 5 | - Clear the cache and cookies on bing.com. 6 | - Whitelist bing.com if you have any Adblock or VPN. 7 | - Firefox Users, you **must** use version 110 or up! Please update your browser. 8 | - Or sometimes just refresh a couple times! Microsoft rushed their release, and it's still buggy. 9 | 10 | ### If you have many extensions: 11 | 12 | - Disable all extensions except this extension. 13 | - Clear Cache & Cookies on Bing, and freshly login to Bing. 14 | - Once you check that your Bing Chat works, you can re-enable all extensions again. 15 | 16 | ## Known Regional Locks: 17 | 18 | - Bing Chat is not available in China. [Link](https://answers.microsoft.com/en-us/microsoftedge/forum/all/new-bingsorry-looks-like-you-no-longer-have-access/6d21c57f-0484-4a9a-a9ac-c46c706722cc) 19 | 20 | ## Reinstall Links: 21 | 22 | 23 | 24 | Chrome Web Store 25 | 26 | 27 | Chrome Web Store 28 | 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bing-chat-for-all-browsers", 3 | "version": "1.0.7", 4 | "description": "bing-chat-for-all-browsers", 5 | "main": "index.js", 6 | "scripts": { 7 | "watch": "webpack --config webpack/webpack.dev.js --watch", 8 | "build": "$npm_execpath run clean && $npm_execpath run chrome && $npm_execpath run firefox", 9 | "chrome": "webpack --config webpack/webpack.chrome.js", 10 | "firefox": "webpack --config webpack/webpack.firefox.js", 11 | "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", 12 | "clean": "rimraf release", 13 | "test": "npx jest", 14 | "style": "prettier --write \"**/*.{ts,tsx,json,js,jsx,css,scss,html,md}\"", 15 | "zip": "cd release && rm -f chrome.zip && rm -f firefox.zip && cd chrome && zip -r ../chrome.zip -m .DS_Store * && cd ../firefox && zip -r ../firefox.zip -m .DS_Store * && cd .. && rm -rf chrome && rm -rf firefox" 16 | }, 17 | "author": "", 18 | "license": "MIT", 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/anaclumos/bing-chat-for-all-browsers.git" 22 | }, 23 | "dependencies": { 24 | "react": "^17.0.1", 25 | "react-dom": "^17.0.1", 26 | "webextension-polyfill-ts": "^0.26.0" 27 | }, 28 | "devDependencies": { 29 | "@types/chrome": "0.0.158", 30 | "@types/jest": "^27.0.2", 31 | "@types/react": "^17.0.0", 32 | "@types/react-dom": "^17.0.0", 33 | "copy-webpack-plugin": "^9.0.1", 34 | "file-loader": "^6.2.0", 35 | "glob": "^7.1.6", 36 | "jest": "^27.2.1", 37 | "prettier": "^2.2.1", 38 | "rimraf": "^3.0.2 ", 39 | "ts-jest": "^27.0.5", 40 | "ts-loader": "^8.0.0", 41 | "typescript": "^4.4.3 ", 42 | "url-loader": "^4.1.1", 43 | "webpack": "^5.61.0", 44 | "webpack-cli": "^4.0.0", 45 | "webpack-merge": "^5.0.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /public/rules.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "priority": 1, 5 | "action": { 6 | "type": "modifyHeaders", 7 | "requestHeaders": [ 8 | { 9 | "header": "User-Agent", 10 | "operation": "set", 11 | "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.48" 12 | }, 13 | { 14 | "header": "useragentreductionoptout", 15 | "operation": "set", 16 | "value": "A7kgTC5xdZ2WIVGZEfb1hUoNuvjzOZX3VIV/BA6C18kQOOF50Q0D3oWoAm49k3BQImkujKILc7JmPysWk3CSjwUAAACMeyJvcmlnaW4iOiJodHRwczovL3d3dy5iaW5nLmNvbTo0NDMiLCJmZWF0dXJlIjoiU2VuZEZ1bGxVc2VyQWdlbnRBZnRlclJlZHVjdGlvbiIsImV4cGlyeSI6MTY4NDg4NjM5OSwiaXNTdWJkb21haW4iOnRydWUsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=" 17 | }, 18 | { 19 | "header": "Sec-CH-UA", 20 | "operation": "set", 21 | "value": "\"Chromium\";v=\"112\", \"Microsoft Edge\";v=\"112\", \"Not:A-Brand\";v=\"99\"" 22 | }, 23 | { 24 | "header": "Sec-CH-UA-Arch", 25 | "operation": "set", 26 | "value": "x86" 27 | }, 28 | { 29 | "header": "Sec-CH-UA-Bitness", 30 | "operation": "set", 31 | "value": "64" 32 | }, 33 | { 34 | "header": "Sec-CH-UA-Full-Version", 35 | "operation": "set", 36 | "value": "112.0.1722.48" 37 | }, 38 | { 39 | "header": "Sec-CH-UA-Full-Version-List", 40 | "operation": "set", 41 | "value": "\"Chromium\";v=\"112.0.5615.121\", \"Microsoft Edge\";v=\"112.0.1722.48\", \"Not:A-Brand\";v=\"99.0.0.0\"" 42 | }, 43 | { 44 | "header": "Sec-MS-GEC-Version", 45 | "operation": "set", 46 | "value": "1-112.0.1722.48" 47 | } 48 | ] 49 | }, 50 | "condition": { 51 | "regexFilter": ".*bing.com.*", 52 | "resourceTypes": ["main_frame"] 53 | } 54 | } 55 | ] 56 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | dist 93 | 94 | # Gatsby files 95 | .cache/ 96 | # Comment in the public line in if your project uses Gatsby and not Next.js 97 | # https://nextjs.org/blog/next-9-1#public-directory-support 98 | # public 99 | 100 | # vuepress build output 101 | .vuepress/dist 102 | 103 | # vuepress v2.x temp and cache directory 104 | .temp 105 | .cache 106 | 107 | # Docusaurus cache and generated files 108 | .docusaurus 109 | 110 | # Serverless directories 111 | .serverless/ 112 | 113 | # FuseBox cache 114 | .fusebox/ 115 | 116 | # DynamoDB Local files 117 | .dynamodb/ 118 | 119 | # TernJS port file 120 | .tern-port 121 | 122 | # Stores VSCode versions used for testing VSCode extensions 123 | .vscode-test 124 | 125 | # yarn v2 126 | .yarn/cache 127 | .yarn/unplugged 128 | .yarn/build-state.yml 129 | .yarn/install-state.gz 130 | .pnp.* 131 | -------------------------------------------------------------------------------- /src/background.ts: -------------------------------------------------------------------------------- 1 | // ** How this works ** // 2 | /* 3 | Microsoft Bing checks if the user agent is a represents a Chromium Browser (as Microsoft Edge is based on Chromium), 4 | then it checks if it is the Microsoft Edge Browser by using the suffix Microsoft Bing adds to the user agent to enable Bing Chat. 5 | 6 | This limitation of Bing Chat to only Microsoft Edge users is a synthetic limitation, as it is possible to spoof the user agent to make Bing Chat work on other browsers. 7 | 8 | On Chrome (and other chromium based browsers): it will simply append the Microsoft Edge useragent suffix to the user agent 9 | On Firefox it will replace the entire user agent with a hard coded Chrome user agent with the Microsoft Edge useragent suffix appended to it. 10 | */ 11 | 12 | declare var firefox: boolean | undefined; 13 | 14 | //Microsoft Edge has two user agent suffixes, one for mobile and one for desktop 15 | const MOBILE_UA_SUFFIX = 'EdgA/42.0.0.2057' 16 | const DESKTOP_UA_SUFFIX = 'Edg/112.0.1722.48' 17 | 18 | const DESKTOP_UA_PREFIX = 19 | 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36' 20 | const MOBILE_UA_PREFIX = 21 | 'Mozilla/5.0 (Linux; Android 8.1.0; Pixel Build/OPM4.171019.021.D1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.109 Mobile Safari/537.36' 22 | 23 | //formulate the UserAgent 24 | const uaMaker = (isMobile: boolean): string => { 25 | if (firefox) { 26 | //on Firefox, we replace the entire user agent with a hard coded Chrome user agent with the Microsoft Edge useragent suffix appended to it. 27 | if (isMobile) { 28 | return `${MOBILE_UA_PREFIX} ${MOBILE_UA_SUFFIX}` 29 | } 30 | } 31 | return `${DESKTOP_UA_PREFIX} ${DESKTOP_UA_SUFFIX}` 32 | } 33 | 34 | 35 | chrome.webRequest.onBeforeSendHeaders.addListener((details) => { 36 | const { requestHeaders } = details 37 | 38 | if (!requestHeaders) 39 | return undefined 40 | 41 | const newHeaders = requestHeaders.map((header) => { 42 | if (header.name.toLowerCase() === 'user-agent') { 43 | const isMobile: boolean = header.value?.toLowerCase().includes('mobile') ?? false; 44 | header.value = uaMaker(isMobile); 45 | } 46 | return header 47 | }) 48 | return { requestHeaders: newHeaders } 49 | }, 50 | { urls: ['*://*.bing.com/*'] }, 51 | ['blocking', 'requestHeaders'] 52 | ); 53 | 54 | chrome.runtime.onInstalled.addListener((object) => { 55 | let install = 'http://github.com/anaclumos/bing-chat-for-all-browsers/tree/main/install.md' 56 | if (object.reason.toLowerCase().includes('install')) { 57 | chrome.tabs.create({ url: install }) 58 | } 59 | }) 60 | 61 | chrome.runtime.setUninstallURL('http://github.com/anaclumos/bing-chat-for-all-browsers/tree/main/uninstall.md') 62 | -------------------------------------------------------------------------------- /src/popup.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom' 3 | // @ts-ignore 4 | import BingIcon from '../public/icon1024.png' 5 | 6 | const Popup = () => { 7 | return ( 8 | <> 9 | { 12 | chrome.tabs.create({ 13 | url: 'https://bing.com/chat', 14 | }) 15 | }} 16 | > 17 |
18 | 33 |
34 |
35 |

47 | Leave me a review for{' '} 48 | { 51 | chrome.tabs.create({ 52 | url: 53 | 'https://chrome.google.com/webstore/detail/bing-chat-for-all-browser/jofbglonpbndadajbafmmaklbfbkggpo', 54 | }) 55 | }} 56 | > 57 | Chrome 58 | {' '} 59 | or{' '} 60 | { 63 | chrome.tabs.create({ 64 | url: 'https://addons.mozilla.org/en-US/firefox/addon/bing-chat-for-all-browsers/', 65 | }) 66 | }} 67 | > 68 | Firefox 69 | 70 | .
71 |
72 | Please check out{' '} 73 | { 76 | chrome.tabs.create({ 77 | url: 'https://hn.cho.sh/?ref=bingchat&utm_source=bingchat&utm_medium=extension&utm_campaign=bingchat', 78 | }) 79 | }} 80 | > 81 | Oneliner News 82 | {' '} 83 | — my newsletter AI that reads 3M+ words a day and gives you an one-liner explanation. 84 |
85 |
86 | Solution for common problems. Clear Cache and Cookies on Bing. Disable VPN or Adblock on Bing. 87 | Make sure you are logged-in with Microsoft account with Bing Chat enabled. If you still have problems,{' '} 88 | { 91 | chrome.tabs.create({ 92 | url: 'https://github.com/anaclumos/bing-chat-for-all-browsers', 93 | }) 94 | }} 95 | > 96 | Let me know on GitHub 97 | 98 | {'. '} 99 |

100 | 101 | ) 102 | } 103 | 104 | ReactDOM.render( 105 | 106 | 107 | , 108 | document.getElementById('root') 109 | ) 110 | --------------------------------------------------------------------------------