PageSourceSearch

https://princess.tomatogame.com/main/toggleMobilePc.js

js tomatogame.com collected 2026-10-02 01:46:31 UTC 1,950 bytes, 53 lines download raw bytes

1function isMobile() {
2  return navigator.userAgent.match(
3    /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
4  );
5}
6
7// 港台春节落地页发布期间,这个先注释掉
8// (function () {
9//   const { href, origin, pathname } = window.location;
10//   if (isMobile() && !href.includes('/main/m')) {
11//     location.href = origin + '/main/m';
12//   } else if (!isMobile() && href.includes('/main/m')) {
13//     location.href = origin + pathname.replace('/main/m', '/main/');
14//   }
15// })();
16
17// && !href.includes('/newyear/')
18// 时间设置,超过"2023-02-05 23:59:59"就把官网重定向弄回main/m那里
19(function () {
20  const { href, origin, pathname } = window.location;
21  const timeMask = setTimeout(() => {
22    let value = "2023-02-05 23:59:59";
23    let data = new Date();
24    let now = data.valueOf();
25    let time = new Date(value).valueOf();
26    // console.log("now:" , now)
27    // console.log("value" , time)
28    if(now > time){
29      if (isMobile() && !href.includes('/main/m')) {
30        location.href = origin + '/main/m';
31      } else if (!isMobile() && href.includes('/main/m')) {
32        location.href = origin + pathname.replace('/main/m', '/main/');
33      }
34      // clearInterval(timeMask)
35      console.log("超过了")
36    }else {
37      if (isMobile()) {
38        if(!href.includes('/main/m')){
39          location.href = origin + '/newyear/';
40        }
41        // location.href = origin + pathname.replace('/main/', '/newyear/');
42        // location.href = origin + '/newyear/';
43      } else if (!isMobile() && href.includes('/main/m')) {
44        // location.href = origin + pathname.replace('/newyear/', '/main/');
45        location.href = origin + pathname.replace('/main/m', '/main/');
46        // location.href = origin + '/newyear/';
47      }
48      console.log("还没超过")
49    }
50  }, 1000);
51  // 触发
52  timeMask
53})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.