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

Commit

Permalink
release v1
Browse files Browse the repository at this point in the history
  • Loading branch information
anaclumos committed Feb 12, 2023
1 parent 4387493 commit 43b2d58
Show file tree
Hide file tree
Showing 28 changed files with 168 additions and 12 deletions.
34 changes: 31 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"watch": "webpack --config webpack/webpack.dev.js --watch",
"build": "webpack --config webpack/webpack.chrome.js & webpack --config webpack/webpack.firefox.js",
"clean": "rimraf dist",
"clean": "rimraf release",
"test": "npx jest",
"style": "prettier --write \"**/*.{ts,tsx,json,js,jsx,css,scss,html,md}\""
},
Expand Down
Binary file added release/chrome/favicon.ico
Binary file not shown.
18 changes: 18 additions & 0 deletions release/chrome/firefox.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"manifest_version": 2,
"name": "Bing Chat for All Browsers",
"description": "Bing Chat for All Browsers",
"version": "1.0",
"background": {
"scripts": ["js/background.js"]
},
"icons": {
"16": "icon16.png",
"32": "icon32.png",
"128": "icon128.png",
"192": "icon192.png",
"512": "icon512.png",
"1024": "icon1024.png"
},
"permissions": ["webRequest", "webRequestBlocking", "http://*.bing.com/*", "https://*.bing.com/*"]
}
Binary file added release/chrome/icon1024.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added release/chrome/icon128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added release/chrome/icon16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added release/chrome/icon192.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added release/chrome/icon32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added release/chrome/icon512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions release/chrome/js/background.js

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

25 changes: 25 additions & 0 deletions release/chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"manifest_version": 3,
"name": "Bing Chat for All Browsers",
"description": "Bing Chat for All Browsers",
"version": "1.0",
"icons": {
"16": "icon16.png",
"32": "icon32.png",
"128": "icon128.png",
"192": "icon192.png",
"512": "icon512.png",
"1024": "icon1024.png"
},
"declarative_net_request": {
"rule_resources": [
{
"id": "1",
"enabled": true,
"path": "rules.json"
}
]
},
"permissions": ["webRequest", "declarativeNetRequest"],
"host_permissions": ["http://*.bing.com/*", "https://*.bing.com/*"]
}
20 changes: 20 additions & 0 deletions release/chrome/rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"id": 1,
"priority": 1,
"action": {
"type": "modifyHeaders",
"requestHeaders": [
{
"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"
}
]
},
"condition": {
"regexFilter": ".*bing\\.com.*",
"resourceTypes": ["main_frame"]
}
}
]
25 changes: 25 additions & 0 deletions release/firefox/chrome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"manifest_version": 3,
"name": "Bing Chat for All Browsers",
"description": "Bing Chat for All Browsers",
"version": "1.0",
"icons": {
"16": "icon16.png",
"32": "icon32.png",
"128": "icon128.png",
"192": "icon192.png",
"512": "icon512.png",
"1024": "icon1024.png"
},
"declarative_net_request": {
"rule_resources": [
{
"id": "1",
"enabled": true,
"path": "rules.json"
}
]
},
"permissions": ["webRequest", "declarativeNetRequest"],
"host_permissions": ["http://*.bing.com/*", "https://*.bing.com/*"]
}
Binary file added release/firefox/favicon.ico
Binary file not shown.
Binary file added release/firefox/icon1024.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added release/firefox/icon128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added release/firefox/icon16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added release/firefox/icon192.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added release/firefox/icon32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added release/firefox/icon512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions release/firefox/js/background.js

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

18 changes: 18 additions & 0 deletions release/firefox/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"manifest_version": 2,
"name": "Bing Chat for All Browsers",
"description": "Bing Chat for All Browsers",
"version": "1.0",
"background": {
"scripts": ["js/background.js"]
},
"icons": {
"16": "icon16.png",
"32": "icon32.png",
"128": "icon128.png",
"192": "icon192.png",
"512": "icon512.png",
"1024": "icon1024.png"
},
"permissions": ["webRequest", "webRequestBlocking", "http://*.bing.com/*", "https://*.bing.com/*"]
}
20 changes: 20 additions & 0 deletions release/firefox/rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"id": 1,
"priority": 1,
"action": {
"type": "modifyHeaders",
"requestHeaders": [
{
"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"
}
]
},
"condition": {
"regexFilter": ".*bing\\.com.*",
"resourceTypes": ["main_frame"]
}
}
]
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"esModuleInterop": true,
"sourceMap": false,
"rootDir": "src",
"outDir": "dist/js",
"outDir": "release/js",
"noEmitOnError": true,
"jsx": "react",
"typeRoots": ["node_modules/@types"]
Expand Down
6 changes: 3 additions & 3 deletions webpack/webpack.chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const common = require('./webpack.common.js')
module.exports = merge(common, {
mode: 'production',
output: {
path: path.join(__dirname, '../dist/chrome/js'),
path: path.join(__dirname, '../release/chrome/js'),
filename: '[name].js',
},
plugins: [
Expand All @@ -16,9 +16,9 @@ module.exports = merge(common, {
from: './public',
to: ({ absoluteFilename }) => {
if (absoluteFilename.endsWith('chrome.json')) {
return path.join(__dirname, '../dist/chrome') + '/manifest.json'
return path.join(__dirname, '../release/chrome') + '/manifest.json'
} else {
return path.join(__dirname, '../dist/chrome') + '/[name][ext]'
return path.join(__dirname, '../release/chrome') + '/[name][ext]'
}
},
},
Expand Down
2 changes: 1 addition & 1 deletion webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
background: path.join(srcDir, 'background.ts'),
},
output: {
path: path.join(__dirname, '../dist/js'),
path: path.join(__dirname, '../release/js'),
filename: '[name].js',
},
optimization: {
Expand Down
6 changes: 3 additions & 3 deletions webpack/webpack.firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const common = require('./webpack.common.js')
module.exports = merge(common, {
mode: 'production',
output: {
path: path.join(__dirname, '../dist/firefox/js'),
path: path.join(__dirname, '../release/firefox/js'),
filename: '[name].js',
},
plugins: [
Expand All @@ -16,9 +16,9 @@ module.exports = merge(common, {
from: './public',
to: ({ absoluteFilename }) => {
if (absoluteFilename.endsWith('firefox.json')) {
return path.join(__dirname, '../dist/firefox') + '/manifest.json'
return path.join(__dirname, '../release/firefox') + '/manifest.json'
} else {
return path.join(__dirname, '../dist/firefox') + '/[name][ext]'
return path.join(__dirname, '../release/firefox') + '/[name][ext]'
}
},
},
Expand Down

0 comments on commit 43b2d58

Please sign in to comment.