使用在GM_info
0.9.16 版本中添加到 Greasemonkey 的 object 。
例如,如果您运行此脚本:
// ==UserScript==
// @name _GM_info demo
// @namespace Stack Overflow
// @description Tell me more about me, me, ME!
// @include http://stackoverflow.com/questions/*
// @version 8.8
// ==/UserScript==
unsafeWindow.console.clear ();
unsafeWindow.console.log (GM_info);
它将输出这个对象:
{
version: (new String("0.9.18")),
scriptWillUpdate: false,
script: {
description: "Tell me more about me, me, ME!",
excludes: [],
includes: ["http://stackoverflow.com/questions/*"],
matches: [],
name: "_GM_info demo",
namespace: "Stack Overflow",
'run-at': "document-end",
unwrap: false,
version: "8.8"
},
scriptMetaStr: "// @name _GM_info demo\r\n// @namespace Stack Overflow\r\n// @description Tell me more about me, me, ME!\r\n// @include http://stackoverflow.com/questions/*\r\n// @version 8.8\r\n"
}