From 55ac42ae0bc4f7b9566680daaf56e77c15dc62fd Mon Sep 17 00:00:00 2001 From: Shawn <45581750+KOP-XIAO@users.noreply.github.com> Date: Sat, 29 Jun 2019 18:16:15 +0800 Subject: [PATCH] Create IPCustom.js --- Scripts/IPCustom.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Scripts/IPCustom.js diff --git a/Scripts/IPCustom.js b/Scripts/IPCustom.js new file mode 100644 index 0000000..949566c --- /dev/null +++ b/Scripts/IPCustom.js @@ -0,0 +1,20 @@ +// if ($response.statusCode != 200) { +// $done(Null); +// } + +// var body = $response.body; +// var obj = JSON.parse(body); + +function getRandomInt(max) { + return Math.floor(Math.random() * Math.floor(max)); +} + +const foods = ['🍎', '🍐', '🍊', 'πŸ‹', '🍌', 'πŸ‰', 'πŸ‡', 'πŸ“', '🍈', 'πŸ’', 'πŸ‘', 'πŸ₯­', 'πŸ…'] + +var title = foods[getRandomInt(foods.length)]; +var subtitle = 'δ»Šε€©εƒδ»€δΉˆζ°΄ζžœοΌŸ'; +var ip = '1.1.1.1'; +var description = 'description'+ip; + + +$done({title, subtitle, ip, description});