Fix content script messaging, popup layout, add technology descriptions

main
Elbert Alias 4 years ago
parent 4e8cf66677
commit 2d88739d78

@ -11194,7 +11194,8 @@
10 10
], ],
"icon": "splitbee.svg", "icon": "splitbee.svg",
"script": "^https:\\/\\/cdn\\.splitbee\\.io\\/sb\\.js", "script": "^https://cdn\\.splitbee\\.io/sb\\.js",
"js": "splitbee",
"website": "https://splitbee.io" "website": "https://splitbee.io"
}, },
"Splunk": { "Splunk": {
@ -12704,6 +12705,7 @@
"website": "https://www.volusion.com" "website": "https://www.volusion.com"
}, },
"Vue.js": { "Vue.js": {
"description": "Vue is a progressive framework for building user interfaces.",
"cats": [ "cats": [
12 12
], ],
@ -15474,4 +15476,4 @@
"priority": 6 "priority": 6
} }
} }
} }

@ -135,10 +135,6 @@ a:hover {
padding-bottom: 1rem; padding-bottom: 1rem;
} }
.category__heading {
white-space: nowrap;
}
.category__link { .category__link {
font-weight: bold; font-weight: bold;
line-height: 2rem; line-height: 2rem;
@ -184,7 +180,6 @@ a:hover {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: .2rem; margin-bottom: .2rem;
white-space: nowrap;
} }
.technology__icon { .technology__icon {

@ -7,7 +7,7 @@ const Content = {
* Initialise content script * Initialise content script
*/ */
async init() { async init() {
if (await Content.driver('isDisabledDomain', [location])) { if (await Content.driver('isDisabledDomain', location.href)) {
return return
} }
@ -79,7 +79,7 @@ const Content = {
} }
}, },
driver(func, args, callback) { driver(func, args) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
chrome.runtime.sendMessage( chrome.runtime.sendMessage(
{ {
@ -106,6 +106,7 @@ const Content = {
script.onload = () => { script.onload = () => {
const onMessage = ({ data }) => { const onMessage = ({ data }) => {
console.log(data)
if (!data.wappalyzer || !data.wappalyzer.js) { if (!data.wappalyzer || !data.wappalyzer.js) {
return return
} }

@ -190,7 +190,14 @@ const Popup = {
} }
document.querySelector('.empty').classList.add('empty--hidden') document.querySelector('.empty').classList.add('empty--hidden')
document.querySelector('.detections').classList.remove('detections--hidden')
const el = document.querySelector('.detections')
el.classList.remove('detections--hidden')
while (el.firstChild) {
el.removeChild(detections.lastChild)
}
const pinnedCategory = await getOption('pinnedCategory') const pinnedCategory = await getOption('pinnedCategory')

Loading…
Cancel
Save