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

Commit 45ad8e3

Browse files
authored
Merge pull request #8 from anaclumos/1.0.3
2 parents f8122c4 + 368dac8 commit 45ad8e3

File tree

9 files changed

+192
-3
lines changed

9 files changed

+192
-3
lines changed

package-lock.json

Lines changed: 73 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bing-chat-for-all-browsers",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "bing-chat-for-all-browsers",
55
"main": "index.js",
66
"scripts": {
@@ -35,6 +35,7 @@
3535
"ts-jest": "^27.0.5",
3636
"ts-loader": "^8.0.0",
3737
"typescript": "^4.4.3 ",
38+
"url-loader": "^4.1.1",
3839
"webpack": "^5.61.0",
3940
"webpack-cli": "^4.0.0",
4041
"webpack-merge": "^5.0.0"

public/chrome.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "Bing Chat for All Browsers",
44
"description": "Bing Chat for All Browsers",
5-
"version": "1.0.2",
5+
"version": "1.0.3",
66
"icons": {
77
"16": "icon16.png",
88
"32": "icon32.png",
@@ -11,6 +11,9 @@
1111
"512": "icon512.png",
1212
"1024": "icon1024.png"
1313
},
14+
"action": {
15+
"default_popup": "popup.html"
16+
},
1417
"declarative_net_request": {
1518
"rule_resources": [
1619
{

public/firefox.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
"manifest_version": 2,
33
"name": "Bing Chat for All Browsers",
44
"description": "Bing Chat for All Browsers",
5-
"version": "1.0.2",
5+
"version": "1.0.3",
66
"background": {
77
"scripts": ["js/background.js"]
88
},
9+
"browser_action": {
10+
"default_popup": "popup.html"
11+
},
912
"icons": {
1013
"16": "icon16.png",
1114
"32": "icon32.png",

public/popup.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Bing Chat for All Browsers</title>
6+
<script src="js/vendor.js"></script>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script src="js/popup.js"></script>
11+
</body>
12+
</html>

release/chrome.zip

50.8 KB
Binary file not shown.

release/firefox.zip

50.8 KB
Binary file not shown.

src/popup.tsx

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
<a
10+
href="https://bing.com/chat"
11+
target="_blank"
12+
rel="noreferrer noopener nofollow"
13+
style={{ textDecoration: 'none' }}
14+
>
15+
<div style={{ display: 'grid', placeItems: 'center', width: '300px', height: '100px' }}>
16+
<button
17+
style={{
18+
backgroundColor: 'white',
19+
color: 'black',
20+
border: '1px solid rgb(156 163 175)',
21+
padding: '10px 20px',
22+
borderRadius: '5px',
23+
fontSize: '1rem',
24+
cursor: 'pointer',
25+
boxShadow: '0 0 0 1px rgb(156 163 175), 0 1px 3px 0 rgb(156 163 175)',
26+
}}
27+
>
28+
<img src={BingIcon} style={{ width: '1rem', height: '1rem', padding: 'auto', verticalAlign: 'middle' }} />
29+
<span style={{ margin: 'auto auto auto 5px', fontSize: '0.8rem' }}>Open Bing Chat</span>
30+
</button>
31+
</div>
32+
</a>
33+
<p
34+
style={{
35+
margin: '0 10px',
36+
width: '300px',
37+
fontFamily:
38+
"ui-rounded, 'SF Pro Rounded', 'SF NS Rounded', ui-sans-serif, -apple-system, BlinkMacSystemFont, system-ui, -system-ui, sans-serif",
39+
fontSize: '0.8rem',
40+
fontWeight: 400,
41+
lineHeight: '1.5',
42+
color: 'rgb(156 163 175)',
43+
}}
44+
>
45+
Found a Bug?{' '}
46+
<a
47+
href="https://github.com/anaclumos/bing-chat-for-all-browsers"
48+
target="_blank"
49+
rel="noreferrer noopener nofollow"
50+
style={{ color: 'black', textDecoration: 'underline' }}
51+
>
52+
Let me know on GitHub
53+
</a>
54+
{'.'}
55+
<br />
56+
Leave us a review for{' '}
57+
<a
58+
href="https://chrome.google.com/webstore/detail/bing-chat-for-all-browser/jofbglonpbndadajbafmmaklbfbkggpo"
59+
target="_blank"
60+
rel="noreferrer noopener nofollow"
61+
style={{ color: 'black', textDecoration: 'underline' }}
62+
>
63+
Chrome
64+
</a>{' '}
65+
or{' '}
66+
<a
67+
href="https://addons.mozilla.org/en-US/firefox/addon/bing-chat-for-all-browsers/"
68+
target="_blank"
69+
rel="noreferrer noopener nofollow"
70+
style={{ color: 'black', textDecoration: 'underline' }}
71+
>
72+
Firefox
73+
</a>
74+
.
75+
</p>
76+
</>
77+
)
78+
}
79+
80+
ReactDOM.render(
81+
<React.StrictMode>
82+
<Popup />
83+
</React.StrictMode>,
84+
document.getElementById('root')
85+
)

webpack/webpack.common.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const srcDir = path.join(__dirname, '..', 'src')
33

44
module.exports = {
55
entry: {
6+
popup: path.join(srcDir, 'popup.tsx'),
67
background: path.join(srcDir, 'background.ts'),
78
},
89
output: {
@@ -24,6 +25,17 @@ module.exports = {
2425
use: 'ts-loader',
2526
exclude: /node_modules/,
2627
},
28+
{
29+
test: /\.(png|jpg|gif)$/i,
30+
use: [
31+
{
32+
loader: 'url-loader',
33+
options: {
34+
limit: 8192,
35+
},
36+
},
37+
],
38+
},
2739
],
2840
},
2941
resolve: {

0 commit comments

Comments
 (0)