Place Wappalyzer in address bar in Chrome

main
root 10 years ago
parent b431ec13fc
commit f08a5dde4d

@ -26,7 +26,7 @@
init: function() { init: function() {
w.log('init'); w.log('init');
chrome.browserAction.setBadgeBackgroundColor({ color: [255, 102, 0, 255] }); //chrome.browserAction.setBadgeBackgroundColor({ color: [255, 102, 0, 255] });
// Load apps.json // Load apps.json
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
@ -189,7 +189,8 @@
for ( appName in w.detected[url] ) { for ( appName in w.detected[url] ) {
w.apps[appName].cats.forEach(function(cat) { w.apps[appName].cats.forEach(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' });
chrome.pageAction.setIcon({ tabId: tab.id, path: 'images/icons/' + appName + '.png' });
found = true; found = true;
} }
@ -197,7 +198,8 @@
} }
}); });
chrome.browserAction.setBadgeText({ tabId: tab.id, text: count }); //chrome.browserAction.setBadgeText({ tabId: tab.id, text: count });
chrome.pageAction.show(tab.id);
}; };
}, },

@ -9,7 +9,7 @@
"32": "images/icon_32.png", "32": "images/icon_32.png",
"128": "images/icon_128.png" "128": "images/icon_128.png"
}, },
"browser_action": { "page_action": {
"default_icon": "images/icon_32.png", "default_icon": "images/icon_32.png",
"default_title": "Wappalyzer - click for details", "default_title": "Wappalyzer - click for details",
"default_popup": "popup.html" "default_popup": "popup.html"

Loading…
Cancel
Save