Tampermonkey Meta

油猴头部信息解析工具

Цей скрипт не слід встановлювати безпосередньо. Це - бібліотека для інших скриптів для включення в мета директиву // @require https://update.greasyfork.org/scripts/440136/1019188/Tampermonkey%20Meta.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Автор
enncy
Версія
0.0.1.20220216143422
Створено
16.02.2022
Оновлено
16.02.2022
Size
1,8 кБ
Ліцензія
Н/Д

Tampermonkey Meta

获取油猴头设置: @设置名=设置值

通过 GM_info.scriptMetaStr 来解析油猴头部信息,并且生成一个对象

API

  • metaString 油猴头,通常使用 GM_info.scriptMetaStr 获取
  • separator 分隔符,默认一个空格 : ' '

Example

例子:


// ==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"}}}