diff --git a/src/drivers/bookmarklet/css/wappalyzer.css b/src/drivers/bookmarklet/css/wappalyzer.css deleted file mode 100644 index 67836659c..000000000 --- a/src/drivers/bookmarklet/css/wappalyzer.css +++ /dev/null @@ -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; - } diff --git a/src/drivers/bookmarklet/js/driver.js b/src/drivers/bookmarklet/driver.js similarity index 67% rename from src/drivers/bookmarklet/js/driver.js rename to src/drivers/bookmarklet/driver.js index dc6772365..16e5fb816 100644 --- a/src/drivers/bookmarklet/js/driver.js +++ b/src/drivers/bookmarklet/driver.js @@ -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 = '' + 'Close' + '' + - '
' - ; + '
'; 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 += '
' + '' + '' + ' ' + app + '' + - '' - ; + ''; 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 += '' + categoryNames[category] + ''; + category = w.categories[w.apps[app].cats[i]]; + + html += '' + category + ''; } html += '
'; @@ -181,7 +144,11 @@ */ goToURL: function(args) { window.open(args.url); - } + }, + + slugify = function(string) { + return string.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, ''); + }; }; w.init(); diff --git a/src/drivers/bookmarklet/images/icons/.gitkeep b/src/drivers/bookmarklet/images/icons/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/drivers/bookmarklet/images/pending.gif b/src/drivers/bookmarklet/images/pending.gif deleted file mode 100644 index 3864c0797..000000000 Binary files a/src/drivers/bookmarklet/images/pending.gif and /dev/null differ diff --git a/src/drivers/bookmarklet/index.html b/src/drivers/bookmarklet/index.html deleted file mode 100644 index f15dffed1..000000000 --- a/src/drivers/bookmarklet/index.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - Wappalyzer - - - - - - -

- Drag this button to your bookmarks toolbar: -

- -

- Wappalyzer -

- - - - - -