main
Elbert Alias 2 years ago
parent 502081ddea
commit 53aec56d57

@ -10,7 +10,7 @@ const {
resolve, resolve,
getTechnology, getTechnology,
} = Wappalyzer } = Wappalyzer
const { agent, getOption, setOption, open, globEscape } = Utils const { agent, promisify, getOption, setOption, open, globEscape } = Utils
const expiry = 1000 * 60 * 60 * 24 const expiry = 1000 * 60 * 60 * 24
@ -93,7 +93,7 @@ const Driver = {
chrome.tabs.onUpdated.addListener(async (id, { status, url }) => { chrome.tabs.onUpdated.addListener(async (id, { status, url }) => {
if (status === 'complete') { if (status === 'complete') {
;({ url } = await chrome.tabs.get(id)) ;({ url } = await promisify(chrome.tabs, 'get', id))
} }
if (url) { if (url) {
@ -335,7 +335,7 @@ const Driver = {
}, },
async content(url, func, args) { async content(url, func, args) {
const [tab] = await chrome.tabs.query({ const [tab] = await promisify(chrome.tabs, 'query', {
url: globEscape(url), url: globEscape(url),
}) })
@ -347,23 +347,29 @@ const Driver = {
throw new Error(`Tab ${tab.id} not ready for sendMessage: ${tab.status}`) throw new Error(`Tab ${tab.id} not ready for sendMessage: ${tab.status}`)
} }
const response = await chrome.tabs.sendMessage(tab.id, { return new Promise((resolve, reject) => {
chrome.tabs.sendMessage(
tab.id,
{
source: 'driver.js', source: 'driver.js',
func, func,
args: args ? (Array.isArray(args) ? args : [args]) : [], args: args ? (Array.isArray(args) ? args : [args]) : [],
}) },
(response) => {
if (chrome.runtime.lastError && func !== 'error') { chrome.runtime.lastError
Driver.error( ? func === 'error'
? resolve()
: Driver.error(
new Error( new Error(
`${chrome.runtime.lastError.message}: Driver.${func}(${JSON.stringify( `${
args chrome.runtime.lastError.message
)})` }: Driver.${func}(${JSON.stringify(args)})`
) )
) )
} else { : resolve(response)
return response
} }
)
})
}, },
/** /**
@ -381,7 +387,7 @@ const Driver = {
try { try {
await new Promise((resolve) => setTimeout(resolve, 500)) await new Promise((resolve) => setTimeout(resolve, 500))
const [tab] = await chrome.tabs.query({ const [tab] = await promisify(chrome.tabs, 'query', {
url: globEscape(request.url), url: globEscape(request.url),
}) })
@ -496,7 +502,7 @@ const Driver = {
// //
;( ;(
await chrome.cookies.getAll({ await promisify(chrome.cookies, 'getAll', {
url, url,
}) })
).forEach( ).forEach(
@ -667,7 +673,7 @@ const Driver = {
let tabs = [] let tabs = []
try { try {
tabs = await chrome.tabs.query({ tabs = await promisify(chrome.tabs, 'query', {
url: globEscape(url), url: globEscape(url),
}) })
} catch (error) { } catch (error) {
@ -728,7 +734,7 @@ const Driver = {
let tabs = [] let tabs = []
try { try {
tabs = await chrome.tabs.query({ tabs = await promisify(chrome.tabs, 'query', {
url: globEscape(url), url: globEscape(url),
}) })
} catch (error) { } catch (error) {
@ -767,7 +773,7 @@ const Driver = {
* Get the detected technologies for the current tab * Get the detected technologies for the current tab
*/ */
async getDetections() { async getDetections() {
const tab = await chrome.tabs.query({ const tab = await promisify(chrome.tabs, 'query', {
active: true, active: true,
currentWindow: true, currentWindow: true,
}) })

@ -2,7 +2,8 @@
/* eslint-env browser */ /* eslint-env browser */
/* globals chrome, Utils */ /* globals chrome, Utils */
const { agent, open, i18n, getOption, setOption, sendMessage } = Utils const { agent, open, i18n, getOption, setOption, promisify, sendMessage } =
Utils
const baseUrl = 'https://www.wappalyzer.com' const baseUrl = 'https://www.wappalyzer.com'
const utm = '?utm_source=popup&utm_medium=extension&utm_campaign=wappalyzer' const utm = '?utm_source=popup&utm_medium=extension&utm_campaign=wappalyzer'
@ -344,7 +345,7 @@ const Popup = {
let url let url
const tabs = await chrome.tabs.query({ const tabs = await promisify(chrome.tabs, 'query', {
active: true, active: true,
currentWindow: true, currentWindow: true,
}) })
@ -961,7 +962,7 @@ const Popup = {
new Blob([csv.join('\n')], { type: 'text/csv;charset=utf-8' }) new Blob([csv.join('\n')], { type: 'text/csv;charset=utf-8' })
) )
const granted = await chrome.permissions.request({ const granted = await promisify(chrome.permissions, 'request', {
permissions: ['downloads'], permissions: ['downloads'],
}) })

@ -5,6 +5,13 @@
// Manifest v2 polyfill // Manifest v2 polyfill
if (chrome.runtime.getManifest().manifest_version === 2) { if (chrome.runtime.getManifest().manifest_version === 2) {
chrome.action = chrome.browserAction chrome.action = chrome.browserAction
chrome.storage.sync = {
get: (...args) =>
new Promise((resolve) => chrome.storage.local.get(...args, resolve)),
set: (...args) =>
new Promise((resolve) => chrome.storage.local.set(...args, resolve)),
}
} }
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
@ -15,6 +22,24 @@ const Utils = {
? 'safari' ? 'safari'
: 'chrome', : 'chrome',
/**
* Use promises instead of callbacks
* @param {Object} context
* @param {String} method
* @param {...any} args
*/
promisify(context, method, ...args) {
return new Promise((resolve, reject) => {
context[method](...args, (...args) => {
if (chrome.runtime.lastError) {
return reject(chrome.runtime.lastError)
}
resolve(...args)
})
})
},
/** /**
* Open a browser tab * Open a browser tab
* @param {String} url * @param {String} url
@ -31,7 +56,7 @@ const Utils = {
*/ */
async getOption(name, defaultValue = null) { async getOption(name, defaultValue = null) {
try { try {
const option = await chrome.storage.local.get(name) const option = await chrome.storage.sync.get(name)
if (option[name] !== undefined) { if (option[name] !== undefined) {
return option[name] return option[name]
@ -51,7 +76,7 @@ const Utils = {
*/ */
async setOption(name, value) { async setOption(name, value) {
try { try {
await chrome.storage.local.set({ await chrome.storage.sync.set({
[name]: value, [name]: value,
}) })
} catch (error) { } catch (error) {

@ -91,6 +91,23 @@
"scriptSrc": "\\.ebis\\.ne\\.jp/", "scriptSrc": "\\.ebis\\.ne\\.jp/",
"website": "http://www.ebis.ne.jp" "website": "http://www.ebis.ne.jp"
}, },
"ADAPT": {
"cats": [
6
],
"description": "ADAPT is a subscription-based app that allows anyone to create video focused online store in minutes on their phone.",
"icon": "ADAPT.svg",
"meta": {
"image": "assets\\.adapt\\.ws/"
},
"pricing": [
"low",
"freemium",
"recurring"
],
"saas": true,
"website": "https://adapt.ws"
},
"ADFOX": { "ADFOX": {
"cats": [ "cats": [
36 36
@ -1116,23 +1133,6 @@
"scriptSrc": "c5\\.adalyser\\.com", "scriptSrc": "c5\\.adalyser\\.com",
"website": "https://adalyser.com/" "website": "https://adalyser.com/"
}, },
"ADAPT": {
"cats": [
6
],
"description": "ADAPT is a subscription-based app that allows anyone to create video focused online store in minutes on their phone.",
"icon": "ADAPT.svg",
"meta": {
"image": "assets\\.adapt\\.ws/"
},
"saas": true,
"pricing": [
"low",
"freemium",
"recurring"
],
"website": "https://adapt.ws"
},
"Adcash": { "Adcash": {
"cats": [ "cats": [
36 36
@ -4308,20 +4308,20 @@
106 106
], ],
"description": "Azoya helps international brands and retailers sell directly to Chinese consumers through cross-border ecommerce.", "description": "Azoya helps international brands and retailers sell directly to Chinese consumers through cross-border ecommerce.",
"icon": "Azoya.svg",
"excludes": "Magento", "excludes": "Magento",
"headers": { "headers": {
"x-azoya-webisteid": "" "x-azoya-webisteid": ""
}, },
"icon": "Azoya.svg",
"js": { "js": {
"IMAGE_CDN_HOST": "\\.azoyacdn\\.com" "IMAGE_CDN_HOST": "\\.azoyacdn\\.com"
}, },
"saas": true,
"pricing": [ "pricing": [
"high", "high",
"recurring", "recurring",
"poa" "poa"
], ],
"saas": true,
"website": "https://www.azoyagroup.com" "website": "https://www.azoyagroup.com"
}, },
"Azure": { "Azure": {

@ -2753,8 +2753,8 @@
"icon": "Convertri.svg", "icon": "Convertri.svg",
"js": { "js": {
"CONVERTRI_CONSTANTS": "", "CONVERTRI_CONSTANTS": "",
"convertriParameters": "", "ConvertriAnalytics": "",
"ConvertriAnalytics": "" "convertriParameters": ""
}, },
"pricing": [ "pricing": [
"low", "low",

@ -1877,10 +1877,10 @@
], ],
"description": "FurnitureDealer is the internet partner of more than 100 leading local full service brick and mortar furniture retailers.", "description": "FurnitureDealer is the internet partner of more than 100 leading local full service brick and mortar furniture retailers.",
"icon": "FurnitureDealer.png", "icon": "FurnitureDealer.png",
"scriptSrc": "\\.furnituredealer\\.net/",
"pricing": [ "pricing": [
"poa" "poa"
], ],
"scriptSrc": "\\.furnituredealer\\.net/",
"website": "https://www.furnituredealer.net" "website": "https://www.furnituredealer.net"
}, },
"Fusion Ads": { "Fusion Ads": {

@ -695,6 +695,22 @@
"scriptSrc": "\\.hextom\\.com/js/ultimatesalesboost\\.js", "scriptSrc": "\\.hextom\\.com/js/ultimatesalesboost\\.js",
"website": "https://hextom.com/case_study/ultimate-sales-boost" "website": "https://hextom.com/case_study/ultimate-sales-boost"
}, },
"Hi Platform": {
"cats": [
53
],
"description": "Hi Platform provider of an online customer relationship platform.",
"dom": "link[href*='.hiplatform.com']",
"icon": "Hi Platform.svg",
"pricing": [
"mid",
"recurring",
"poa"
],
"saas": true,
"scriptSrc": "\\.hiplatform\\.com/",
"website": "https://www.hiplatform.com"
},
"Hiawatha": { "Hiawatha": {
"cats": [ "cats": [
22 22
@ -777,22 +793,6 @@
}, },
"website": "http://hinzaco.com" "website": "http://hinzaco.com"
}, },
"Hi Platform": {
"cats": [
53
],
"description": "Hi Platform provider of an online customer relationship platform.",
"icon": "Hi Platform.svg",
"dom": "link[href*='.hiplatform.com']",
"saas": true,
"pricing": [
"mid",
"recurring",
"poa"
],
"scriptSrc": "\\.hiplatform\\.com/",
"website": "https://www.hiplatform.com"
},
"Hireology": { "Hireology": {
"cats": [ "cats": [
101 101
@ -1363,15 +1363,15 @@
12 12
], ],
"description": "Hydrogen is a front-end web development framework used for building Shopify custom storefronts.", "description": "Hydrogen is a front-end web development framework used for building Shopify custom storefronts.",
"headers": {
"powered-by": "^Shopify-Hydrogen$"
},
"icon": "Hydrogen.svg", "icon": "Hydrogen.svg",
"implies": [ "implies": [
"Shopify", "Shopify",
"React", "React",
"Vite" "Vite"
], ],
"headers": {
"powered-by": "^Shopify-Hydrogen$"
},
"oss": true, "oss": true,
"website": "https://hydrogen.shopify.dev" "website": "https://hydrogen.shopify.dev"
}, },

@ -396,11 +396,11 @@
], ],
"description": "Ketch is a data control platform that manages compliance with privacy regulations.", "description": "Ketch is a data control platform that manages compliance with privacy regulations.",
"icon": "Ketch.svg", "icon": "Ketch.svg",
"saas": true,
"scriptSrc": "\\.ketchcdn\\.com/",
"pricing": [ "pricing": [
"poa" "poa"
], ],
"saas": true,
"scriptSrc": "\\.ketchcdn\\.com/",
"website": "https://www.ketch.com" "website": "https://www.ketch.com"
}, },
"Kevel": { "Kevel": {

@ -1097,17 +1097,6 @@
"scriptSrc": "cdn\\.perzonalization\\.com", "scriptSrc": "cdn\\.perzonalization\\.com",
"website": "https://www.perzonalization.com/" "website": "https://www.perzonalization.com/"
}, },
"petite-vue": {
"cats": [
19
],
"description": "petite-vue is an alternative distribution of Vue optimised for progressive enhancement.",
"icon": "vue.svg",
"oss": true,
"scripts": "/petite-vue@([\\d\\.]+)/\\;version:\\1",
"scriptSrc": "/petite-vue",
"website": "https://github.com/vuejs/petite-vue"
},
"Phabricator": { "Phabricator": {
"cats": [ "cats": [
13, 13,
@ -2946,6 +2935,16 @@
"scriptSrc": "api\\.pushnami\\.com", "scriptSrc": "api\\.pushnami\\.com",
"website": "https://pushnami.com" "website": "https://pushnami.com"
}, },
"PyScript": {
"cats": [
19
],
"description": "PyScript is a python script that can be run in the browser using a mix of Python and standard HTML.",
"dom": "py-script",
"icon": "PyScript.svg",
"oss": true,
"website": "https://pyscript.net"
},
"Pygments": { "Pygments": {
"cats": [ "cats": [
19 19
@ -2969,16 +2968,6 @@
"implies": "Laravel", "implies": "Laravel",
"website": "http://pyrocms.com" "website": "http://pyrocms.com"
}, },
"PyScript": {
"cats": [
19
],
"description": "PyScript is a python script that can be run in the browser using a mix of Python and standard HTML.",
"icon": "PyScript.svg",
"dom": "py-script",
"oss": true,
"website": "https://pyscript.net"
},
"Python": { "Python": {
"cats": [ "cats": [
27 27
@ -3042,6 +3031,17 @@
"scriptSrc": "/particles(?:\\.min)?\\.js", "scriptSrc": "/particles(?:\\.min)?\\.js",
"website": "https://github.com/VincentGarreau/particles.js" "website": "https://github.com/VincentGarreau/particles.js"
}, },
"petite-vue": {
"cats": [
19
],
"description": "petite-vue is an alternative distribution of Vue optimised for progressive enhancement.",
"icon": "vue.svg",
"oss": true,
"scriptSrc": "/petite-vue",
"scripts": "/petite-vue@([\\d\\.]+)/\\;version:\\1",
"website": "https://github.com/vuejs/petite-vue"
},
"phpAlbum": { "phpAlbum": {
"cats": [ "cats": [
7 7

@ -180,20 +180,6 @@
"implies": "Joomla", "implies": "Joomla",
"website": "http://www.sigsiu.net/sobi2.html" "website": "http://www.sigsiu.net/sobi2.html"
}, },
"Spatie Support Bubble": {
"cats": [
52
],
"description": "Spatie Support Bubble is a non-intrusive support form.",
"icon": "Spatie.png",
"implies": [
"Laravel",
"Tailwind CSS"
],
"dom": "div.spatie-support-bubble",
"oss": true,
"website": "https://github.com/spatie/laravel-support-bubble"
},
"SPDY": { "SPDY": {
"cats": [ "cats": [
19 19
@ -1338,14 +1324,14 @@
"PHP", "PHP",
"Vue.js" "Vue.js"
], ],
"js": {
"webpackChunkselldone": ""
},
"meta": { "meta": {
"selldone-iframe": "",
"selldone-capi": "", "selldone-capi": "",
"selldone-cdn-id": "",
"selldone-cdn-images": "", "selldone-cdn-images": "",
"selldone-cdn-id": "" "selldone-iframe": ""
},
"js": {
"webpackChunkselldone": ""
}, },
"pricing": [ "pricing": [
"payg" "payg"
@ -1904,22 +1890,22 @@
1, 1,
6 6
], ],
"description": "Shift4Shop, formerly known as 3Dcart, is an ecommerce software provider for online businesses.",
"icon": "Shift4Shop.svg",
"cookies": { "cookies": {
"3dvisit": "" "3dvisit": ""
}, },
"description": "Shift4Shop, formerly known as 3Dcart, is an ecommerce software provider for online businesses.",
"headers": { "headers": {
"X-Powered-By": "3DCART" "X-Powered-By": "3DCART"
}, },
"icon": "Shift4Shop.svg",
"js": { "js": {
"_3d_cart.subtotal": "" "_3d_cart.subtotal": ""
}, },
"scriptSrc": "(?:twlh(?:track)?\\.asp|3d_upsell\\.js)",
"saas": true,
"pricing": [ "pricing": [
"payg" "payg"
], ],
"saas": true,
"scriptSrc": "(?:twlh(?:track)?\\.asp|3d_upsell\\.js)",
"website": "https://www.shift4shop.com" "website": "https://www.shift4shop.com"
}, },
"Shiny": { "Shiny": {
@ -4269,6 +4255,20 @@
"icon": "SparkPost.svg", "icon": "SparkPost.svg",
"website": "https://www.sparkpost.com/" "website": "https://www.sparkpost.com/"
}, },
"Spatie Support Bubble": {
"cats": [
52
],
"description": "Spatie Support Bubble is a non-intrusive support form.",
"dom": "div.spatie-support-bubble",
"icon": "Spatie.png",
"implies": [
"Laravel",
"Tailwind CSS"
],
"oss": true,
"website": "https://github.com/spatie/laravel-support-bubble"
},
"Speed Kit": { "Speed Kit": {
"cats": [ "cats": [
92 92

@ -828,11 +828,11 @@
], ],
"description": "Tern is a plug and play ecommerce app, built for Shopify, that offers merchants the ability to provide a seamless trade-in service.", "description": "Tern is a plug and play ecommerce app, built for Shopify, that offers merchants the ability to provide a seamless trade-in service.",
"icon": "Tern.png", "icon": "Tern.png",
"requires": "Shopify",
"scriptSrc": "live\\.tern-returns\\.eastsideapps\\.io/",
"pricing": [ "pricing": [
"payg" "payg"
], ],
"requires": "Shopify",
"scriptSrc": "live\\.tern-returns\\.eastsideapps\\.io/",
"website": "https://www.tern.eco" "website": "https://www.tern.eco"
}, },
"TerriaJS": { "TerriaJS": {
@ -2344,23 +2344,6 @@
], ],
"website": "https://www.transunion.com/solution/truvalidate" "website": "https://www.transunion.com/solution/truvalidate"
}, },
"TryNow": {
"cats": [
91
],
"description": "TryNow is an ecommerce platform designed to offer a try before you buy experience for shoppers.",
"icon": "TryNow.svg",
"js": {
"TryNowConfig": "",
"tryNowCheckout": ""
},
"pricing": [
"poa"
],
"saas": true,
"scriptSrc": "\\.trynow\\.net/shopify/([\\d\\.]+)/\\;version:\\1",
"website": "https://www.trynow.io"
},
"True Fit": { "True Fit": {
"cats": [ "cats": [
76 76
@ -2521,6 +2504,23 @@
"saas": true, "saas": true,
"website": "https://site.trustvox.com.br" "website": "https://site.trustvox.com.br"
}, },
"TryNow": {
"cats": [
91
],
"description": "TryNow is an ecommerce platform designed to offer a try before you buy experience for shoppers.",
"icon": "TryNow.svg",
"js": {
"TryNowConfig": "",
"tryNowCheckout": ""
},
"pricing": [
"poa"
],
"saas": true,
"scriptSrc": "\\.trynow\\.net/shopify/([\\d\\.]+)/\\;version:\\1",
"website": "https://www.trynow.io"
},
"Tumblr": { "Tumblr": {
"cats": [ "cats": [
11 11