| OLD | NEW |
| 1 /* | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 * Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 * source code is governed by a BSD-style license that can be found in the | 3 // found in the LICENSE file. |
| 4 * LICENSE file. | 4 |
| 5 */ | |
| 6 var regex = /sandwich/gi; | 5 var regex = /sandwich/gi; |
| 7 matches = document.body.innerText.match(regex); | 6 matches = document.body.innerText.match(regex); |
| 8 if (matches) { | 7 if (matches) { |
| 9 var payload = { | 8 var payload = { |
| 10 count: matches.length // Pass the number of matches back. | 9 count: matches.length // Pass the number of matches back. |
| 11 }; | 10 }; |
| 12 chrome.extension.sendRequest(payload, function(response) {}); | 11 chrome.extension.sendRequest(payload, function(response) {}); |
| 13 } | 12 } |
| OLD | NEW |