Fix localisation, patterns and error handling when saving options

main
Elbert Alias 4 years ago
parent eb2dfc714a
commit fd58b18a95

@ -3957,7 +3957,7 @@
"cats": [ "cats": [
24 24
], ],
"html": "/<!--\\s*\\*\\s*FreeTextBox v\\d+ \\(([.\\d]+)(?:(?:\\.|\\n)+?<!--\\s*\\*\\s*License Type: (Distribution|Professional)License)?/i\\;version:\\1 \\2", "html": "<!-- \\* FreeTextBox v\\d \\((\\d+\\.\\d+\\.\\d+)\\;version:\\1",
"icon": "FreeTextBox.png", "icon": "FreeTextBox.png",
"implies": "Microsoft ASP.NET", "implies": "Microsoft ASP.NET",
"js": { "js": {
@ -4250,7 +4250,7 @@
], ],
"icon": "GitBook.png", "icon": "GitBook.png",
"meta": { "meta": {
"generator": "GitBook(?:\\.([\\d.]+))?\\;version:\\1" "generator": "GitBook ([\\d.]+)?\\;version:\\1"
}, },
"url": "^https?://[^/]+\\.gitbook\\.com/", "url": "^https?://[^/]+\\.gitbook\\.com/",
"website": "https://www.gitbook.com" "website": "https://www.gitbook.com"
@ -5542,7 +5542,7 @@
18 18
], ],
"headers": { "headers": {
"X-Powered-By": "Servlet(?:\\.([\\d.]+))?\\;version:\\1" "X-Powered-By": "Servlet(?:\\/([\\d.]+))?\\;version:\\1"
}, },
"icon": "Java.png", "icon": "Java.png",
"implies": "Java", "implies": "Java",
@ -12450,7 +12450,7 @@
], ],
"headers": { "headers": {
"Server": "Winstone Servlet (?:Container|Engine) v?([\\d.]+)?\\;version:\\1", "Server": "Winstone Servlet (?:Container|Engine) v?([\\d.]+)?\\;version:\\1",
"X-Powered-By": "Winstone(?:\\.([\\d.]+))?\\;version:\\1" "X-Powered-By": "Winstone(?:\\/([\\d.]+))?\\;version:\\1"
}, },
"website": "http://winstone.sourceforge.net" "website": "http://winstone.sourceforge.net"
}, },
@ -13076,7 +13076,6 @@
"cookies": { "cookies": {
"ZM_TEST": "true" "ZM_TEST": "true"
}, },
"html": "<script>(?:\\.|\\n)*\"refresh\":\\{\"version\":\"([\\w\\.]+)\\s\\;version:\\1",
"icon": "Zimbra.png", "icon": "Zimbra.png",
"implies": "Java", "implies": "Java",
"website": "https://www.zimbra.com/" "website": "https://www.zimbra.com/"

@ -13,7 +13,7 @@
"software" "software"
], ],
"homepage": "https://www.wappalyzer.com", "homepage": "https://www.wappalyzer.com",
"version": "6.0.13", "version": "6.0.15",
"author": "Wappalyzer", "author": "Wappalyzer",
"license": "MIT", "license": "MIT",
"repository": { "repository": {

@ -1,5 +1,4 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">

@ -515,14 +515,11 @@ const Driver = {
] ]
if ( if (
/((local|dev(elopment)?|stag(e|ing)?|test(ing)?|demo(shop)?|admin|google|cache)\.|\/admin|\.local)/.test( !/((local|dev(elopment)?|stag(e|ing)?|test(ing)?|demo(shop)?|admin|google|cache)\.|\/admin|\.local)/.test(
hostname hostname
) || ) &&
hits < 3 hits >= 3
) { ) {
return
}
hostnames[url] = hostnames[url] || { hostnames[url] = hostnames[url] || {
applications: resolve(detections).reduce( applications: resolve(detections).reduce(
(technologies, { name, confidence, version }) => { (technologies, { name, confidence, version }) => {
@ -531,9 +528,9 @@ const Driver = {
version, version,
hits hits
} }
}
return technologies return technologies
}
}, },
{} {}
), ),
@ -541,6 +538,7 @@ const Driver = {
language language
} }
} }
}
return hostnames return hostnames
}, },

@ -120,14 +120,15 @@ const Popup = {
document.querySelector('.empty').remove() document.querySelector('.empty').remove()
} }
Popup.categorise(detections).forEach( const categorised = Popup.categorise(detections)
({ id, name, slug: categorySlug, technologies }) => {
categorised.forEach(({ id, name, slug: categorySlug, technologies }) => {
const categoryNode = Popup.templates.category.cloneNode(true) const categoryNode = Popup.templates.category.cloneNode(true)
const link = categoryNode.querySelector('.category__link') const link = categoryNode.querySelector('.category__link')
link.href = `https://www.wappalyzer.com/technologies/${categorySlug}` link.href = `https://www.wappalyzer.com/technologies/${categorySlug}`
link.textContent = name link.dataset.i18n = `categoryName${id}`
const pins = categoryNode.querySelectorAll('.category__pin') const pins = categoryNode.querySelectorAll('.category__pin')
@ -193,8 +194,13 @@ const Popup = {
}) })
document.querySelector('.detections').appendChild(categoryNode) document.querySelector('.detections').appendChild(categoryNode)
})
if (categorised.length === 1) {
document
.querySelector('.detections')
.appendChild(Popup.templates.category.cloneNode(true))
} }
)
Array.from(document.querySelectorAll('a')).forEach((a) => Array.from(document.querySelectorAll('a')).forEach((a) =>
a.addEventListener('click', (event) => { a.addEventListener('click', (event) => {

@ -44,11 +44,12 @@ const Utils = {
if (option[name] !== undefined) { if (option[name] !== undefined) {
return option[name] return option[name]
} }
return defaultValue
} catch (error) { } catch (error) {
throw new Error(error.message || error.toString()) // eslint-disable-next-line no-console
console.error('wappalyzer | utils |', error)
} }
return defaultValue
}, },
/** /**
@ -62,7 +63,8 @@ const Utils = {
[name]: value [name]: value
}) })
} catch (error) { } catch (error) {
throw new Error(error.message || error.toString()) // eslint-disable-next-line no-console
console.error('wappalyzer | utils |', error)
} }
}, },

@ -4,7 +4,7 @@
"author": "Wappalyzer", "author": "Wappalyzer",
"homepage_url": "https://www.wappalyzer.com", "homepage_url": "https://www.wappalyzer.com",
"description": "Identify web technologies", "description": "Identify web technologies",
"version": "6.0.13", "version": "6.0.15",
"default_locale": "en", "default_locale": "en",
"manifest_version": 2, "manifest_version": 2,
"icons": { "icons": {

@ -13,7 +13,7 @@
"software" "software"
], ],
"homepage": "https://www.wappalyzer.com", "homepage": "https://www.wappalyzer.com",
"version": "6.0.13", "version": "6.0.15",
"author": "Wappalyzer", "author": "Wappalyzer",
"license": "MIT", "license": "MIT",
"repository": { "repository": {

Loading…
Cancel
Save