Chromium Code Reviews| Index: chrome/common/extensions/docs/examples/api/infobars/sandwichbar/infobar.js |
| diff --git a/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/infobar.js b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/infobar.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b4a7966d33c00a60d400ec2b4044d57117d13e7c |
| --- /dev/null |
| +++ b/chrome/common/extensions/docs/examples/api/infobars/sandwichbar/infobar.js |
| @@ -0,0 +1,7 @@ |
| +// Obtain the count of sandwiches from the page URL. |
|
Mike West
2012/01/27 16:06:32
Needs a copyright notice.
|
| +var count = window.location.hash.substring(1); |
| +if (count) { |
| + // Replace the placeholder text with the actual count. |
| + var domcount = document.querySelector('#count'); |
| + domcount.innerText = count; |
| +} |