diff --git a/README.md b/README.md index 4c5fc3d..17b22da 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,18 @@ # Custom HTML in Pages (custom-html-in-pages) -Chrome Extension +> Chrome Extension for adding Custom HTML code in Single Page, All Pages or Domains + +[![Chrome](https://img.shields.io/badge/Chrome%20Extension-1.0.0-blue)](https://github.com/codeeshop-oc/custom-html-in-pages/blob/main/LICENSE) +[![license](https://img.shields.io/badge/license-MIT-green)](https://github.com/codeeshop-oc/custom-html-in-pages/blob/main/LICENSE) +[![PRs welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg)](https://github.com/codeeshop-oc/custom-html-in-pages/issues?&q=is%3Aissue+is%3Aopen) + ## Install the dependencies ```bash yarn install ``` -### Start the app in development mode (hot-code reloading, error reporting, etc.) +### 🚀 Start the app in development mode (hot-code reloading, error reporting, etc.) ```bash quasar dev -m bex ``` @@ -15,7 +20,7 @@ quasar dev -m bex Follow the development procedure for chrome and firefox described here: [Quasar BEX Build Commands](https://quasar.dev/quasar-cli/developing-browser-extensions/build-commands) -### Build the app for production +### 🚀 Build the app for production ```bash quasar build -m bex ``` @@ -23,13 +28,12 @@ quasar build -m bex Follow the production building tutorial here: [Quasar Production BEX Build Commands]](https://quasar.dev/quasar-cli/developing-browser-extensions/build-commands#Building-for-Production) -## What works as of now +## Working Current tested in Chrome only. After installation you can browse to any URL and see the extension working. - A Popup will open when click on the Chrome Extension Icon - Fill the fields - -### All Props +### 🚀 All Fields | Field name | Description | Type | Values | ---------------------- | --------------------------------------------------------------------------| ------- | --------------------- @@ -39,5 +43,10 @@ Current tested in Chrome only. After installation you can browse to any URL and - See the result by inspecting ( Ctrl + Shift + F12 ) and check under head section. -### Customize the configuration +### 🚀 Customize the configuration See [Configuring quasar.conf.js](https://quasar.dev/quasar-cli/quasar-conf-js). + + +### 🔖 License + +This software is licensed under the [MIT](https://github.com/codeeshop-oc/custom-html-in-pages/blob/main/LICENSE). \ No newline at end of file diff --git a/dist/bex/Packaged/chrome.pem b/dist/bex/Packaged/chrome.pem deleted file mode 100644 index 499b568..0000000 --- a/dist/bex/Packaged/chrome.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC0y2ky2hmbglac -9rdl8Hox+PfCd7dw4q/F6U75SC6VJPmcinopTGWjm7sofSVJhHNcVVlQXQau7pMR -0ylgVInhI7UA4WXvUsTh171cXu2xc+SnTDxgNBWd7ODpnuO1sCmIy8VNrbfTMIpa -EO5eNJtTKfLaCp0MVNf/pQ19hDOFqkAHS5jSxb7cC/c7e8IEegjKTAzO2vHNjxA+ -1Yafhba4DPRHhJpRSO7z2gJStVlyjwTXE5iO3Ic7ZBxEYFVoEFdQF93jElxvDC0s -V4EWpQls0MF/xkJRTIgVC0ZirdmicyU75Cs3kVtmhn5GjTNEtgLuuuqwghRRGuSv -E+sag1tLAgMBAAECggEACxs72S3gyNbW70mQtqhxOUSsI7wq/rpORgAxI8s1YWAm -HWG8Y3EYBVb5xmD5u2xxkciEdhVg5bouOrgYIJzQ443H/sfZ9TvGcIFKVrRWMcKG -12gthVNtyIfWwUNLhcvOoWKzOjRjyIuA1EuZ+RuONyuqiY6BW1KS+ldvXriSWbGj -QdqynE9ULWi65v1QI/Se8JbFZLI7Z2kiZwWbhld4XDdLb0J9d0QxxlXxQVInJubj -1/NU81A7rIju0ODDilnrw3qtnAwntCP3YphvApjO/G2cAC8pD7xKXVaswy0BOfm+ -owO47+6zJYfSdi+NlmNIHJfY4M9p9ruBotrxUofrUQKBgQDm0j6cemDeCgnklTmq -53r1bDabMYO6bFlWbH8letPio79ZUefG+Jblp2FGHCDhIwwf+J8m9dJ6KJeMwAIT -BX5vQK57jHwjRkBTtLUHXMDxIGbXtSfE3n9vo8G4NuS91+EWVOPKm4C2xc/dUJEA -kNnMy72ghOnGqfcbcyuDMfs3rQKBgQDIhCfKLMcGaq+EfMk0J8H5uo6kIuWEV6M7 -6PlA+MGuM5wX74NYQhSHjFSk3DKEMqPpZM1oZnnmnkUI+ssX1pYYjSh03AGzWqtS -wUeSVQ3VlLzNknY5Wo1gEJHIjZjB0T+89FTzY8AS31koJUruy7ap31X2k1mOwaAj -YH844z0d1wKBgGqKXNAJRLD4XTyfDHEwS3cArevQXQctf8b+aWm5WhfgkS//OEaE -89GpAqND1IFWlgAj2AI5sR8loV4cOljhTky3xFHOtHXrtUFtxalSTNR/qjiiq2qZ -cKTtJzuKSua9wG14XXRldnHmuF1lFKj4My/uUubGssk6Jo8LB+iUp2o5AoGACJqD -Co25THEvbsPb7jz2ebyjei91IaSRAHUSnNMPnGXigLRqMlNDhj1jNF+uWzXBCrak -iaI8AMUxuRzpsfAnKI6F+d2mxQdS6o4YgBLeMRfcsgVixTs5bbHIT46jy00rKvRg -4MCa8TRcIvjWqkBbahaHHblc0l9Ee8AcNViquqkCgYEAsRuuVBrJJCxtGdWnzXsg -PwTRCzrYdiir1Gb2i4q7SMcyy0/LO79Q7GiFkW451jGv3kPof8sw13z4CY5ryRtR -8CJqjGLYnEg8F0f8LChL+max/Ha14/Bkk+fG7iZpPes3OQ9z/890k4yZgGT/UdAl -JUcbf1qjyAKrJrniqWVeoH0= ------END PRIVATE KEY----- diff --git a/dist/bex/Packaged/chrome/custom_html_in_pages.zip b/dist/bex/Packaged/chrome/custom_html_in_pages.zip index 3279c16..a33f2f6 100644 Binary files a/dist/bex/Packaged/chrome/custom_html_in_pages.zip and b/dist/bex/Packaged/chrome/custom_html_in_pages.zip differ diff --git a/dist/bex/Packaged/firefox/custom_html_in_pages.zip b/dist/bex/Packaged/firefox/custom_html_in_pages.zip index 3279c16..a33f2f6 100644 Binary files a/dist/bex/Packaged/firefox/custom_html_in_pages.zip and b/dist/bex/Packaged/firefox/custom_html_in_pages.zip differ diff --git a/dist/bex/UnPackaged/js/background-hooks.js b/dist/bex/UnPackaged/js/background-hooks.js index 61c70e7..8783c20 100644 --- a/dist/bex/UnPackaged/js/background-hooks.js +++ b/dist/bex/UnPackaged/js/background-hooks.js @@ -5,61 +5,6 @@ export default function attachBackgroundHooks(bridge /* , allActiveConnections */ ) { - bridge.on('storage.get', event => { - const payload = event.data - if (payload.key === null) { - chrome.storage.local.get(null, r => { - const result = [] - - // Group the items up into an array to take advantage of the bridge's chunk splitting. - for (const itemKey in r) { - result.push(r[itemKey]) - } - bridge.send(event.eventResponseKey, result) - }) - } else { - chrome.storage.local.get([payload.key], r => { - bridge.send(event.eventResponseKey, r[payload.key]) - }) - } - }) - - bridge.on('storage.set', event => { - const payload = event.data - chrome.storage.local.set({ - [payload.key]: payload.data - }, () => { - bridge.send(event.eventResponseKey, payload.data) - }) - }) - - bridge.on('storage.remove', event => { - const payload = event.data - chrome.storage.local.remove(payload.key, () => { - bridge.send(event.eventResponseKey, payload.data) - }) - }) - - /* - // EXAMPLES - // Listen to a message from the client - bridge.on('test', d => { - console.log(d) - }) - - // Send a message to the client based on something happening. - chrome.tabs.onCreated.addListener(tab => { - bridge.send('browserTabCreated', { tab }) - }) - - // Send a message to the client based on something happening. - chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { - if (changeInfo.url) { - bridge.send('browserTabUpdated', { tab, changeInfo }) - } - }) - */ - chrome.tabs.query({ active: true }, function(tabs) { diff --git a/dist/bex/UnPackaged/manifest.json b/dist/bex/UnPackaged/manifest.json index 94ef7f7..819d32d 100644 --- a/dist/bex/UnPackaged/manifest.json +++ b/dist/bex/UnPackaged/manifest.json @@ -1 +1 @@ -{"name":"Custom HTML in Pages","description":"Adding Custom HTML code in Single Page, All Pages or Domains","version":"1.0.0","manifest_version":2,"icons":{"16":"icons/icon-16x16.png","48":"icons/icon-48x48.png","128":"icons/icon-128x128.png"},"browser_action":{"default_popup":"www/index.html#/popup"},"background":{"scripts":["www/js/bex-background.js","js/background.js"],"persistent":true},"content_scripts":[{"matches":[""],"js":["www/js/bex-content-script.js","js/content-script.js"],"css":["css/content-css.css"]}],"permissions":["","storage","tabs","activeTab"],"web_accessible_resources":["www/*","js/*","css/*",""],"content_security_policy":"script-src 'self' 'unsafe-eval'; object-src 'self';"} \ No newline at end of file +{"name":"Custom HTML in Pages","description":"Adding Custom HTML code in Single Page, All Pages or Domains","version":"1.0.0","manifest_version":2,"author":"Anant Negi","icons":{"16":"icons/icon-16x16.png","48":"icons/icon-48x48.png","128":"icons/icon-128x128.png"},"browser_action":{"default_popup":"www/index.html#/popup"},"background":{"scripts":["www/js/bex-background.js","js/background.js"],"persistent":true},"content_scripts":[{"matches":[""],"js":["www/js/bex-content-script.js","js/content-script.js"],"css":["css/content-css.css"]}],"permissions":["tabs"],"web_accessible_resources":["www/*","js/*","css/*",""],"content_security_policy":"script-src 'self' 'unsafe-eval'; object-src 'self';"} \ No newline at end of file diff --git a/dist/bex/UnPackaged/www/js/bex-background.js b/dist/bex/UnPackaged/www/js/bex-background.js index 86a3057..b53d142 100644 --- a/dist/bex/UnPackaged/www/js/bex-background.js +++ b/dist/bex/UnPackaged/www/js/bex-background.js @@ -6263,57 +6263,6 @@ var web_url_search_params = __webpack_require__(6016); function attachBackgroundHooks(bridge /* , allActiveConnections */ ) { - bridge.on('storage.get', event => { - const payload = event.data; - - if (payload.key === null) { - chrome.storage.local.get(null, r => { - const result = []; // Group the items up into an array to take advantage of the bridge's chunk splitting. - - for (const itemKey in r) { - result.push(r[itemKey]); - } - - bridge.send(event.eventResponseKey, result); - }); - } else { - chrome.storage.local.get([payload.key], r => { - bridge.send(event.eventResponseKey, r[payload.key]); - }); - } - }); - bridge.on('storage.set', event => { - const payload = event.data; - chrome.storage.local.set({ - [payload.key]: payload.data - }, () => { - bridge.send(event.eventResponseKey, payload.data); - }); - }); - bridge.on('storage.remove', event => { - const payload = event.data; - chrome.storage.local.remove(payload.key, () => { - bridge.send(event.eventResponseKey, payload.data); - }); - }); - /* - // EXAMPLES - // Listen to a message from the client - bridge.on('test', d => { - console.log(d) - }) - // Send a message to the client based on something happening. - chrome.tabs.onCreated.addListener(tab => { - bridge.send('browserTabCreated', { tab }) - }) - // Send a message to the client based on something happening. - chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { - if (changeInfo.url) { - bridge.send('browserTabUpdated', { tab, changeInfo }) - } - }) - */ - chrome.tabs.query({ active: true }, function (tabs) { diff --git a/src-bex/js/background-hooks.js b/src-bex/js/background-hooks.js index 61c70e7..8783c20 100644 --- a/src-bex/js/background-hooks.js +++ b/src-bex/js/background-hooks.js @@ -5,61 +5,6 @@ export default function attachBackgroundHooks(bridge /* , allActiveConnections */ ) { - bridge.on('storage.get', event => { - const payload = event.data - if (payload.key === null) { - chrome.storage.local.get(null, r => { - const result = [] - - // Group the items up into an array to take advantage of the bridge's chunk splitting. - for (const itemKey in r) { - result.push(r[itemKey]) - } - bridge.send(event.eventResponseKey, result) - }) - } else { - chrome.storage.local.get([payload.key], r => { - bridge.send(event.eventResponseKey, r[payload.key]) - }) - } - }) - - bridge.on('storage.set', event => { - const payload = event.data - chrome.storage.local.set({ - [payload.key]: payload.data - }, () => { - bridge.send(event.eventResponseKey, payload.data) - }) - }) - - bridge.on('storage.remove', event => { - const payload = event.data - chrome.storage.local.remove(payload.key, () => { - bridge.send(event.eventResponseKey, payload.data) - }) - }) - - /* - // EXAMPLES - // Listen to a message from the client - bridge.on('test', d => { - console.log(d) - }) - - // Send a message to the client based on something happening. - chrome.tabs.onCreated.addListener(tab => { - bridge.send('browserTabCreated', { tab }) - }) - - // Send a message to the client based on something happening. - chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { - if (changeInfo.url) { - bridge.send('browserTabUpdated', { tab, changeInfo }) - } - }) - */ - chrome.tabs.query({ active: true }, function(tabs) { diff --git a/src-bex/manifest.json b/src-bex/manifest.json index b56d0a7..a051ff8 100644 --- a/src-bex/manifest.json +++ b/src-bex/manifest.json @@ -3,6 +3,7 @@ "description": "Adding Custom HTML code in Single Page, All Pages or Domains", "version": "1.0.0", "manifest_version": 2, + "author": "Anant Negi", "icons": { "16": "icons/icon-16x16.png", "48": "icons/icon-48x48.png", @@ -29,10 +30,7 @@ ] }], "permissions": [ - "", - "storage", - "tabs", - "activeTab" + "tabs" ], "web_accessible_resources": [ "www/*",