wsmud_api

使用于 Tampermonkey 的武神传说脚本的前置 API 库

Verze ze dne 26. 08. 2020. Zobrazit nejnovější verzi.

Autor
suqing
Hodnocení
0 0 0
Verze
0.0.4
Vytvořeno
24. 08. 2020
Aktualizováno
26. 08. 2020
Size
5,2 KB
Licence
neuvedeno
Spustit na

简介

此脚本添加了一个全局对象 apiapi 是使用 Vue 进行数据驱动的,api 的属性可以用于 Vue 的渲染函数或计算属性内,当 api 的属性发生变化时,Vue 相应的组件会渲染更新。

插件

  • wsmud_login
    • 登录(不可用)相关插件,切换账号不需要输入账号密码,一键切换到指定游戏角色。

文档

  • api.roles 角色信息

  • console.green(log) 控制台个性化输出

  • console.orange(log)

  • console.red(log)

console.green('This is a green log.')
console.orange('This is an orange log.')
console.red('This is a red log.')
  • setValue(key, value) 保存数据(基于 localStorage 的数据持久化)
  • getValue(key) 读取数据
// 保存
setValue('TestKey', { a: 1, b: 2 })
// 读取
getValue('TestKey') // { a: 1, b: 2 }
  • cookie()
// 保存
cookie().TestKey = 'JustTestValue'
// 读取
console.log(cookie().TestKey) // "JustTestValue"
// 删除
delete cookie().TestKey
console.log(cookie().TestKey) // undefined
长期地址
遇到问题?请前往 GitHub 提 Issues。