Fix terms display in popup, fix regex

main
Elbert Alias 5 years ago
parent e2c507b2d1
commit 06544a33ca

@ -1901,7 +1901,7 @@
"js": {
"_carbonads": ""
},
"script": "^(?:https?:)?\\/\\/(?:[^\\/]+\\.)*carbonads\\.com\\/",
"script": "carbonads\\.com",
"website": "http://carbonads.net"
},
"Cargo": {
@ -11640,7 +11640,7 @@
},
"script": [
"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"
},

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

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

@ -19,6 +19,10 @@
</a>
</div>
<div class="empty" data-i18n="noAppsDetected"></div>
<div class="detections"></div>
<div class="terms">
<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>
</div>
<div class="empty" data-i18n="noAppsDetected"></div>
<div class="detections"></div>
<div data-template="category" class="category">
<div class="category__heading">
<a class="category__link" href="#"></a>

@ -61,6 +61,18 @@ const Driver = {
['responseHeaders']
)
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') {

@ -31,11 +31,21 @@ const Popup = {
agent === 'chrome' || (await getOption('termsAccepted', false))
if (termsAccepted) {
document.querySelector('.terms').style.display = 'none'
Popup.driver('getDetections')
} else {
document.querySelector('.terms').style.display = 'flex'
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()
}
@ -166,7 +176,13 @@ const Popup = {
)
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()

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