Fix FF driver links, Chrome driver category issue

main
Elbert Alias 12 years ago
parent 5c35faf7ea
commit 6b19c9316f

@ -144,6 +144,7 @@
w.driver.categoryOrder.map(function(match) { w.driver.categoryOrder.map(function(match) {
for ( appName in w.detected[tab.url] ) { for ( appName in w.detected[tab.url] ) {
w.apps[appName].cats.map(function(cat) {
if ( cat == match && !found ) { if ( cat == match && !found ) {
chrome.browserAction.setIcon({ tabId: tab.id, path: 'images/icons/' + appName + '.png' }); chrome.browserAction.setIcon({ tabId: tab.id, path: 'images/icons/' + appName + '.png' });

@ -193,9 +193,10 @@
menuItem.setAttribute('image', 'chrome://wappalyzer/skin/images/icons/' + app + '.png'); menuItem.setAttribute('image', 'chrome://wappalyzer/skin/images/icons/' + app + '.png');
menuItem.setAttribute('label', app + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' )); menuItem.setAttribute('label', app + ( confidence < 100 ? ' (' + confidence + '% sure)' : '' ));
menuItem.setAttribute('name', app); menuItem.setAttribute('name', app);
menuItem.setAttribute('data-url', w.config.websiteURL + 'applications/' + app.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, ''));
menuItem.addEventListener('command', function() { menuItem.addEventListener('command', function() {
w.driver.goToURL({ url: w.config.websiteURL + 'applications/' + app.toLowerCase().replace(/ /g, '-').replace(/[^\w-]/g, ''), medium: 'menu' }); w.driver.goToURL({ url: this.getAttribute('data-url'), medium: 'menu' });
}); });
menu.appendChild(menuSeparator); menu.appendChild(menuSeparator);
@ -210,9 +211,10 @@
menuItem.setAttribute('class', 'wappalyzer-category'); menuItem.setAttribute('class', 'wappalyzer-category');
menuItem.setAttribute('label', strings.getString('wappalyzer.cat' + cat)); menuItem.setAttribute('label', strings.getString('wappalyzer.cat' + cat));
menuItem.setAttribute('data-url', w.config.websiteURL + 'categories/' + w.categories[cat]);
menuItem.addEventListener('command', function() { menuItem.addEventListener('command', function() {
w.driver.goToURL({ url: w.config.websiteURL + 'categories/' + w.categories[cat], medium: 'menu' }); w.driver.goToURL({ url: this.getAttribute('data-url'), medium: 'menu' });
}); });
menu.appendChild(menuItem); menu.appendChild(menuItem);

Loading…
Cancel
Save