pixiv / index.html
rogerxavier's picture
Upload 2 files
3e3ff00 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="./vue.min.js"></script>
</head>
<body>
<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
<script>LA.init({id:"JriYR23pld0itc3w",ck:"JriYR23pld0itc3w"})</script>
<script>
// 判断设备类型并返回对应的跳转URL 这个不知道为啥vercel不稳定
function getRedirectUrl(userAgent) {
const bitvpn_all_link = 'https://wwf.lanzoue.com/b03fnqqla'
const deviceMap = new Map([
['android', bitvpn_all_link],
['iphone', bitvpn_all_link],
['ipad', bitvpn_all_link],
['ipod', bitvpn_all_link],
['ios', bitvpn_all_link],
['macintosh', bitvpn_all_link],
['mac', bitvpn_all_link],
['windows', bitvpn_all_link],
['linux', bitvpn_all_link]
]);
for (const [device, redirectUrl] of deviceMap) {
const deviceParts = device.split(' '); // Split the device key into parts
let allPartsMatch = true;
// Check if all parts of the device key are present in the user agent
for (const part of deviceParts) {
if (!userAgent.includes(part)) {
allPartsMatch = false;
break;
}
}
if (allPartsMatch) {
return redirectUrl;
}
}
return androidLink; // 默认跳转URL
}
new Vue({
created() {
const userAgent = navigator.userAgent.toLowerCase();
const redirectUrl = getRedirectUrl(userAgent);
if (redirectUrl) {
window.location.href = redirectUrl; // 跳转到不同域名的页面
}
}
});
</script>
</body>
</html>