Skip to content

luyiwind/scripts-1

This branch is up to date with chavyleung/scripts:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

53ded3e · Mar 10, 2025
Sep 27, 2021
Nov 14, 2020
Dec 14, 2020
Jul 23, 2023
Jun 12, 2020
Jul 13, 2022
Mar 10, 2025
Mar 18, 2020
Dec 30, 2024
Nov 14, 2020
Feb 2, 2020
May 1, 2020
Aug 15, 2022
Nov 14, 2020
Mar 8, 2020
Sep 3, 2021
May 8, 2021
Sep 25, 2024
Feb 28, 2020
Mar 14, 2020
Mar 29, 2020
May 26, 2020
Jul 8, 2024
Nov 14, 2020
May 4, 2021
Feb 15, 2020
Nov 14, 2020
Mar 8, 2020
Feb 12, 2020
Feb 14, 2020
Jun 16, 2020
Jun 15, 2020
Nov 14, 2020
Mar 14, 2020
Nov 14, 2020
Nov 14, 2020
May 17, 2020
Mar 9, 2020
Feb 12, 2020
May 23, 2020
Apr 10, 2021
Sep 22, 2023
Mar 30, 2021
Nov 14, 2020
Dec 15, 2022
Sep 27, 2023
Feb 8, 2020
Jul 22, 2023
Jun 15, 2022
Jan 3, 2022
Feb 21, 2020
Mar 1, 2021
Mar 16, 2020
Sep 24, 2021
Sep 14, 2024
Jan 22, 2020
Mar 18, 2020
Mar 22, 2021
May 5, 2024
Mar 16, 2020
Sep 25, 2024
Aug 15, 2022
Jun 15, 2020
Aug 20, 2020
Oct 11, 2024
Oct 11, 2024
Jul 17, 2020
Jul 23, 2023
Jul 23, 2023
Jul 23, 2023
Jul 23, 2023
Jul 23, 2023
Jul 23, 2023
May 26, 2023
Mar 10, 2025
Jan 2, 2020
Apr 12, 2024
Apr 12, 2024
Jul 23, 2023
Feb 9, 2023
Apr 12, 2024

Repository files navigation

Chavy Scripts

GitHub release (latest by date) GitHub contributors

Telegram讨论组:Chavy Scripts Group



🧰BoxJs

简介

A SPA Appliction be used for scripts utils

使用方式

安装对应模块/插件后,浏览器访问: boxjs.com

安装链接


🛠️Env.js

调用方式

  • Env.min.js放置于嵌入式脚本底端,然后头部调用功能
    const $ = new Env("你的脚本名称");
    

功能列表

HttpClient

  • 支持方法: get, post, put, delete, head, options, patch
    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<String> or options<Object>, callback(error, response, data)) // 不支持异步
    let result = $.post(URL<String> or options<Object>, callback(error, response, data)) // 不支持异步
    ……
    
    let result = await $.http.get(URL<String> or options<Object>).then(callback(response))
    let result = await $.http.post(URL<String> or options<Object>).then(response => response.body)
    let result = await $.http.put(URL<String> or options<Object>).then(response => {
        $.log(JSON.stringify(response.headers));
        return response.body
    })
    ……

持久化数据

```javascript

$.getdata(‘chavy’) // 读取持久化数据 (string格式)
$.setdata(string, ‘chavy’) // 写入持久化数据 (string格式)
$.getjson(‘chavy’, default_value<String, Object>) // 读取持久化数据 (object格式),当读取失败后返回默认值
$.setjson(object, ‘chavy’) // 写入持久化数据 (object格式)

```

安装链接

正式版


赞助

  1. CloudFlare

📃LICENSE

Copyright © 2019-present chavyleung. This project is GPL licensed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 83.6%
  • HTML 16.4%