1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-10-23 22:30:29 +08:00
parent 3b43f9f0d6
commit 56d7ecc7ad
2 changed files with 5 additions and 4 deletions

View File

@ -41,12 +41,13 @@ Volcanos("user", {
reload: function(force) { (force || confirm("重新加载页面?")) && location.reload() }, reload: function(force) { (force || confirm("重新加载页面?")) && location.reload() },
jumps: function(url) { location.href = url }, jumps: function(url) { location.href = url },
opens: function(url) { opens: function(url) {
if (window.parent && window.parent.openurl) { return window.parent.openurl(url) }
window.openurl? window.openurl(url): this.open(url)
},
open: function(url) {
if (location.search.indexOf("debug=true") > 0 && url.indexOf("debug=true") == -1) { if (location.search.indexOf("debug=true") > 0 && url.indexOf("debug=true") == -1) {
var ls = url.split("#"); ls[0] += (ls[0].indexOf("?") > 0? "&": "?") + "debug=true", url = ls.join("#") var ls = url.split("#"); ls[0] += (ls[0].indexOf("?") > 0? "&": "?") + "debug=true", url = ls.join("#")
} }
window.openurl? window.openurl(url): window.parent && window.parent.openurl? window.parent.openurl(url): this.open(url)
},
open: function(url) {
if (window.open(url)) { return } if (window.open(url)) { return }
this.isMobile? location.href = url: null this.isMobile? location.href = url: null
}, },

View File

@ -92,7 +92,7 @@ Volcanos(chat.ONACTION, {list: [
}) }, }) },
"远程控制": function(event, can) { can.onaction.keyboard(event, can) }, "远程控制": function(event, can) { can.onaction.keyboard(event, can) },
"共享工具": function(event, can) { var meta = can.Conf(); can.onmotion.share(event, can, [], [mdb.NAME, meta.index, mdb.TEXT, JSON.stringify(can.Input())]) }, "共享工具": function(event, can) { var meta = can.Conf(); can.onmotion.share(event, can, [], [mdb.NAME, meta.index, mdb.TEXT, JSON.stringify(can.Input())]) },
"打开链接": function(event, can) { can.user.opens(can.onexport.link(can)) }, "打开链接": function(event, can) { can.user.open(can.onexport.link(can)) },
"生成链接": function(event, can) { can.onmotion.share(event, can, [], [mdb.LINK, can.user.copy(event, can, can.onexport.link(can))]) }, "生成链接": function(event, can) { can.onmotion.share(event, can, [], [mdb.LINK, can.user.copy(event, can, can.onexport.link(can))]) },
"生成脚本": function(event, can) { var args = can.Input().join(lex.SP), list = [ "生成脚本": function(event, can) { var args = can.Input().join(lex.SP), list = [
"export ctx_dev="+location.origin+"; ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL $ctx_dev;"+" source $ctx_temp cmd "+(can.Conf(ctx.INDEX))+lex.SP+args, "export ctx_dev="+location.origin+"; ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL $ctx_dev;"+" source $ctx_temp cmd "+(can.Conf(ctx.INDEX))+lex.SP+args,