Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(619)

Side by Side Diff: chrome/common/extensions/docs/examples/api/pageAction/pageaction_by_content/contentscript.js

Issue 124603003: Change the pageaction_by_content example to use declarativeContent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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 */
6 var regex = /sandwich/;
7
8 // Test the text of the body element against our regular expression.
9 if (regex.test(document.body.innerText)) {
10 // The regular expression produced a match, so notify the background page.
11 chrome.extension.sendRequest({}, function(response) {});
12 } else {
13 // No match was found.
14 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698