Updated bookmarklet driver

main
Elbert Alias 8 years ago
parent 1438a9f87e
commit b81277a217

@ -1,118 +0,0 @@
div#wappalyzer-container * {
background-color: transparent !important;
border: none !important;
border-left: none !important;
border-top: none !important;
border-right: none !important;
border-bottom: none !important;
border-spacing: 0 !important;
color: inherit !important;
font-size: inherit !important;
font-weight: inherit !important;
font-family: inherit !important;
font-style: inherit !important;
line-height: inherit !important;
list-style: none inside !important;
margin: 0 !important;
outline: none !important;
padding: 0 !important;
text-align: inherit !important;
text-decoration: none !important;
white-space: inherit !important;
}
#wappalyzer-container {
background: #fff !important;
border: 1px solid #999;
box-shadow: 0 0 10px rgba(0, 0, 0, .2) !important;
color: #222 !important;
font-family: Arial, sans-serif !important;
font-size: 14px !important;
line-height: 1.5em !important;
margin: 0 !important;
position: fixed !important;
text-align: left !important;
right: 20px !important;
top: 20px !important;
width: 250px !important;
z-index: 99999 !important;
}
#wappalyzer-container #wappalyzer-pending {
background-repeat: no-repeat !important;
background-position: center center !important;
height: 60px !important;
}
#wappalyzer-container a#wappalyzer-close:link,
#wappalyzer-container a#wappalyzer-close:hover,
#wappalyzer-container a#wappalyzer-close:active,
#wappalyzer-container a#wappalyzer-close:visited {
background: #f8f8f8 !important;
border-bottom: 1px solid #ccc !important;
display: block !important;
font-weight: bold !important;
line-height: 30px !important;
text-align: center !important;
}
#wappalyzer-container #wappalyzer-close:hover {
background: #f4f4f4 !important;
color: #0072B6 !important;
}
#wappalyzer-container #wappalyzer-empty {
border-bottom: 1px solid #ccc !important;
color: #999 !important;
display: block !important;
line-height: 30px !important;
text-align: center !important;
}
#wappalyzer-container #wappalyzer-apps {
padding-top: 2px !important;
}
#wappalyzer-container #wappalyzer-apps img {
vertical-align: middle !important;
}
#wappalyzer-container #wappalyzer-apps a:link,
#wappalyzer-container #wappalyzer-apps a:hover,
#wappalyzer-container #wappalyzer-apps a:active,
#wappalyzer-container #wappalyzer-apps a:visited {
display: block !important;
text-decoration: none !important;
}
#wappalyzer-container #wappalyzer-apps a:hover {
color: #0072B6 !important;
}
#wappalyzer-container #wappalyzer-apps div.wappalyzer-app {
background: #fff !important;
border-radius: 5px !important;
-moz-border-radius: 5px !important;
-webkit-border-radius: 5px !important;
margin: 0 2px 2px 2px !important;
padding: 7px 10px !important;
}
#wappalyzer-container #wappalyzer-apps a.wappalyzer-application:link,
#wappalyzer-container #wappalyzer-apps a.wappalyzer-application:hover,
#wappalyzer-container #wappalyzer-apps a.wappalyzer-application:active,
#wappalyzer-container #wappalyzer-apps a.wappalyzer-application:visited {
font-weight: bold !important;
margin-bottom: 3px !important;
}
#wappalyzer-container #wappalyzer-apps a.wappalyzer-category:link,
#wappalyzer-container #wappalyzer-apps a.wappalyzer-category:hover,
#wappalyzer-container #wappalyzer-apps a.wappalyzer-category:active,
#wappalyzer-container #wappalyzer-apps a.wappalyzer-category:visited {
color: #999 !important;
}
#wappalyzer-container #wappalyzer-apps a.wappalyzer-category:hover {
color: #0072B6 !important;
}

@ -3,7 +3,9 @@
*/
(function() {
if ( wappalyzer == null ) return;
if ( typeof wappalyzer === 'undefined' ) {
return;
}
var
w = wappalyzer,
@ -12,51 +14,7 @@
container = d.getElementById('wappalyzer-container'),
domain = window.top.location.host,
url = window.top.location.href,
hasOwn = Object.prototype.hasOwnProperty,
categoryNames = {
1: 'CMS',
2: 'Message Board',
3: 'Database Manager',
4: 'Documentation Tool',
5: 'Widget',
6: 'Web Shop',
7: 'Photo Gallery',
8: 'Wiki',
9: 'Hosting Panel',
10: 'Analytics',
11: 'Blog',
12: 'JavaScript Framework',
13: 'Issue Tracker',
14: 'Video Player',
15: 'Comment System',
16: 'Captcha',
17: 'Font Script',
18: 'Web Framework',
19: 'Miscellaneous',
20: 'Editor',
21: 'LMS',
22: 'Web Server',
23: 'Cache Tool',
24: 'Rich Text Editor',
25: 'JavaScript Graphics',
26: 'Mobile Framework',
27: 'Programming Language',
28: 'Operating System',
29: 'Search Engine',
30: 'Web Mail',
31: 'CDN',
32: 'Marketing Automation',
33: 'Web Server Extensions',
34: 'Databases',
35: 'Maps',
36: 'Advertising Networks',
37: 'Network Devices',
38: 'Media Servers',
39: 'Webcams',
40: 'Printers',
41: 'Payment Processors'
}
;
hasOwn = Object.prototype.hasOwnProperty;
w.driver = {
timeout: 1000,
@ -81,9 +39,11 @@
getEnvironmentVars: function() {
w.log('func: getEnvironmentVars');
var env = new Array;
var i, env = [];
for ( i in window ) { env.push(i); }
for ( i in window ) {
env.push(i);
}
w.analyze(domain, url, { html: d.documentElement.innerHTML, env: env });
},
@ -105,6 +65,8 @@
var responseHeaders = {};
headers.forEach(function(line) {
var name, value;
if ( line ) {
name = line.substring(0, line.indexOf(': '));
value = line.substring(line.indexOf(': ') + 2, line.length - 1);
@ -128,39 +90,40 @@
w.log('func: diplayApps');
var
i,
first = true,
app,
category,
html
;
html;
html =
'<a id="wappalyzer-close" href="javascript: window.document.body.removeChild(window.document.getElementById(\'wappalyzer-container\')); void(0);">' +
'Close' +
'</a>' +
'<div id="wappalyzer-apps">'
;
'<div id="wappalyzer-apps">';
if ( w.detected[url] != null && Object.keys(w.detected[url]).length ) {
for ( app in w.detected[url] ) {
if(!hasOwn.call(w.detected[url], app)) {
if ( !hasOwn.call(w.detected[url], app) ) {
continue;
}
html +=
'<div class="wappalyzer-app' + ( first ? ' wappalyzer-first' : '' ) + '">' +
'<a target="_blank" class="wappalyzer-application" href="' + w.config.websiteURL + 'applications/' + app.toLowerCase().replace(/ /g, '-').replace(/[^a-z0-9-]/g, '') + '">' +
'<strong>' +
'<img src="' + w.config.websiteURL + 'bookmarklet/images/icons/' + w.apps[app].icon + '" width="16" height="16"/> ' + app +
'</strong>' +
'</a>'
;
'</a>';
for ( i in w.apps[app].cats ) {
if(!hasOwn.call(w.apps[app].cats, i)) {
if ( !hasOwn.call(w.apps[app].cats, i) ) {
continue;
}
category = w.apps[app].cats[i];
html += '<a target="_blank" class="wappalyzer-category" href="' + w.config.websiteURL + 'categories/' + w.categories[category] + '">' + categoryNames[category] + '</a>';
category = w.categories[w.apps[app].cats[i]];
html += '<a target="_blank" class="wappalyzer-category" href="' + w.config.websiteURL + 'categories/' + w.slugify(category) + '">' + category + '</a>';
}
html += '</div>';
@ -181,7 +144,11 @@
*/
goToURL: function(args) {
window.open(args.url);
}
},
slugify = function(string) {
return string.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, '');
};
};
w.init();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

@ -1,94 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Wappalyzer</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<style type="text/css">
body {
color: #000;
font-family: Verdana, Arial, sans-serif;
font-size: 14px;
}
#bookmarklet {
border: 1px solid #333;
color: #000;
display: inline-block;
padding: 10px 25px;
text-decoration: none;
}
</style>
</head>
<body>
<p>
Drag this button to your bookmarks toolbar:
</p>
<p>
<a id="bookmarklet" href="javascript: void(0);">Wappalyzer</a>
</p>
<div id="bookmarklet-code" style="display: none">
(function() {
var
d = document,
e = d.getElementById('wappalyzer-container');
if ( e !== null ) {
d.body.removeChild(e);
}
var
u = 'https://wappalyzer.com/bookmarklet/',
t = new Date().getTime(),
c = d.createElement('div'),
p = d.createElement('div'),
l = d.createElement('link'),
s = d.createElement('script');
c.setAttribute('id', 'wappalyzer-container');
l.setAttribute('rel', 'stylesheet');
l.setAttribute('href', u + 'css/wappalyzer.css');
d.head.appendChild(l);
p.setAttribute('id', 'wappalyzer-pending');
p.setAttribute('style', 'background-image: url(' + u + 'images/pending.gif) !important');
c.appendChild(p);
s.setAttribute('src', u + 'js/wappalyzer.js?' + t);
s.onload = function() {
s = d.createElement('script');
s.setAttribute('src', u + 'js/apps.js?' + t);
s.onload = function() {
s = d.createElement('script');
s.setAttribute('src', u + 'js/driver.js?' + t);
c.appendChild(s);
};
c.appendChild(s);
};
c.appendChild(s);
d.body.appendChild(c);
})();
</div>
<script>
$('#bookmarklet').attr('href', 'javascript:' + $('#bookmarklet-code').html().replace(/\s+/g, ' '));
</script>
</body>
</html>