diff --git a/package-lock.json b/package-lock.json index 070d6a2..8512cc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,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" @@ -2324,6 +2325,28 @@ "bser": "2.1.1" } }, + "node_modules/file-loader": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", + "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -4751,6 +4774,33 @@ "punycode": "^2.1.0" } }, + "node_modules/url-loader": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz", + "integrity": "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==", + "dev": true, + "dependencies": { + "loader-utils": "^2.0.0", + "mime-types": "^2.1.27", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "file-loader": "*", + "webpack": "^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "file-loader": { + "optional": true + } + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -7097,6 +7147,18 @@ "bser": "2.1.1" } }, + "file-loader": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", + "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -9032,6 +9094,17 @@ "punycode": "^2.1.0" } }, + "url-loader": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz", + "integrity": "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "mime-types": "^2.1.27", + "schema-utils": "^3.0.0" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/package.json b/package.json index dd57e14..d2c3912 100644 --- a/package.json +++ b/package.json @@ -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": { @@ -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" diff --git a/public/chrome.json b/public/chrome.json index 7ae8d62..037fbb0 100644 --- a/public/chrome.json +++ b/public/chrome.json @@ -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", @@ -11,6 +11,9 @@ "512": "icon512.png", "1024": "icon1024.png" }, + "action": { + "default_popup": "popup.html" + }, "declarative_net_request": { "rule_resources": [ { diff --git a/public/firefox.json b/public/firefox.json index 586d6af..e90cb73 100644 --- a/public/firefox.json +++ b/public/firefox.json @@ -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", diff --git a/public/popup.html b/public/popup.html new file mode 100644 index 0000000..7713627 --- /dev/null +++ b/public/popup.html @@ -0,0 +1,12 @@ + + + + + Bing Chat for All Browsers + + + +
+ + + diff --git a/release/chrome.zip b/release/chrome.zip index 93cbd26..df21335 100644 Binary files a/release/chrome.zip and b/release/chrome.zip differ diff --git a/release/firefox.zip b/release/firefox.zip index 2f4bcba..d38b84b 100644 Binary files a/release/firefox.zip and b/release/firefox.zip differ diff --git a/src/popup.tsx b/src/popup.tsx new file mode 100644 index 0000000..a0dda35 --- /dev/null +++ b/src/popup.tsx @@ -0,0 +1,85 @@ +import React from 'react' +import ReactDOM from 'react-dom' +// @ts-ignore +import BingIcon from '../public/icon1024.png' + +const Popup = () => { + return ( + <> + +
+ +
+
+

+ Found a Bug?{' '} + + Let me know on GitHub + + {'.'} +
+ Leave us a review for{' '} + + Chrome + {' '} + or{' '} + + Firefox + + . +

+ + ) +} + +ReactDOM.render( + + + , + document.getElementById('root') +) diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js index 7b0030b..74be015 100644 --- a/webpack/webpack.common.js +++ b/webpack/webpack.common.js @@ -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: { @@ -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: {