Merge pull request #1436 from craiglondon/VariableDeclaration

Fix declaration of some variables
main
Elbert Alias 8 years ago committed by GitHub
commit 0ba426d578

@ -9,7 +9,7 @@
var var
w = wappalyzer, w = wappalyzer,
debug = true debug = true,
d = window.document, d = window.document,
container = d.getElementById('wappalyzer-container'), container = d.getElementById('wappalyzer-container'),
domain = window.top.location.host, domain = window.top.location.host,

@ -1,9 +1,8 @@
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
var var
i, value, i, value,
d = document d = document,
nodes = d.getElementsByTagName('*') nodes = d.getElementsByTagName('*');
;
for ( i = 0; i < nodes.length; i ++ ) { for ( i = 0; i < nodes.length; i ++ ) {
if ( attr = nodes[i].dataset.i18n ) { if ( attr = nodes[i].dataset.i18n ) {

@ -1,6 +1,7 @@
(function() { (function() {
try { try {
var i, environmentVars, e = document.createEvent('Events'); var i, environmentVars,
e = document.createEvent('Events');
e.initEvent('wappalyzerEvent', true, false); e.initEvent('wappalyzerEvent', true, false);

@ -37,7 +37,7 @@ document.addEventListener('DOMContentLoaded', function() {
confidence = response.tabCache.appsDetected[appName].confidenceTotal; confidence = response.tabCache.appsDetected[appName].confidenceTotal;
version = response.tabCache.appsDetected[appName].version; version = response.tabCache.appsDetected[appName].version;
html = var html =
'<div class="detected-app">' + '<div class="detected-app">' +
'<a target="_blank" href="https://wappalyzer.com/applications/' + slugify(appName) + '?pk_campaign=chrome&pk_kwd=popup">' + '<a target="_blank" href="https://wappalyzer.com/applications/' + slugify(appName) + '?pk_campaign=chrome&pk_kwd=popup">' +
'<img src="images/icons/' + response.apps[appName].icon + '"/>' + '<img src="images/icons/' + response.apps[appName].icon + '"/>' +

@ -1,7 +1,7 @@
(function() { (function() {
self.port.on('displayApps', function(message) { self.port.on('displayApps', function(message) {
var var
div, a, img, label, name, slugify, div, a, img, label, name, slugify, confidence, version,
d = document, d = document,
detectedApps = d.getElementById('detected-apps'), detectedApps = d.getElementById('detected-apps'),
empty = d.getElementById('empty'); empty = d.getElementById('empty');
@ -52,8 +52,8 @@
label.appendChild(name); label.appendChild(name);
label.appendChild(d.createTextNode(( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : ''))); label.appendChild(d.createTextNode(( version ? ' ' + version : '' ) + ( confidence < 100 ? ' (' + confidence + '% sure)' : '')));
a.appendChild(img) a.appendChild(img);
a.appendChild(label) a.appendChild(label);
div.appendChild(a); div.appendChild(a);

@ -4,8 +4,8 @@
try { try {
if ( document && document.contentType === 'text/html' ) { if ( document && document.contentType === 'text/html' ) {
var var
html = new XMLSerializer().serializeToString(document) html = new XMLSerializer().serializeToString(document),
env = []; env = []; // TODO: Remove, `env` not used in this scope?
self.port.emit('log', html); self.port.emit('log', html);

@ -5,8 +5,8 @@
scriptDir, scriptDir,
scriptPath = require('fs').absolute(require('system').args[0]), scriptPath = require('fs').absolute(require('system').args[0]),
resourceTimeout = 9000, resourceTimeout = 9000,
args = [], args = [], // TODO: Not used, maybe should be `arg`
debug = false; // Output debug messages debug = false, // Output debug messages
quiet = false; // Don't output errors quiet = false; // Don't output errors
try { try {

Loading…
Cancel
Save