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

Unified Diff: chrome/renderer/resources/greasemonkey_api.js

Issue 340057: Add first-class support for user scripts (Closed)
Patch Set: newness Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/user_script_unittest.cc ('k') | chrome/renderer/user_script_slave.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/greasemonkey_api.js
diff --git a/chrome/renderer/resources/greasemonkey_api.js b/chrome/renderer/resources/greasemonkey_api.js
index 7b829ad35f733aaef222d07db5b3c8be68bb41e8..ed17367ed0aad8249f16de5809d27ba598a1e37c 100644
--- a/chrome/renderer/resources/greasemonkey_api.js
+++ b/chrome/renderer/resources/greasemonkey_api.js
@@ -67,3 +67,15 @@ function GM_openInTab(url) {
function GM_log(message) {
window.console.log(message);
}
+
+(function() {
+ console.log("adding apis");
Matt Perry 2009/11/03 20:21:29 remove log statements?
+ console.log(window == this);
+ var apis = ["GM_getValue", "GM_setValue", "GM_registerMenuCommand"];
+ for (var i = 0, api; api = apis[i]; i++) {
+ console.log("adding api: " + api);
+ window[api] = function() {
+ console.log("%s is not supported.", api);
+ }
+ }
+})();
« no previous file with comments | « chrome/common/extensions/user_script_unittest.cc ('k') | chrome/renderer/user_script_slave.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698