Work on bookmarklet driver

main
ElbertF 13 years ago
parent 27023c2460
commit f8908e4a7f

@ -0,0 +1,48 @@
<!DOCTYPE html>
<html>
<head>
<title>Wappalyzer</title>
<link rel="icon" type="image/png" href="images/icon.png"/>
<script type="text/javascript" src="js/lib/jquery.min.js"></script>
<style type="text/css">
body {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
}
#apps {
line-height: 20px;
}
#apps img {
vertical-align: middle;
}
</style>
</head>
<body>
<a href="javascript:
(function() {
var iframe = document.createElement('iframe');
iframe.setAttribute('allowTransparency', 'yes');
iframe.setAttribute('frameborder', 'no');
iframe.setAttribute('height', '300');
iframe.setAttribute('src', 'index.html');
iframe.setAttribute('width', '250');
iframe.setAttribute('style', '
position: absolute;
right: 20px;
top: 20px;
');
document.body.appendChild(iframe);
})();
void(0);
">Wappalyzer</a>
</body>
</html>

@ -0,0 +1,43 @@
body {
color: #fff;
font-family: Arial, sans-serif;
font-size: 14px;
margin: 0;
padding: 10px;
}
#overlay {
background: #000;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
left: 0;
height: 100%;
opacity: .5; filter: alpha(opacity = 50);
position: absolute;
top: 0;
width: 100%;
}
#apps {
position: absolute;
}
#apps img {
vertical-align: middle;
}
#apps a {
color: #fff;
display: block;
text-decoration: none;
}
#apps a:hover {
text-decoration: underline;
}
#apps .app {
background: #000;
padding: 10px;
}

@ -0,0 +1 @@
../../../share/images/icons

@ -0,0 +1,14 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/wappalyzer.css"/>
<script type="text/javascript" src="js/wappalyzer.js"></script>
<script type="text/javascript" src="js/apps.js"></script>
<script type="text/javascript" src="js/driver.js"></script>
</head>
<body>
<div id="overlay"></div>
<div id="apps"></div>
</body>
</html>

@ -0,0 +1 @@
../../../share/js/apps.js

@ -0,0 +1,58 @@
(function() {
if ( wappalyzer == null ) return;
var w = wappalyzer;
w.driver = {
/**
* Log messages to console
*/
log: function(args) {
if ( console != null ) console[args.type](args.message);
},
/**
* Initialize
*/
init: function() {
var env = new Array;
for ( var i in top ) env.push(i);
window.document.addEventListener('DOMContentLoaded', function() {
w.analyze(top.location.host, top.location.href, {
html: top.document.body.innerHTML,
env: env
});
});
},
/**
* Display apps
*/
displayApps: function() {
var url = top.location.href;
document.getElementById('apps').innerHTML = ''; if ( w.detected[url] != null && w.detected[url].length ) {
w.detected[url].map(function(app, i) {
document.getElementById('apps').innerHTML +=
'<div class="app' + ( i == 0 ? ' first' : '' ) + '">' +
'<a href="">' +
'<img src="images/icons/' + app + '.ico" width="16" height="16"/> ' + app +
'</a>' +
'</div>'
;
});
}
},
/**
* Go to URL
*/
goToURL: function(args) {
window.open(args.url);
}
};
w.init();
})();

@ -0,0 +1 @@
../../../share/js/lib

@ -0,0 +1 @@
../../../share/js/wappalyzer.js
Loading…
Cancel
Save