油猴头部信息解析工具
This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/440136/1019188/Tampermonkey%20Meta.js
获取油猴头设置: @设置名=设置值
通过 GM_info.scriptMetaStr 来解析油猴头部信息,并且生成一个对象
例子:
// ==UserScript==
// @number 1
// @string this is string
// @boolean true
// @object.somekey.key1 1
// @object.somekey.key2 this is object
// ==/UserScript==
const metas = GM_meta(GM_info.scriptMetaStr," ")
console.log(metas);
// {number:1, string:"this is string", boolean: true, object:{someKey:{key1:1,key2:"this is object"}}}