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 #8 from anaclumos/1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
anaclumos committed Feb 20, 2023
2 parents f8122c4 + 368dac8 commit 45ad8e3
Show file tree
Hide file tree
Showing 9 changed files with 192 additions and 3 deletions.
73 changes: 73 additions & 0 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bing-chat-for-all-browsers",
"version": "1.0.2",
"version": "1.0.3",
"description": "bing-chat-for-all-browsers",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -35,6 +35,7 @@
"ts-jest": "^27.0.5",
"ts-loader": "^8.0.0",
"typescript": "^4.4.3 ",
"url-loader": "^4.1.1",
"webpack": "^5.61.0",
"webpack-cli": "^4.0.0",
"webpack-merge": "^5.0.0"
Expand Down
5 changes: 4 additions & 1 deletion 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.2",
"version": "1.0.3",
"icons": {
"16": "icon16.png",
"32": "icon32.png",
Expand All @@ -11,6 +11,9 @@
"512": "icon512.png",
"1024": "icon1024.png"
},
"action": {
"default_popup": "popup.html"
},
"declarative_net_request": {
"rule_resources": [
{
Expand Down
5 changes: 4 additions & 1 deletion public/firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
"manifest_version": 2,
"name": "Bing Chat for All Browsers",
"description": "Bing Chat for All Browsers",
"version": "1.0.2",
"version": "1.0.3",
"background": {
"scripts": ["js/background.js"]
},
"browser_action": {
"default_popup": "popup.html"
},
"icons": {
"16": "icon16.png",
"32": "icon32.png",
Expand Down
12 changes: 12 additions & 0 deletions public/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Bing Chat for All Browsers</title>
<script src="js/vendor.js"></script>
</head>
<body>
<div id="root"></div>
<script src="js/popup.js"></script>
</body>
</html>
Binary file modified release/chrome.zip
Binary file not shown.
Binary file modified release/firefox.zip
Binary file not shown.
85 changes: 85 additions & 0 deletions src/popup.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import React from 'react'
import ReactDOM from 'react-dom'
// @ts-ignore
import BingIcon from '../public/icon1024.png'

const Popup = () => {
return (
<>
<a
href="https://bing.com/chat"
target="_blank"
rel="noreferrer noopener nofollow"
style={{ textDecoration: 'none' }}
>
<div style={{ display: 'grid', placeItems: 'center', width: '300px', height: '100px' }}>
<button
style={{
backgroundColor: 'white',
color: 'black',
border: '1px solid rgb(156 163 175)',
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)',
}}
>
<img src={BingIcon} style={{ width: '1rem', height: '1rem', padding: 'auto', verticalAlign: 'middle' }} />
<span style={{ margin: 'auto auto auto 5px', fontSize: '0.8rem' }}>Open Bing Chat</span>
</button>
</div>
</a>
<p
style={{
margin: '0 10px',
width: '300px',
fontFamily:
"ui-rounded, 'SF Pro Rounded', 'SF NS Rounded', ui-sans-serif, -apple-system, BlinkMacSystemFont, system-ui, -system-ui, sans-serif",
fontSize: '0.8rem',
fontWeight: 400,
lineHeight: '1.5',
color: 'rgb(156 163 175)',
}}
>
Found a Bug?{' '}
<a
href="https://github.com/anaclumos/bing-chat-for-all-browsers"
target="_blank"
rel="noreferrer noopener nofollow"
style={{ color: 'black', textDecoration: 'underline' }}
>
Let me know on GitHub
</a>
{'.'}
<br />
Leave us a review for{' '}
<a
href="https://chrome.google.com/webstore/detail/bing-chat-for-all-browser/jofbglonpbndadajbafmmaklbfbkggpo"
target="_blank"
rel="noreferrer noopener nofollow"
style={{ color: 'black', textDecoration: 'underline' }}
>
Chrome
</a>{' '}
or{' '}
<a
href="https://addons.mozilla.org/en-US/firefox/addon/bing-chat-for-all-browsers/"
target="_blank"
rel="noreferrer noopener nofollow"
style={{ color: 'black', textDecoration: 'underline' }}
>
Firefox
</a>
.
</p>
</>
)
}

ReactDOM.render(
<React.StrictMode>
<Popup />
</React.StrictMode>,
document.getElementById('root')
)
12 changes: 12 additions & 0 deletions webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const srcDir = path.join(__dirname, '..', 'src')

module.exports = {
entry: {
popup: path.join(srcDir, 'popup.tsx'),
background: path.join(srcDir, 'background.ts'),
},
output: {
Expand All @@ -24,6 +25,17 @@ module.exports = {
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.(png|jpg|gif)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 8192,
},
},
],
},
],
},
resolve: {
Expand Down

0 comments on commit 45ad8e3

Please sign in to comment.