Fix terms display in popup, fix regex

main
Elbert Alias 4 years ago
parent e2c507b2d1
commit 06544a33ca

@ -1901,7 +1901,7 @@
"js": { "js": {
"_carbonads": "" "_carbonads": ""
}, },
"script": "^(?:https?:)?\\/\\/(?:[^\\/]+\\.)*carbonads\\.com\\/", "script": "carbonads\\.com",
"website": "http://carbonads.net" "website": "http://carbonads.net"
}, },
"Cargo": { "Cargo": {
@ -11640,7 +11640,7 @@
}, },
"script": [ "script": [
"zencdn\\.net/c/video\\.js", "zencdn\\.net/c/video\\.js",
"^(?:https?:)?\\/\\/(?:[^\\/]+\\.)*cdnjs\\.cloudflare\\.com\\/ajax\\/libs\\/video\\.js\\/([\\d\\.]+)\\/\\;version:\\1" "cdnjs\\.cloudflare\\.com\\/ajax\\/libs\\/video\\.js\\/([\\d\\.]+)\\/\\;version:\\1"
], ],
"website": "http://videojs.com" "website": "http://videojs.com"
}, },

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

@ -167,10 +167,10 @@ a:hover {
.terms { .terms {
align-items: center; align-items: center;
display: flex; display: none;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
margin-bottom: 1rem; padding: 1.5rem 1.5rem 1rem 1.5rem;
height: 12rem; height: 12rem;
width: 36rem; width: 36rem;
} }

@ -19,6 +19,10 @@
</a> </a>
</div> </div>
<div class="empty" data-i18n="noAppsDetected"></div>
<div class="detections"></div>
<div class="terms"> <div class="terms">
<div class="terms__content" data-i18n="termsContent"></div> <div class="terms__content" data-i18n="termsContent"></div>
@ -27,10 +31,6 @@
<a class="terms__privacy" href="https://www.wappalyzer.com/privacy" data-i18n="privacyPolicy"></a> <a class="terms__privacy" href="https://www.wappalyzer.com/privacy" data-i18n="privacyPolicy"></a>
</div> </div>
<div class="empty" data-i18n="noAppsDetected"></div>
<div class="detections"></div>
<div data-template="category" class="category"> <div data-template="category" class="category">
<div class="category__heading"> <div class="category__heading">
<a class="category__link" href="#"></a> <a class="category__link" href="#"></a>

@ -61,6 +61,18 @@ const Driver = {
['responseHeaders'] ['responseHeaders']
) )
chrome.tabs.onRemoved.addListener((id) => (Driver.cache.tabs[id] = null)) chrome.tabs.onRemoved.addListener((id) => (Driver.cache.tabs[id] = null))
const { version } = chrome.runtime.getManifest()
const previous = await getOption('version')
const upgradeMessage = await getOption('upgradeMessage', true)
if (previous === null) {
Driver.open('https://www.wappalyzer.com/installed')
} else if (version !== previous && upgradeMessage) {
Driver.open(`https://www.wappalyzer.com/upgraded?v${version}`, false)
}
await setOption('version', version)
}, },
log(message, source = 'driver', type = 'log') { log(message, source = 'driver', type = 'log') {

@ -31,11 +31,21 @@ const Popup = {
agent === 'chrome' || (await getOption('termsAccepted', false)) agent === 'chrome' || (await getOption('termsAccepted', false))
if (termsAccepted) { if (termsAccepted) {
document.querySelector('.terms').style.display = 'none'
Popup.driver('getDetections') Popup.driver('getDetections')
} else { } else {
document.querySelector('.terms').style.display = 'flex'
document.querySelector('.detections').style.display = 'none' document.querySelector('.detections').style.display = 'none'
document.querySelector('.empty').style.display = 'none'
document.querySelector('.terms').addEventListener('click', async () => {
await setOption('termsAccepted', true)
document.querySelector('.terms').remove()
document.querySelector('.detections').style.display = 'block'
document.querySelector('.empty').style.display = 'block'
Popup.driver('getDetections')
})
i18n() i18n()
} }
@ -166,7 +176,13 @@ const Popup = {
) )
Array.from(document.querySelectorAll('a')).forEach((a) => Array.from(document.querySelectorAll('a')).forEach((a) =>
a.addEventListener('click', () => Popup.driver('open', a.href)) a.addEventListener('click', (event) => {
event.preventDefault()
Popup.driver('open', a.href)
return false
})
) )
i18n() i18n()

@ -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": "5.10.3", "version": "6.0.4",
"default_locale": "en", "default_locale": "en",
"manifest_version": 2, "manifest_version": 2,
"icons": { "icons": {

Loading…
Cancel
Save