Work on bookmarklet driver

main
ElbertF 13 years ago
parent 0444ed6723
commit d0954b4f81

@ -4,6 +4,8 @@
<head> <head>
<title>Wappalyzer</title> <title>Wappalyzer</title>
<meta name="generator" content="WordPress"/>
<link rel="icon" type="image/png" href="images/icon.png"/> <link rel="icon" type="image/png" href="images/icon.png"/>
<script type="text/javascript" src="js/lib/jquery.min.js"></script> <script type="text/javascript" src="js/lib/jquery.min.js"></script>
@ -11,7 +13,7 @@
<style type="text/css"> <style type="text/css">
body { body {
font-family: Verdana, Arial, sans-serif; font-family: Verdana, Arial, sans-serif;
font-size: 12px; font-size: 50px;
} }
#apps { #apps {
@ -28,12 +30,14 @@
(function() { (function() {
var iframe = document.createElement('iframe'); var iframe = document.createElement('iframe');
iframe.setAttribute('id', 'wappalyzer-bookmarklet');
iframe.setAttribute('allowTransparency', 'yes'); iframe.setAttribute('allowTransparency', 'yes');
iframe.setAttribute('frameborder', 'no'); iframe.setAttribute('frameborder', 'no');
iframe.setAttribute('height', '400'); iframe.setAttribute('height', '400');
iframe.setAttribute('src', 'index.html'); iframe.setAttribute('src', 'index.html');
iframe.setAttribute('width', '250'); iframe.setAttribute('width', '220');
iframe.setAttribute('style', ' iframe.setAttribute('style', '
margin: 0 0 20px 20px;
position: absolute; position: absolute;
right: 20px; right: 20px;
top: 20px; top: 20px;

@ -1,7 +1,8 @@
body { body {
color: #000; color: #000;
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
font-size: 14px; font-size: 13px;
line-height: 1.4em;
margin: 0; margin: 0;
padding: 10px 0; padding: 10px 0;
} }
@ -35,14 +36,30 @@ body {
} }
#apps a:hover { #apps a:hover {
text-decoration: underline; color: #f90;
} }
#apps .app { #apps .app, #apps #close {
background: #fff; background: #fff;
border-radius: 5px; border-radius: 5px;
-moz-border-radius: 5px; -moz-border-radius: 5px;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
margin: 0 10px 1px 10px; margin: 0 10px 2px 10px;
padding: 5px 10px; padding: 7px 10px;
}
#apps .application {
margin-bottom: 3px;
}
#apps #close {
font-size: 12px;
font-weight: bold;
text-align: center;
text-transform: uppercase;
}
#apps .close:hover {
background: #f4f4f4;
color: #000;
} }

@ -21,7 +21,7 @@
window.document.addEventListener('DOMContentLoaded', function() { window.document.addEventListener('DOMContentLoaded', function() {
w.analyze(top.location.host, top.location.href, { w.analyze(top.location.host, top.location.href, {
html: top.document.body.innerHTML, html: top.document.documentElement.innerHTML,
env: env env: env
}); });
}); });
@ -33,17 +33,34 @@
displayApps: function() { displayApps: function() {
var url = top.location.href; var url = top.location.href;
document.getElementById('apps').innerHTML = ''; if ( w.detected[url] != null && w.detected[url].length ) { document.getElementById('apps').innerHTML =
'<a id="close" href="javascript: top.document.body.removeChild(top.document.getElementById(\'wappalyzer-bookmarklet\')); void(0);">' +
'Close' +
'</a>'
;
if ( w.detected[url] != null && w.detected[url].length ) {
w.detected[url].map(function(app, i) { w.detected[url].map(function(app, i) {
document.getElementById('apps').innerHTML += var html =
'<div class="app' + ( i == 0 ? ' first' : '' ) + '">' + '<div class="app' + ( i == 0 ? ' first' : '' ) + '">' +
'<a href="">' + '<a target="_blank" class="application" href="' + w.config.websiteURL + 'applications/' + app.toLowerCase().replace(/ /g, '-').replace(/[^a-z0-9-]/g, '') + '">' +
'<strong>' + '<strong>' +
'<img src="images/icons/' + app + '.ico" width="16" height="16"/> ' + app + '<img src="images/icons/' + app + '.ico" width="16" height="16"/> ' + app +
'</strong>' + '</strong>' +
'</a>' + '</a>'
'</div>' ;
;
for ( cat in w.apps[app].cats ) {
html +=
'<a target="_blank" class="category" href="' + w.config.websiteURL + 'categories/' + w.categories[w.apps[app].cats[cat]].plural.toLowerCase().replace(/ /g, '-').replace(/[^a-z0-9-]/g, '') + '">' +
w.categories[w.apps[app].cats[cat]].name +
'</a>'
;
}
html += '</div>';
document.getElementById('apps').innerHTML += html;
}); });
} }
}, },

@ -6,30 +6,30 @@
w.categories = { w.categories = {
1: { name: 'CMS', plural: 'CMS' }, 1: { name: 'CMS', plural: 'CMS' },
2: { name: 'Message Board', plural: 'Message Boards' }, 2: { name: 'Message Board', plural: 'Message Boards' },
3: { name: 'Database manager', plural: 'Database managers' }, 3: { name: 'Database Manager', plural: 'Database Managers' },
4: { name: 'Documentation tool', plural: 'Documentation tools' }, 4: { name: 'Documentation Tool', plural: 'Documentation Tools' },
5: { name: 'Widget', plural: 'Widgets' }, 5: { name: 'Widget', plural: 'Widgets' },
6: { name: 'Web shop', plural: 'Web shops' }, 6: { name: 'Web Shop', plural: 'Web Shops' },
7: { name: 'Photo gallery', plural: 'Photo galleries' }, 7: { name: 'Photo Gallery', plural: 'Photo Galleries' },
8: { name: 'Wiki', plural: 'Wikis' }, 8: { name: 'Wiki', plural: 'Wikis' },
9: { name: 'Hosting panel', plural: 'Hosting panels' }, 9: { name: 'Hosting Panel', plural: 'Hosting Panels' },
10: { name: 'Analytics', plural: 'Analytics' }, 10: { name: 'Analytics', plural: 'Analytics' },
11: { name: 'Blog', plural: 'Blogs' }, 11: { name: 'Blog', plural: 'Blogs' },
12: { name: 'JavaScript framework', plural: 'JavaScript frameworks' }, 12: { name: 'JavaScript Framework', plural: 'JavaScript Frameworks' },
13: { name: 'Issue tracker', plural: 'Issue trackers' }, 13: { name: 'Issue Tracker', plural: 'Issue Trackers' },
14: { name: 'Video Player', plural: 'Video Players' }, 14: { name: 'Video Player', plural: 'Video Players' },
15: { name: 'Comment System', plural: 'Comment Systems' }, 15: { name: 'Comment System', plural: 'Comment Systems' },
16: { name: 'CAPTCHA', plural: 'CAPTCHAs' }, 16: { name: 'CAPTCHA', plural: 'CAPTCHAs' },
17: { name: 'Font script', plural: 'Font scripts' }, 17: { name: 'Font Script', plural: 'Font Scripts' },
18: { name: 'Web framework', plural: 'Web frameworks' }, 18: { name: 'Web Framework', plural: 'Web Frameworks' },
19: { name: 'Miscellaneous', plural: 'Miscellaneous' }, 19: { name: 'Miscellaneous', plural: 'Miscellaneous' },
20: { name: 'Editor', plural: 'Editors' }, 20: { name: 'Editor', plural: 'Editors' },
21: { name: 'LMS', plural: 'LMS' }, 21: { name: 'LMS', plural: 'LMS' },
22: { name: 'Web server', plural: 'Web servers' }, 22: { name: 'Web Server', plural: 'Web Servers' },
23: { name: 'Cache tool', plural: 'Cache tools' }, 23: { name: 'Cache Tool', plural: 'Cache Tools' },
24: { name: 'Rich text editor', plural: 'Rich text editors' }, 24: { name: 'Rich Text Editor', plural: 'Rich Text Editors' },
25: { name: 'Javascript graphics', plural: 'Javascript graphics' }, 25: { name: 'Javascript Graphics', plural: 'Javascript Graphics' },
26: { name: 'Mobile framework', plural: 'Mobile frameworks' }, 26: { name: 'Mobile Framework', plural: 'Mobile Frameworks' },
27: { name: 'Programming Language', plural: 'Programming Languages' } 27: { name: 'Programming Language', plural: 'Programming Languages' }
}; };

Loading…
Cancel
Save