You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.2 KiB

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="popup.css">
<script>
var wappalyzer = {};
categoryNames = {
1: 'CMS',
2: 'Message Boards',
3: 'Database Managers',
4: 'Documentation Tools',
5: 'Widgets',
6: 'Web Shops',
7: 'Photo Galleries',
8: 'Wikis',
9: 'Hosting Panels',
10: 'Analytics',
11: 'Blogs',
12: 'Javascript Frameworks',
13: 'Issue Trackers',
14: 'Video Players',
15: 'Comment Systems',
16: 'Captchas',
17: 'Font Scripts',
18: 'Web Frameworks',
19: 'Miscellaneous',
20: 'Editors',
21: 'LMS',
22: 'Web Servers',
23: 'Cache Tools',
24: 'Rich Text Editors',
25: 'Javascript Graphics',
26: 'Mobile Frameworks',
27: 'Programming Languages',
28: 'Operating Systems',
29: 'Search Engines'
};
</script>
<script src="js/apps.js"></script>
</head>
<body>
<div id="detected-apps"></div>
<script>
console.log('popup.html');
var detectedApps = document.getElementById('detected-apps');
detectedApps.innerHTML = '<div class="empty">No applications detected.</div>';
chrome.tabs.getSelected(null, function(tab) {
chrome.extension.sendRequest({ msg: 'get_apps', tab: tab }, function(response) {
if ( response.tabCache.count ) {
while ( detectedApps.childNodes.length > 0 ) {
detectedApps.removeChild(detectedApps.childNodes.item(0));
}
response.tabCache.appsDetected.map(function(appName) {
html =
'<a target="_blank" href="http://wappalyzer.com/applications/' + encodeURIComponent(appName) + '">' +
'<img src="images/icons/' + appName + '.png"/>' +
'<span class="label">' + appName + '</span>' +
'</a>'
;
wappalyzer.apps[appName].cats.map(function(cat) {
html +=
'<a target="_blank" href="http://wappalyzer.com/categories/' + wappalyzer.categories[cat] + '">' +
'<span class="category">' + categoryNames[cat] + '</span>' +
'</a>';
});
html += '</a>';
var e = document.createElement('div');
e.setAttribute('class', 'detected-app');
e.innerHTML = html;
detectedApps.appendChild(e);
});
}
});
});
</script>
</body>
</html>