diff --git a/drivers/firefox/chrome.manifest b/drivers/firefox-xul/chrome.manifest similarity index 100% rename from drivers/firefox/chrome.manifest rename to drivers/firefox-xul/chrome.manifest diff --git a/drivers/firefox/content/js/content.js b/drivers/firefox-xul/content/js/content.js similarity index 100% rename from drivers/firefox/content/js/content.js rename to drivers/firefox-xul/content/js/content.js diff --git a/drivers/firefox/content/js/driver.js b/drivers/firefox-xul/content/js/driver.js similarity index 100% rename from drivers/firefox/content/js/driver.js rename to drivers/firefox-xul/content/js/driver.js diff --git a/drivers/firefox/content/xul/preferences.xul b/drivers/firefox-xul/content/xul/preferences.xul similarity index 100% rename from drivers/firefox/content/xul/preferences.xul rename to drivers/firefox-xul/content/xul/preferences.xul diff --git a/drivers/firefox/content/xul/wappalyzer.xul b/drivers/firefox-xul/content/xul/wappalyzer.xul similarity index 100% rename from drivers/firefox/content/xul/wappalyzer.xul rename to drivers/firefox-xul/content/xul/wappalyzer.xul diff --git a/drivers/firefox/defaults/preferences/defaults.js b/drivers/firefox-xul/defaults/preferences/defaults.js similarity index 100% rename from drivers/firefox/defaults/preferences/defaults.js rename to drivers/firefox-xul/defaults/preferences/defaults.js diff --git a/drivers/firefox/install.rdf b/drivers/firefox-xul/install.rdf similarity index 100% rename from drivers/firefox/install.rdf rename to drivers/firefox-xul/install.rdf diff --git a/drivers/firefox/locale/de-DE/wappalyzer.dtd b/drivers/firefox-xul/locale/de-DE/wappalyzer.dtd similarity index 100% rename from drivers/firefox/locale/de-DE/wappalyzer.dtd rename to drivers/firefox-xul/locale/de-DE/wappalyzer.dtd diff --git a/drivers/firefox/locale/de-DE/wappalyzer.properties b/drivers/firefox-xul/locale/de-DE/wappalyzer.properties similarity index 100% rename from drivers/firefox/locale/de-DE/wappalyzer.properties rename to drivers/firefox-xul/locale/de-DE/wappalyzer.properties diff --git a/drivers/firefox/locale/en-UK/wappalyzer.dtd b/drivers/firefox-xul/locale/en-UK/wappalyzer.dtd similarity index 100% rename from drivers/firefox/locale/en-UK/wappalyzer.dtd rename to drivers/firefox-xul/locale/en-UK/wappalyzer.dtd diff --git a/drivers/firefox/locale/en-UK/wappalyzer.properties b/drivers/firefox-xul/locale/en-UK/wappalyzer.properties similarity index 100% rename from drivers/firefox/locale/en-UK/wappalyzer.properties rename to drivers/firefox-xul/locale/en-UK/wappalyzer.properties diff --git a/drivers/firefox/locale/en-US/wappalyzer.dtd b/drivers/firefox-xul/locale/en-US/wappalyzer.dtd similarity index 100% rename from drivers/firefox/locale/en-US/wappalyzer.dtd rename to drivers/firefox-xul/locale/en-US/wappalyzer.dtd diff --git a/drivers/firefox/locale/en-US/wappalyzer.properties b/drivers/firefox-xul/locale/en-US/wappalyzer.properties similarity index 100% rename from drivers/firefox/locale/en-US/wappalyzer.properties rename to drivers/firefox-xul/locale/en-US/wappalyzer.properties diff --git a/drivers/firefox/locale/es-ES/wappalyzer.dtd b/drivers/firefox-xul/locale/es-ES/wappalyzer.dtd similarity index 100% rename from drivers/firefox/locale/es-ES/wappalyzer.dtd rename to drivers/firefox-xul/locale/es-ES/wappalyzer.dtd diff --git a/drivers/firefox/locale/es-ES/wappalyzer.properties b/drivers/firefox-xul/locale/es-ES/wappalyzer.properties similarity index 100% rename from drivers/firefox/locale/es-ES/wappalyzer.properties rename to drivers/firefox-xul/locale/es-ES/wappalyzer.properties diff --git a/drivers/firefox/locale/fr-FR/wappalyzer.dtd b/drivers/firefox-xul/locale/fr-FR/wappalyzer.dtd similarity index 100% rename from drivers/firefox/locale/fr-FR/wappalyzer.dtd rename to drivers/firefox-xul/locale/fr-FR/wappalyzer.dtd diff --git a/drivers/firefox/locale/fr-FR/wappalyzer.properties b/drivers/firefox-xul/locale/fr-FR/wappalyzer.properties similarity index 100% rename from drivers/firefox/locale/fr-FR/wappalyzer.properties rename to drivers/firefox-xul/locale/fr-FR/wappalyzer.properties diff --git a/drivers/firefox/locale/nl-NL/wappalyzer.dtd b/drivers/firefox-xul/locale/nl-NL/wappalyzer.dtd similarity index 100% rename from drivers/firefox/locale/nl-NL/wappalyzer.dtd rename to drivers/firefox-xul/locale/nl-NL/wappalyzer.dtd diff --git a/drivers/firefox/locale/nl-NL/wappalyzer.properties b/drivers/firefox-xul/locale/nl-NL/wappalyzer.properties similarity index 100% rename from drivers/firefox/locale/nl-NL/wappalyzer.properties rename to drivers/firefox-xul/locale/nl-NL/wappalyzer.properties diff --git a/drivers/firefox/skin/css/wappalyzer.css b/drivers/firefox-xul/skin/css/wappalyzer.css similarity index 100% rename from drivers/firefox/skin/css/wappalyzer.css rename to drivers/firefox-xul/skin/css/wappalyzer.css diff --git a/drivers/firefox/skin/images/feedback.png b/drivers/firefox-xul/skin/images/feedback.png similarity index 100% rename from drivers/firefox/skin/images/feedback.png rename to drivers/firefox-xul/skin/images/feedback.png diff --git a/drivers/firefox/skin/images/github.png b/drivers/firefox-xul/skin/images/github.png similarity index 100% rename from drivers/firefox/skin/images/github.png rename to drivers/firefox-xul/skin/images/github.png diff --git a/drivers/firefox/skin/images/icon.png b/drivers/firefox-xul/skin/images/icon.png similarity index 100% rename from drivers/firefox/skin/images/icon.png rename to drivers/firefox-xul/skin/images/icon.png diff --git a/drivers/firefox/skin/images/icon128.png b/drivers/firefox-xul/skin/images/icon128.png similarity index 100% rename from drivers/firefox/skin/images/icon128.png rename to drivers/firefox-xul/skin/images/icon128.png diff --git a/drivers/firefox/skin/images/icon32.png b/drivers/firefox-xul/skin/images/icon32.png similarity index 100% rename from drivers/firefox/skin/images/icon32.png rename to drivers/firefox-xul/skin/images/icon32.png diff --git a/drivers/firefox/skin/images/icon64.png b/drivers/firefox-xul/skin/images/icon64.png similarity index 100% rename from drivers/firefox/skin/images/icon64.png rename to drivers/firefox-xul/skin/images/icon64.png diff --git a/drivers/firefox/skin/images/icon_hot.png b/drivers/firefox-xul/skin/images/icon_hot.png similarity index 100% rename from drivers/firefox/skin/images/icon_hot.png rename to drivers/firefox-xul/skin/images/icon_hot.png diff --git a/drivers/firefox/skin/images/twitter.png b/drivers/firefox-xul/skin/images/twitter.png similarity index 100% rename from drivers/firefox/skin/images/twitter.png rename to drivers/firefox-xul/skin/images/twitter.png diff --git a/drivers/firefox-sdk/README.md b/drivers/firefox/README.md similarity index 100% rename from drivers/firefox-sdk/README.md rename to drivers/firefox/README.md diff --git a/drivers/firefox-sdk/data/css/panel.css b/drivers/firefox/data/css/panel.css similarity index 100% rename from drivers/firefox-sdk/data/css/panel.css rename to drivers/firefox/data/css/panel.css diff --git a/drivers/firefox-sdk/data/images/icon32.png b/drivers/firefox/data/images/icon32.png similarity index 100% rename from drivers/firefox-sdk/data/images/icon32.png rename to drivers/firefox/data/images/icon32.png diff --git a/drivers/firefox-sdk/data/images/icon32_hot.png b/drivers/firefox/data/images/icon32_hot.png similarity index 100% rename from drivers/firefox-sdk/data/images/icon32_hot.png rename to drivers/firefox/data/images/icon32_hot.png diff --git a/drivers/firefox-sdk/data/js/content.js b/drivers/firefox/data/js/content.js similarity index 100% rename from drivers/firefox-sdk/data/js/content.js rename to drivers/firefox/data/js/content.js diff --git a/drivers/firefox-sdk/data/js/panel.js b/drivers/firefox/data/js/panel.js similarity index 100% rename from drivers/firefox-sdk/data/js/panel.js rename to drivers/firefox/data/js/panel.js diff --git a/drivers/firefox-sdk/data/js/tab.js b/drivers/firefox/data/js/tab.js similarity index 100% rename from drivers/firefox-sdk/data/js/tab.js rename to drivers/firefox/data/js/tab.js diff --git a/drivers/firefox-sdk/data/panel.html b/drivers/firefox/data/panel.html similarity index 100% rename from drivers/firefox-sdk/data/panel.html rename to drivers/firefox/data/panel.html diff --git a/drivers/firefox-sdk/doc/main.md b/drivers/firefox/doc/main.md similarity index 100% rename from drivers/firefox-sdk/doc/main.md rename to drivers/firefox/doc/main.md diff --git a/drivers/firefox-sdk/images/icon128.png b/drivers/firefox/images/icon128.png similarity index 100% rename from drivers/firefox-sdk/images/icon128.png rename to drivers/firefox/images/icon128.png diff --git a/drivers/firefox-sdk/images/icon128_hot.png b/drivers/firefox/images/icon128_hot.png similarity index 100% rename from drivers/firefox-sdk/images/icon128_hot.png rename to drivers/firefox/images/icon128_hot.png diff --git a/drivers/firefox-sdk/images/icon16.png b/drivers/firefox/images/icon16.png similarity index 100% rename from drivers/firefox-sdk/images/icon16.png rename to drivers/firefox/images/icon16.png diff --git a/drivers/firefox-sdk/images/icon16_hot.png b/drivers/firefox/images/icon16_hot.png similarity index 100% rename from drivers/firefox-sdk/images/icon16_hot.png rename to drivers/firefox/images/icon16_hot.png diff --git a/drivers/firefox-sdk/images/icon48.png b/drivers/firefox/images/icon48.png similarity index 100% rename from drivers/firefox-sdk/images/icon48.png rename to drivers/firefox/images/icon48.png diff --git a/drivers/firefox-sdk/images/icon48_hot.png b/drivers/firefox/images/icon48_hot.png similarity index 100% rename from drivers/firefox-sdk/images/icon48_hot.png rename to drivers/firefox/images/icon48_hot.png diff --git a/drivers/firefox-sdk/images/icon64.png b/drivers/firefox/images/icon64.png similarity index 100% rename from drivers/firefox-sdk/images/icon64.png rename to drivers/firefox/images/icon64.png diff --git a/drivers/firefox-sdk/images/icon64_hot.png b/drivers/firefox/images/icon64_hot.png similarity index 100% rename from drivers/firefox-sdk/images/icon64_hot.png rename to drivers/firefox/images/icon64_hot.png diff --git a/drivers/firefox-sdk/lib/driver.js b/drivers/firefox/lib/driver.js similarity index 94% rename from drivers/firefox-sdk/lib/driver.js rename to drivers/firefox/lib/driver.js index 2b20d06ad..c24a42801 100644 --- a/drivers/firefox-sdk/lib/driver.js +++ b/drivers/firefox/lib/driver.js @@ -6,8 +6,6 @@ main = require('wappalyzer'), w = main.wappalyzer, mediator = Cc['@mozilla.org/appshell/window-mediator;1'].getService(Ci.nsIWindowMediator), - doc = mediator.getMostRecentWindow('navigator:browser').document, - urlBar = doc.getElementById('urlbar-icons'), tabCache = {}, headersCache = {}, categoryNames = {}, @@ -21,7 +19,9 @@ addIcon, removeIcons, createPanel, - createWidget; + createWidget, + getUrlBar, + getDocument; initTab = function(tab) { tabCache[tab.id] = { count: 0, appsDetected: [] }; @@ -65,10 +65,9 @@ addIcon = function(url) { var - icon = doc.createElement('image'), + icon = getDocument().createElement('image'), show = true; - icon.setAttribute('src', data.url(url)); icon.setAttribute('class', 'wappalyzer-icon'); icon.setAttribute('width', '16'); @@ -97,7 +96,7 @@ } }, false); - urlBar.appendChild(icon); + getUrlBar().appendChild(icon); return icon; }; @@ -106,10 +105,10 @@ var icons; do { - icons = urlBar.getElementsByClassName('wappalyzer-icon'); + icons = getUrlBar().getElementsByClassName('wappalyzer-icon'); if ( icons.length ) { - urlBar.removeChild(icons[0]); + getUrlBar().removeChild(icons[0]); } } while ( icons.length ); }; @@ -143,6 +142,14 @@ }); } + getUrlBar = function() { + return getDocument().getElementById('urlbar-icons'); + } + + getDocument = function() { + return mediator.getMostRecentWindow('navigator:browser').document; + } + w.driver = { /** * Log messages to console @@ -157,6 +164,8 @@ init: function(callback) { var json = JSON.parse(data.load('apps.json')); + console.log('xxxx'); + if ( sp.prefs.urlbar ) { createPanel(); } else { diff --git a/drivers/firefox-sdk/locale/de-DE.properties b/drivers/firefox/locale/de-DE.properties similarity index 100% rename from drivers/firefox-sdk/locale/de-DE.properties rename to drivers/firefox/locale/de-DE.properties diff --git a/drivers/firefox-sdk/locale/en-GB.properties b/drivers/firefox/locale/en-GB.properties similarity index 100% rename from drivers/firefox-sdk/locale/en-GB.properties rename to drivers/firefox/locale/en-GB.properties diff --git a/drivers/firefox-sdk/locale/en-US.properties b/drivers/firefox/locale/en-US.properties similarity index 100% rename from drivers/firefox-sdk/locale/en-US.properties rename to drivers/firefox/locale/en-US.properties diff --git a/drivers/firefox-sdk/locale/es-ES.properties b/drivers/firefox/locale/es-ES.properties similarity index 100% rename from drivers/firefox-sdk/locale/es-ES.properties rename to drivers/firefox/locale/es-ES.properties diff --git a/drivers/firefox-sdk/locale/fr-FR.properties b/drivers/firefox/locale/fr-FR.properties similarity index 100% rename from drivers/firefox-sdk/locale/fr-FR.properties rename to drivers/firefox/locale/fr-FR.properties diff --git a/drivers/firefox-sdk/locale/nl-NL.properties b/drivers/firefox/locale/nl-NL.properties similarity index 100% rename from drivers/firefox-sdk/locale/nl-NL.properties rename to drivers/firefox/locale/nl-NL.properties diff --git a/drivers/firefox-sdk/package.json b/drivers/firefox/package.json similarity index 100% rename from drivers/firefox-sdk/package.json rename to drivers/firefox/package.json diff --git a/links.sh b/links.sh index 5572552cb..33b05ae01 100755 --- a/links.sh +++ b/links.sh @@ -1,12 +1,12 @@ #!/bin/sh -ln -f share/images/icons/*.png drivers/firefox/skin/images/icons -ln -f share/apps.json drivers/firefox/content -ln -f share/js/wappalyzer.js drivers/firefox/content/js +ln -f share/images/icons/*.png drivers/firefox-xul/skin/images/icons +ln -f share/apps.json drivers/firefox-xul/content +ln -f share/js/wappalyzer.js drivers/firefox-xul/content/js -ln -f share/images/icons/*.png drivers/firefox-sdk/data/images/icons -ln -f share/apps.json drivers/firefox-sdk/data -ln -f share/js/wappalyzer.js drivers/firefox-sdk/lib +ln -f share/images/icons/*.png drivers/firefox/data/images/icons +ln -f share/apps.json drivers/firefox/data +ln -f share/js/wappalyzer.js drivers/firefox/lib ln -f share/images/icons/*.png drivers/chrome/images/icons ln -f share/apps.json drivers/chrome diff --git a/package.cmd b/package.cmd index 067d8b4fc..e80ccdcc8 100644 --- a/package.cmd +++ b/package.cmd @@ -53,9 +53,9 @@ cd drivers\chrome&&%zip% a -tzip -mx9 ..\..\wappalyzer-chrome.zip * cd..\.. ::Pack Firefox extension -cd drivers\firefox&&%zip% a -tzip -mx9 ..\..\wappalyzer-firefox.xpi * -cd..\.. +::cd drivers\firefox&&%zip% a -tzip -mx9 ..\..\wappalyzer-firefox.xpi * +::cd..\.. :end -@echo on \ No newline at end of file +@echo on diff --git a/package.sh b/package.sh index 7332ecd64..1628df7fa 100755 --- a/package.sh +++ b/package.sh @@ -7,4 +7,4 @@ path=`pwd` rm -f wappalyzer-chrome.zip wappalyzer-firefox.xpi cd $path/drivers/chrome && zip -r $path/wappalyzer-chrome.zip . -cd $path/drivers/firefox && zip -r $path/wappalyzer-firefox.xpi . +#cd $path/drivers/firefox && zip -r $path/wappalyzer-firefox.xpi . diff --git a/share/images/icons/ZURB Foundation.png b/share/images/icons/ZURB Foundation.png index f6775dbcd..4567d011a 100644 Binary files a/share/images/icons/ZURB Foundation.png and b/share/images/icons/ZURB Foundation.png differ