1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00
volcanos/lib/user.js
2019-12-10 15:53:07 +08:00

17 lines
739 B
JavaScript

Volcanos("user", {help: "用户模块",
alert: function(text) {alert(JSON.stringify(text))},
confirm: function(text) {return confirm(JSON.stringify(text))},
prompt: function(text, cb) {(text = prompt(text)) != undefined && typeof cb == "function" && cb(text); return text},
reload: function() {confirm("重新加载页面?") && location.reload()},
toast: function(text) {},
carte: function(event, cb) {},
isWeiXin: navigator.userAgent.indexOf("MicroMessenger") > -1,
isMobile: navigator.userAgent.indexOf("Mobile") > -1,
isIPhone: navigator.userAgent.indexOf("iPhone") > -1,
isMacOSX: navigator.userAgent.indexOf("Mac OS X") > -1,
isWindows: navigator.userAgent.indexOf("Windows") > -1,
})