wsmud_api

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

目前为 2020-08-26 提交的版本。查看 最新版本

作者
suqing
评分
0 0 0
版本
0.0.6
创建于
2020-08-24
更新于
2020-08-26
大小
5.7 KB
许可证
暂无
适用于

简介

此脚本添加了一个全局对象 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) 读取数据
  • deleteValue(key)
// 保存
setValue('TestKey', { a: 1, b: 2 })
// 读取
getValue('TestKey') // { a: 1, b: 2 }
// 删除
deleteValue('TestKey')
  • cookie()
// 保存
cookie().TestKey = 'JustTestValue'
// 读取
console.log(cookie().TestKey) // "JustTestValue"
// 删除
delete cookie().TestKey
console.log(cookie().TestKey) // undefined

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址