1 | // Define the `main` function |
2 | |
3 | const proxyName = "代理模式"; |
4 | |
5 | function main (params) { |
6 | if (!params.proxies) return params; |
7 | overwriteRules (params); |
8 | overwriteProxyGroups (params); |
9 | overwriteDns (params); |
10 | return params; |
1 | // 利用api.nsmao.net实现的bing接口 |
2 | const API_KEY = "ajdlfklahweufbrffbhjefjfsmd,shj" // 自行申请API |
3 | const CACHE_TTL = 36000 // 10 小时 |
4 | |
5 | export default { |
6 | async fetch(request, env, ctx) { |
7 | const { pathname } = new URL(request.url) |
8 | |
9 | // 首页说明 |
10 | if (pathname === "/") { |
LiuShen / 通过cloudflare Worker创建github api中间件
0 喜歡
0 分支
1 檔案
最後活躍
通过cloudflare Worker创建github api中间件,在隐藏token的情况下获取仓库提交信息
1 | /** |
2 | * Welcome to Cloudflare Workers! This is your first worker. |
3 | * |
4 | * - Run "npm run dev" in your terminal to start a development server |
5 | * - Open a browser tab at http://localhost:8787/ to see your worker in action |
6 | * - Run "npm run deploy" to publish your worker |
7 | * |
8 | * Learn more at https://developers.cloudflare.com/workers/ |
9 | */ |
LiuShen / artalk实现前端上传图片
1 喜歡
0 分支
1 檔案
最後活躍
hexo-theme-butterfly中,artalk实现前端上传图片,不使用upgit(不会QAQ,如果有谁会请联系我呜呜呜)
1 | // 请使用该文件替换“[root]\themes\butterfly\layout\includes\third-party\comments\artalk.pug” |
2 | - const { server, site, option } = theme.artalk |
3 | - const { use, lazyload } = theme.comments |
4 | |
5 | script. |
6 | (() => { |
7 | let artalkItem = null |
8 | const option = !{JSON.stringify(option)} |
9 | const isShuoshuo = GLOBAL_CONFIG_SITE.pageType === 'shuoshuo' |
1 | <!DOCTYPE html> |
2 | <html lang="en"> |
3 | <head> |
4 | <meta charset="UTF-8"> |
5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
6 | <title>局部刷新图片</title> |
7 | <style> |
8 | body { |
9 | display: flex; |
10 | justify-content: center; |
上一頁
下一頁