Fix Scruntinizer issues

main
Elbert Alias 8 years ago
parent d4a4bfd3ee
commit 2492bbf8d0

@ -175,7 +175,7 @@
}; };
page.open(url, function(status) { page.open(url, function(status) {
var html, environmentVars; var html, environmentVars = '';
if ( status === 'success' ) { if ( status === 'success' ) {
html = page.content; html = page.content;
@ -186,7 +186,7 @@
// Collect environment variables // Collect environment variables
environmentVars = page.evaluate(function() { environmentVars = page.evaluate(function() {
var i, environmentVars; var i, environmentVars = '';
for ( i in window ) { for ( i in window ) {
environmentVars += i + ' '; environmentVars += i + ' ';

@ -2,6 +2,11 @@
* WebExtension driver * WebExtension driver
*/ */
/** global: browser */
/** global: chrome */
/** global: wappalyzer */
/** global: XMLHttpRequest */
(function() { (function() {
if ( wappalyzer == null ) { if ( wappalyzer == null ) {
return; return;

@ -1,6 +1,8 @@
/** global: browser */
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
var var
i, value, i, value, attr,
nodes = document.getElementsByTagName('*'); nodes = document.getElementsByTagName('*');
for ( i = 0; i < nodes.length; i ++ ) { for ( i = 0; i < nodes.length; i ++ ) {

@ -10,5 +10,7 @@
document.getElementById('wappalyzerData').appendChild(document.createComment(environmentVars)); document.getElementById('wappalyzerData').appendChild(document.createComment(environmentVars));
document.getElementById('wappalyzerData').dispatchEvent(e); document.getElementById('wappalyzerData').dispatchEvent(e);
} catch(e) { } } catch(e) {
// Fail quietly
}
}()); }());

@ -1,4 +1,5 @@
/** global: localStorage */ /** global: browser */
/** global: wappalyzer */
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
var d = document; var d = document;
@ -7,9 +8,17 @@ document.addEventListener('DOMContentLoaded', function() {
init: function() { init: function() {
options.load(); options.load();
d.querySelector('#github' ).addEventListener('click', function() { open(wappalyzer.config.githubURL); }); d.querySelector('#github').addEventListener('click', function() {
d.querySelector('#twitter' ).addEventListener('click', function() { open(wappalyzer.config.twitterURL); }); open(wappalyzer.config.githubURL);
d.querySelector('#wappalyzer').addEventListener('click', function() { open(wappalyzer.config.websiteURL); }); });
d.querySelector('#twitter').addEventListener('click', function() {
open(wappalyzer.config.twitterURL);
});
d.querySelector('#wappalyzer').addEventListener('click', function() {
open(wappalyzer.config.websiteURL);
});
}, },
get: function(name, defaultValue, callback) { get: function(name, defaultValue, callback) {

@ -385,6 +385,7 @@ var wappalyzer = (function() {
}); });
break; break;
default:
} }
} }
} }

Loading…
Cancel
Save