(msg, duration)
| 241 | let shouldMatchLink = false // 添加一个全局变量,默认为假 不显示适用于脚本的数量 |
| 242 | |
| 243 | function Toast(msg, duration) { |
| 244 | duration = isNaN(duration) ? 3000 : duration |
| 245 | var m = document.createElement('div') |
| 246 | m.innerHTML = msg |
| 247 | m.style.cssText = 'max-width:60%;min-width: 150px;padding:0 14px;height: 40px;color: black;line-height: 40px;text-align: center;border-radius: 12px;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: 2147483647;background: white;font-size: 16px;' |
| 248 | document.body.appendChild(m) |
| 249 | setTimeout(function () { |
| 250 | var d = 0.5 |
| 251 | m.style.transition = '-webkit-transform ' + d + 's ease-in, opacity ' + d + 's ease-in' |
| 252 | m.style.opacity = '0'; setTimeout(function () { document.body.removeChild(m) }, d * 1000) |
| 253 | }, duration) |
| 254 | } |
| 255 | |
| 256 | function navigateTo(url, useWindowOpen) { |
| 257 | if (useWindowOpen) { |
no outgoing calls
no test coverage detected