Skip to content

Commit

Permalink
Use lighthouseIsRunning var
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Jan 3, 2017
1 parent 2e72963 commit 1530b17
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lighthouse-extension/app/src/lighthouse-background.js
Expand Up @@ -81,11 +81,16 @@ function filterConfig(config, requestedAggregations) {
function updateBadgeUI(optUrl) {
if (window.chrome && chrome.runtime) {
const manifest = chrome.runtime.getManifest();
const title = optUrl ? `Testing ${optUrl}` : manifest.browser_action.default_title;
chrome.browserAction.setTitle({title});

const path = optUrl ? 'images/lh_logo_icon_light.png' :
manifest.browser_action.default_icon['38'];
let title = manifest.browser_action.default_title;
let path = manifest.browser_action.default_icon['38'];

if (lighthouseIsRunning) {
title = `Testing ${optUrl}`;
path = 'images/lh_logo_icon_light.png';
}

chrome.browserAction.setTitle({title});
chrome.browserAction.setIcon({path});
}
}
Expand Down

0 comments on commit 1530b17

Please sign in to comment.