PageSourceSearch

https://www.bookmovement.com/js/iosApp.js?v=2023-01-31-005

js bookmovement.com collected 2026-10-04 00:31:00 UTC 2,198 bytes, 93 lines download raw bytes

1/*
2* Handles redirect to BookMovement App on iOS
3*/
4
5function sc(cname,cvalue,exdays) {
6  var d = new Date();
7  d.setTime(d.getTime() + (exdays*24*60*60*1000));
8  var expires = "expires=" + d.toGMTString();
9  document.cookie = cname+"="+cvalue+"; "+expires;
10}
11
12function gc(cname) {
13  var name = cname + "=";
14  var ca = document.cookie.split(';');
15  for(var i=0; i<ca.length; i++) {
16    var c = ca[i];
17    while (c.charAt(0)==' ') c = c.substring(1);
18    if (c.indexOf(name) == 0) {
19      return c.substring(name.length, c.length);
20    }
21  }
22  return "";
23}
24
25function getPlatform() {
26  if( /iPad|iPhone|iPod/.test(navigator.platform) )
27    return "ios";
28  else if( /Android/.test(navigator.platform) )
29    return "android";
30  else if( /Win32/.test(navigator.platform) )
31    return "windows";
32  else
33    return "other";
34}
35
36function iosJoin( inviteKey ) {
37  var platform = getPlatform();
38  var redir_to = 'https://www.bookmovement.com/our-book-club-bookshelf/' + inviteKey;
39
40  if( platform == "ios" ) {
41    setTimeout(function () {
42      if(redir_to!=window.location)
43        window.location = redir_to;
44    }, 100);
45    //window.location = 'bkmt://join-club/' + inviteKey;
46  } else if( platform == "android" ) {
47    window.location = redir_to;
48  }
49}
50
51
52/*
53 * For "iurl" intermediate redirect page only
54 */
55function deepLinkRedirect( deepLinkUrl, countElemId, countSeconds ) {
56  var downloadTimer = setInterval(function() {
57    document.getElementById(countElemId).textContent = --countSeconds;
58    if(countSeconds <= 0)
59      clearInterval(downloadTimer);
60  }, 1000);
61
62  setTimeout(function() {
63    window.location.href = deepLinkUrl;
64  }, countSeconds * 1000);
65}
66
67/*
68 * For specific page
69 */
70function openApp( page, id ) {
71  var pages = [
72    "book-details",
73    "club-details",
74    "explore",
75    "finds",
76    "join-club"
77  ];
78  if( getPlatform() != 'ios' || pages.indexOf(page) < 0 ) return ;
79
80  if( page == 'join-club' && id.length > 0 ) {
81    setTimeout(function () {
82      window.location = 'bkmt://' + page + '/' + id;
83    }, 2000);
84  }  
85
86  if( page && id && id > 0 ) { 
87
88    setTimeout(function () {
89      window.location = 'bkmt://' + page + '/' + id;
90    }, 2000);
91  }
92
93} //end of openApp()

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.