From 503b2bd134527c339b182401fc51fef5538eabd5 Mon Sep 17 00:00:00 2001 From: Zhicheng Zhang <20331014+zzc-tongji@users.noreply.github.com> Date: Tue, 13 May 2025 16:42:12 +0800 Subject: [PATCH] add js script "Notify" (#802) --- repo/js/Notify/main.js | 3 +++ repo/js/Notify/manifest.json | 8 ++++++++ repo/js/Notify/settings.json | 8 ++++++++ 3 files changed, 19 insertions(+) create mode 100644 repo/js/Notify/main.js create mode 100644 repo/js/Notify/manifest.json create mode 100644 repo/js/Notify/settings.json diff --git a/repo/js/Notify/main.js b/repo/js/Notify/main.js new file mode 100644 index 00000000..4129ba8c --- /dev/null +++ b/repo/js/Notify/main.js @@ -0,0 +1,3 @@ +(async function () { + notification.Send(settings.content); +})(); diff --git a/repo/js/Notify/manifest.json b/repo/js/Notify/manifest.json new file mode 100644 index 00000000..69495c17 --- /dev/null +++ b/repo/js/Notify/manifest.json @@ -0,0 +1,8 @@ +{ + "manifest_version": 1, + "name": "发送通知", + "version": "1.0", + "description": "发送通知,可以在调度器中使用。", + "settings_ui": "settings.json", + "main": "main.js" +} \ No newline at end of file diff --git a/repo/js/Notify/settings.json b/repo/js/Notify/settings.json new file mode 100644 index 00000000..c1122b6b --- /dev/null +++ b/repo/js/Notify/settings.json @@ -0,0 +1,8 @@ +[ + { + "name": "content", + "type": "input-text", + "label": "通知内容", + "default": "请前往 JS脚本自定义设置 中修改内容。" + } +] \ No newline at end of file