Skip to content

Commit

Permalink
updated to chrome store
Browse files Browse the repository at this point in the history
  • Loading branch information
codeeshop-oc committed Jan 13, 2022
1 parent e4bdf4b commit ec7996d
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 194 deletions.
28 changes: 0 additions & 28 deletions dist/bex/Packaged/chrome.pem

This file was deleted.

Binary file modified dist/bex/Packaged/chrome/custom_html_in_pages.zip
Binary file not shown.
Binary file modified dist/bex/Packaged/firefox/custom_html_in_pages.zip
Binary file not shown.
55 changes: 0 additions & 55 deletions dist/bex/UnPackaged/js/background-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion dist/bex/UnPackaged/manifest.json
Original file line number Diff line number Diff line change
@@ -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":["<all_urls>"],"js":["www/js/bex-content-script.js","js/content-script.js"],"css":["css/content-css.css"]}],"permissions":["<all_urls>","storage","tabs","activeTab"],"web_accessible_resources":["www/*","js/*","css/*","<all_urls>"],"content_security_policy":"script-src 'self' 'unsafe-eval'; object-src 'self';"}
{"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":["<all_urls>"],"js":["www/js/bex-content-script.js","js/content-script.js"],"css":["css/content-css.css"]}],"permissions":["tabs"],"web_accessible_resources":["www/*","js/*","css/*","<all_urls>"],"content_security_policy":"script-src 'self' 'unsafe-eval'; object-src 'self';"}
51 changes: 0 additions & 51 deletions dist/bex/UnPackaged/www/js/bex-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
55 changes: 0 additions & 55 deletions src-bex/js/background-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 2 additions & 4 deletions src-bex/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -29,10 +30,7 @@
]
}],
"permissions": [
"<all_urls>",
"storage",
"tabs",
"activeTab"
"tabs"
],
"web_accessible_resources": [
"www/*",
Expand Down

0 comments on commit ec7996d

Please sign in to comment.