| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 window.onload = function() { | 5 window.onload = function() { |
| 6 var patterns = [ "http://*.google.com/*" ]; | 6 var patterns = [ "http://*.google.com/*" ]; |
| 7 chrome.contextMenus.create({"title":"item1", "contexts": ["link"], | 7 chrome.contextMenus.create({"title":"item1", "contexts": ["link"], |
| 8 "targetUrlPatterns": patterns}, function() { | 8 "targetUrlPatterns": patterns}, function() { |
| 9 if (!chrome.extension.lastError) { | 9 if (!chrome.runtime.lastError) { |
| 10 chrome.test.sendMessage("created items"); | 10 chrome.test.sendMessage("created items"); |
| 11 } | 11 } |
| 12 }); | 12 }); |
| 13 }; | 13 }; |
| OLD | NEW |