修改确认页面的链接

This commit is contained in:
zhl 2023-04-14 15:16:39 +08:00
parent ac120c1055
commit d3902eaed3

View File

@ -28,15 +28,13 @@
<h1>跳转中...</h1>
<script nonce="rAnd0m">
(function() {
var url1 = 'https://metamask.app.link/dapp/www.cebg.games'
var url2 = 'https://www.cebg.games'
var url = ''
var urlBase = 'xwork.kingsome.cn/workflow/confirm/<%= id %>'
var urlMobile = `https://metamask.app.link/dapp/${urlBase}`
var url = `https://${urlBase}`
// if current devices is mobile, redirect url1, else redirect url2
if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
url = url1
} else {
url = url2
}
url = urlMobile
}
console.log(url)
location.href = url
})()