Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions plugins/utools-fork-codehelper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# utools-fork-codehelper

这是一个 uTools 官方插件 **编码小助手(codehelper)** 的镜像,仅做如下修改以适配 ZTools 和避免与可能存在的原生插件重名:

```diff
--- index.html
+++ index.html
@@ -6,4 +6,7 @@
<body>
<div id="root"></div>
+ <script>
+ window.utools = window.ztools;
+ </script>
<script src="index.js"></script>
</body>
```

```diff
--- plugin.json
+++ plugin.json
@@ -144,1 +144,2 @@
- "name": "codehelper",
+ "name": "utools-fork-codehelper",
+ "title": "编码小助手",
```
13 changes: 13 additions & 0 deletions plugins/utools-fork-codehelper/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div id="root"></div>
<script>
window.utools = window.ztools;
</script>
<script src="index.js"></script>
</body>
</html>
75 changes: 75 additions & 0 deletions plugins/utools-fork-codehelper/index.js

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions plugins/utools-fork-codehelper/index.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
Binary file added plugins/utools-fork-codehelper/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
151 changes: 151 additions & 0 deletions plugins/utools-fork-codehelper/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
{
"main": "index.html",
"preload": "preload.js",
"logo": "logo.png",
"pluginSetting": {
"single": false
},
"features": [
{
"code": "timestamp",
"explain": "日期/时间格式转换",
"cmds": [
"date",
"timestamp",
"unixtime",
{
"type": "regex",
"minLength": 9,
"match": "/^\\d{4}[\\/.-]\\d{1,2}[\\/.-]\\d{1,2}(?:(?: |T)\\d{1,2}:\\d{1,2}:\\d{1,2}(?:\\.\\d{1,6}Z?)?)?$|^[1-9](?:\\d{8,9}|\\d{11,12})$/",
"label": "时间格式"
}
]
},
{
"code": "uuid",
"explain": "随机唯一值",
"cmds": [
"UUID",
"GUID"
]
},
{
"code": "hash",
"explain": "哈希加密",
"cmds": [
"MD5",
"SHA1",
"SHA224",
"SHA256",
"SHA384",
"SHA512",
{
"maxNum": 1,
"type": "files",
"fileType": "file",
"label": "文件 Hash"
}
]
},
{
"code": "base64encode",
"explain": "base64 编码",
"cmds": [
"base64 encode(编码)",
{
"maxNum": 1,
"type": "files",
"fileType": "file",
"match": "/\\.(?:jpg|jpeg|gif|png)$/i",
"label": "图片 base64 编码"
},
{
"type": "img",
"label": "图片 base64 编码"
}
]
},
{
"code": "base64decode",
"explain": "base64 解码",
"cmds": [
"base64 decode(解码)",
{
"type": "regex",
"minLength": 20,
"match": "/^(?:[A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/])+(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/",
"label": "base64 解码"
},
{
"type": "regex",
"minLength": 100,
"match": "/^data:image\\/(jpg|jpeg|gif|png);base64,/",
"label": "base64 图片"
}
]
},
{
"code": "urlencode",
"explain": "URL 编码",
"cmds": [
"URL encode(编码)"
]
},
{
"code": "urldecode",
"explain": "URL 解码",
"cmds": [
"URL decode(解码)",
{
"type": "regex",
"match": "/%[A-Fa-f0-9][A-Fa-f0-9]/",
"label": "URL 解码"
}
]
},
{
"code": "unicode",
"explain": "Unicode 编码转换",
"cmds": [
"Unicode",
"万国码",
{
"type": "regex",
"match": "/^(?:\\\\u[a-f0-9]{4})+$|^(?:\\\\x[a-f0-9]{2})+$|^(?:\\\\u\\{[a-f0-9]{2,5}\\})+$|^(U\\+[a-f0-9]{2,5})+$|^(?:&#\\d{2,7};)+$|^(?:&#x[a-f0-9]{2,5};)+$/i",
"label": "Unicode 编码转换"
}
]
},
{
"code": "hex",
"explain": "进制转换",
"cmds": [
"进制转换",
{
"type": "regex",
"match": "/^0x[0-9a-fA-F]+$/",
"label": "进制转换"
}
]
},
{
"code": "htmlescape",
"explain": "HTML 转义字符",
"cmds": [
"HTML 转义字符",
{
"type": "regex",
"match": "/^&(quot|amp|lt|gt|nbsp);$/i",
"label": "HTML 转义字符"
}
]
}
],
"name": "utools-fork-codehelper",
"title": "编码小助手",
"pluginName": "编码小助手",
"description": "时间转换、base64编解码、URL编解码、哈希加密、Unicode、UUID、进制转换、HTML转义",
"author": "福州猿力信息科技有限公司",
"homepage": "https://u.tools",
"version": "2.1.1"
}
1 change: 1 addition & 0 deletions plugins/utools-fork-codehelper/preload.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.