OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Set a background color for the badge at OnInstalled(). |
| 6 chrome.runtime.onInstalled.addListener(function() { |
| 7 chrome.browserAction.setBadgeBackgroundColor({color: [0, 0, 255, 255]}); |
| 8 }); |
| 9 |
| 10 // Every startup, change the badge text, but not the background color (which |
| 11 // should persist at the blue we set originally). |
| 12 chrome.runtime.onStartup.addListener(function() { |
| 13 chrome.browserAction.setBadgeText({text: 'Hello'}); |
| 14 }); |
OLD | NEW |