修改确认页面的链接

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

View File

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