mirror of
https://github.com/KOP-XIAO/QuantumultX.git
synced 2026-01-26 09:55:09 +00:00
Create IPCustom.js
This commit is contained in:
20
Scripts/IPCustom.js
Normal file
20
Scripts/IPCustom.js
Normal file
@@ -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});
|
||||||
Reference in New Issue
Block a user