Fix icon not displaying and popup not expanding

main
Elbert Alias 7 years ago
parent 0a008afcfa
commit c4328afa30

@ -30,7 +30,7 @@ $ node index.js https://wappalyzer.com
```javascript
const wappalyzer = require('wappalyzer');
wappalyzer('https://wappalyzer.com')
wappalyzer.analyze('https://wappalyzer.com')
.then(json => {
console.log(JSON.stringify(json, null, 2));
})

@ -230,13 +230,13 @@ wappalyzer.driver.displayApps = (detected, context) => {
var app = detected[appName];
app.props.cats.forEach(category => {
var icon = app.icon || 'default.svg';
if ( category === match && !found ) {
var icon = app.props.icon || 'default.svg';
if ( !dynamicIcon ) {
icon = 'default.svg';
}
if ( category === match && !found ) {
if ( /\.svg$/i.test(icon) ) {
icon = 'converted/' + icon.replace(/\.svg$/, '.png');
}

@ -138,7 +138,7 @@ var exports = {};
'',
'tracking_enabled_response',
function(message) {
if ( message.tracking_enabled ) {
if ( message && message.tracking_enabled ) {
callback();
} else {

@ -1,8 +1,6 @@
/** global: chrome */
/** global: browser */
replaceDomWhenReady([ 'p', {}, ' ' ], document, {});
var func = tabs => {
( chrome || browser ).runtime.sendMessage({
id: 'get_apps',
@ -44,6 +42,16 @@ function replaceDom(domTemplate) {
var nodes = document.querySelectorAll('[data-i18n]');
for ( let ms = 200; ms < 500; ms += 50 ) {
setTimeout(() => {
let div = document.createElement('div');
div.style.display = 'none';
body.appendChild(div);
}, ms);
};
Array.prototype.forEach.call(nodes, node => {
node.childNodes[0].nodeValue = browser.i18n.getMessage(node.dataset.i18n);
});

Loading…
Cancel
Save