diff --git a/chrome/content/content.js b/chrome/content/content.js index 4058c4b42..c7c23f1da 100644 --- a/chrome/content/content.js +++ b/chrome/content/content.js @@ -1,5 +1,5 @@ (function() { - self = { + var self = { element: false, prevUrl: '', @@ -10,6 +10,8 @@ }, log: function(message) { + return; // + var consoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService); consoleService.logStringMessage("Wappalyzer content.js: " + message); @@ -61,6 +63,10 @@ getEnvironmentVars: function() { self.log('getEnvironmentVars'); + if ( content.document.contentType != 'text/html' ) { + return; + } + var environmentVars = ''; try { @@ -112,5 +118,5 @@ self.init(); - return app; + return self; })(); diff --git a/chrome/content/options.js b/chrome/content/options.js new file mode 100644 index 000000000..292fdcda6 --- /dev/null +++ b/chrome/content/options.js @@ -0,0 +1,19 @@ +addEventListener('load', function() { + if ( typeof wappalyzer != undefined ) { + var preferences = document.getElementById('wappalyzer-options') + .getElementsByTagName('preferences')[0] + ; + + if ( preferences ) { + for ( i in wappalyzer.cats ) { + var preference = document.createElement('preference'); + + preference.setAttribute('id', 'wappalyzer-cat' + i); + preference.setAttribute('name', 'wappalyzer.cat' + i); + preference.setAttribute('type', 'bool'); + + preferences.appendChild(preference); + } + } + } +}, false); diff --git a/chrome/content/options.xul b/chrome/content/options.xul index dba4fa01d..d9828bdb9 100755 --- a/chrome/content/options.xul +++ b/chrome/content/options.xul @@ -12,6 +12,7 @@