Chavy Scripts
Telegram讨论组:Chavy Scripts Group
🧰BoxJs
## 简介
A SPA Appliction be used for scripts utils
## 使用方式
安装对应模块/插件后,浏览器访问: [boxjs.com](http://boxjs.com "BoxJs")
## 安装链接
* Shadowrocket: [boxjs.rewrite.surge.sgmodule](https://github.com/chavyleung/scripts/raw/master/box/rewrite/boxjs.rewrite.surge.sgmodule "BoxJs")
* Loon: [boxjs.rewrite.loon.plugin](https://github.com/chavyleung/scripts/raw/master/box/rewrite/boxjs.rewrite.loon.plugin "BoxJs")
* Quantumult X: [boxjs.rewrite.quanx.conf](https://github.com/chavyleung/scripts/raw/master/box/rewrite/boxjs.rewrite.quanx.conf "BoxJs")
* Surge: [boxjs.rewrite.surge.sgmodule](https://github.com/chavyleung/scripts/raw/master/box/rewrite/boxjs.rewrite.surge.sgmodule "BoxJs")
* Stash: [boxjs.rewrite.stash.stoverride](https://github.com/chavyleung/scripts/raw/master/box/rewrite/boxjs.rewrite.stash.stoverride "BoxJs")
---
# 🛠️Env.js
## 调用方式
* Env.min.js放置于嵌入式脚本底端,然后头部调用功能
```
const $ = new Env("你的脚本名称");
```
## 功能列表
### HttpClient
* 支持方法: get, post, put, delete, head, options, patch
```javascript
let option = {
url: "http://www.example.com/", // URL,必须
headers: { // 请求头,可选
"Accept": "*/*",
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Mobile/15E148 Safari/605.1.15",
"Content-Type": "application/json; charset=utf-8"
""
},
body: `auth_key=1234567&source_lang=EN&target_lang=ZH` // 请求体,POST等方法必须,字符串或对象
}
let result = $.get(URL or options