|
@@ -415,6 +415,7 @@
|
|
|
|
|
|
|
|
// claim bonus 超过1秒自动跳转到下载页
|
|
// claim bonus 超过1秒自动跳转到下载页
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
|
+ const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
|
// 检查 URL 中是否包含 check=1 参数
|
|
// 检查 URL 中是否包含 check=1 参数
|
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
|
const hasCheckParam = urlParams.has('check');
|
|
const hasCheckParam = urlParams.has('check');
|
|
@@ -423,8 +424,9 @@
|
|
|
|
|
|
|
|
// =============== 新增: Facebook 应用内浏览器检测 ===============
|
|
// =============== 新增: Facebook 应用内浏览器检测 ===============
|
|
|
const isFacebookBrowser = navigator.userAgent.match(/FBAN|FBAV/i);
|
|
const isFacebookBrowser = navigator.userAgent.match(/FBAN|FBAV/i);
|
|
|
|
|
+ const isAndroid = /android/i.test(userAgent);
|
|
|
|
|
|
|
|
- if (isFacebookBrowser) {
|
|
|
|
|
|
|
+ if (isFacebookBrowser && isAndroid) {
|
|
|
console.log("检测到Facebook应用内浏览器");
|
|
console.log("检测到Facebook应用内浏览器");
|
|
|
// 添加Facebook特定的处理逻辑
|
|
// 添加Facebook特定的处理逻辑
|
|
|
window.location.href = "intent://" + "<%= applink %>".replace(/^https?:\/\//, "") + "#Intent;scheme=https;package=com.pcoloring.art.puzzle.color.by.number;end";
|
|
window.location.href = "intent://" + "<%= applink %>".replace(/^https?:\/\//, "") + "#Intent;scheme=https;package=com.pcoloring.art.puzzle.color.by.number;end";
|
|
@@ -457,7 +459,7 @@
|
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
|
if (!appLaunched) {
|
|
if (!appLaunched) {
|
|
|
// =============== 修改: 针对Facebook浏览器优化跳转逻辑 ===============
|
|
// =============== 修改: 针对Facebook浏览器优化跳转逻辑 ===============
|
|
|
- if (isFacebookBrowser) {
|
|
|
|
|
|
|
+ if (isFacebookBrowser && isAndroid) {
|
|
|
// 在Facebook浏览器中,使用更明显的跳转方式
|
|
// 在Facebook浏览器中,使用更明显的跳转方式
|
|
|
window.location.href = "intent://" + "<%= applink %>".replace(/^https?:\/\//, "") + "#Intent;scheme=https;package=com.pcoloring.art.puzzle.color.by.number;end";
|
|
window.location.href = "intent://" + "<%= applink %>".replace(/^https?:\/\//, "") + "#Intent;scheme=https;package=com.pcoloring.art.puzzle.color.by.number;end";
|
|
|
} else {
|
|
} else {
|