From 8db38ea90b73e6ff5c3fdbfe3cffc6176cae48e0 Mon Sep 17 00:00:00 2001 From: shy Date: Fri, 18 Aug 2023 17:25:26 +0800 Subject: [PATCH] add some --- plugin/state.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/state.js b/plugin/state.js index ee699631..67cd8f1f 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -4,7 +4,10 @@ Volcanos(chat.ONIMPORT, { }, _location: function(can, msg, arg) { can.user.jumps(arg) }, _replace: function(can, msg, arg) { location.replace(arg) }, - _history: function(can, msg) { history.back() }, + _history: function(can, msg) { + var what = history.back() + what || can.user.close() + }, _confirm: function(can, msg, arg) { can.user.toastConfirm(can, arg, "", function() { can.runAction(can.request({}, msg), "confirm") }) }, _refresh: function(can, msg, arg) { can.core.Timer(parseInt(arg||"30"), function() { can.Update(can.request({}, {_count: parseInt(msg.Option("_count")||"3")-1})) }) }, _rewrite: function(can, msg) { var arg = msg._arg; for (var i = 0; i < arg.length; i += 2) { can.Option(arg[i], arg[i+1]), can.Action(arg[i], arg[i+1]) } can.Update() },