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