PageSourceSearch

https://jwpokerseru.lol/js/template/gp-tools.js?v=1.1.7

js jwpokerseru.lol collected 2026-09-29 18:00:20 UTC 6,487 bytes, 221 lines download raw bytes

1// Check Status ransaction
2window.checkStatusTransaction = (statusCode) => {
3    var status = '';
4    if (statusCode === 3) {
5        status = 'Approved';
6    } else if (statusCode === 2) {
7        status = 'Rejected';
8    } else if (statusCode === 1) {
9        status = 'Cancelled';
10    } else {
11        status = 'Pending';
12    }
13
14    return status;
15}
16
17//    CONVERT NOMINAL
18window.convertNominal = function (code, nominal) {
19    var symbol = '';
20    var separator = '';
21    var precision = 0;
22    var decimal = ',';
23
24    switch (code) {
25        case 'CNY':
26            symbol = 'Â¥';
27            separator = '.';
28            precision = 2;
29            break;
30
31        case 'VND':
32            symbol = '₫';
33            separator = ',';
34            precision = 0;
35            break;
36
37        case 'MYR':
38            symbol = 'MYR';
39            separator = '.';
40            precision = 2;
41            break;
42
43        case 'THB':
44            symbol = '฿';
45            separator = '.';
46            precision = 2;
47            break;
48
49        case 'IDR':
50            symbol = 'IDR ';
51            separator = '.';
52            precision = 2;
53            break;
54
55        case 'Rp':
56            symbol = 'Rp';
57            separator = '.';
58            precision = 0;
59            break;
60    }
61
62    var format = function format(value) {
63        return currency(value, {
64            precision: precision,
65            symbol: symbol,
66            separator: separator,
67            decimal: decimal
68        });
69    };
70
71    var convert = 0;
72
73    if (nominal) {
74        convert = parseFloat(nominal);
75    }
76
77    convert = format(convert).format(true);
78    return convert;
79};
80//    END CONVERT NOMINAL
81
82//    CONTENT OPEN
83$(document).on('click', '.contentOpen', function () {
84    if ($(this).attr('open-href')) {
85        var openUrl = $(this).attr('open-href');
86        var openType = $(this).attr('open-type');
87
88        if (openType === 'new-tab') {
89            window.open(openUrl, '_blank');
90        } else if (openType === 'pop-up') {
91            openPopupTab(openUrl, '', 1180, 675, openType);
92        } else if (openType === 'pop-up-parent') {
93            openNewParentTab(openUrl, 'parent tab', 1024, 690, 0, 0, 'yes');
94        } else if (openType === 'trigger-function') {
95            Function(openUrl)();
96        } else {
97            window.location.href = openUrl;
98        }
99    }
100});
101
102function openPopupTab(url, params, width, height, name, target = '') {
103    var screenLeft = 0,
104        screenTop = 0;
105    if (!name) name = '';
106    if (!width) width = 1060;
107    if (!height) height = 665;
108    var defaultParams = {};
109
110    if (typeof window.screenLeft !== 'undefined') {
111        screenLeft = window.screenLeft;
112        screenTop = window.screenTop;
113    } else if (typeof window.screenX !== 'undefined') {
114        screenLeft = window.screenX;
115        screenTop = window.screenY;
116    }
117
118    var features_dict = {
119        toolbar: 'no',
120        location: 'no',
121        directories: 'no',
122        left: screenLeft + ($(window).width() - width) / 2,
123        top: screenTop + ($(window).height() - height) / 2,
124        status: 'yes',
125        menubar: 'no',
126        scrollbars: 'yes',
127        resizable: 'no',
128        width: width,
129        height: height
130    };
131    features_arr = [];
132
133    for (var k in features_dict) {
134        features_arr.push(k + '=' + features_dict[k]);
135    }
136
137    features_str = features_arr.join(',');
138    var win = window.open(url, name, features_str);
139
140    if (target == '_parent') {
141        win = window.open(url, target, name, features_str);
142    }
143    win.focus();
144    return false;
145}
146
147function openNewParentTab(url, name, width, height, left, top, scrollbars) {
148    window.open(url, name, 'left=' + left + ', top=' + top + ', width=' + width + ', height=' + height + ', scrollbars=' + scrollbars + ', location=no, menubar=no, titlebar=no, hotkeys=no, toolbars=no, status =no, resizable=yes');
149}
150
151// GLOBAL ALERT
152// must be include izi-toast plugin
153window.buzzer = (arg) => {
154    iziToast[arg.status]({
155        timeout: arg.timeout ?? 3000,
156        overlay: arg.overlay ?? true,
157        close: arg.close ?? true,
158        position: 'topCenter',
159        title: '',
160        message: arg.msg,
161        onClosed: arg.onClosed ?? '',
162        buttons: arg.button ?? '',
163    });
164}
165
166window.countdowntime = function (servertime, time, elementId) {
167    time = new Date(time);
168    servertime = new Date(servertime);
169      // Update the count down every 1 second
170      var x = setInterval(function() {
171
172      var now = new Date()
173      // cek if time bet is close pass time now
174      if (time < servertime) {
175        time.setDate(servertime.getDate() + 1);
176      }
177      now.setHours(servertime.getHours(), now.getMinutes());
178
179      // referesh every one hours
180      var sec = `${now.getMinutes()}${now.getSeconds()}`;
181      if (sec == '01') {
182        window.location = window.location.pathname;
183      }
184          // Find the distance between now and the count down date
185          var distance = time - now;
186          // Time calculations for days, hours, minutes and seconds
187          var days = Math.floor(distance / (1000 * 60 * 60 * 24));
188          var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
189          var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
190          var seconds = Math.floor((distance % (1000 * 60)) / 1000);
191
192      if (days > 0) {
193          hours = hours + 24 * days;
194      }
195
196          var h = (hours > 0) ? `${hours}` : 00;
197          var m = (minutes > 0) ? `${minutes}` : 00;
198
199    //   if (time < servertime) {
200    //     document.querySelector(($.isArray(elementId)) ? elementId[3] : elementId).innerHTML = 'BET CLOSED'
201    //   }else{
202          if ($.isArray(elementId)) {
203            if (document.querySelector(elementId[0]) != null) {
204                document.querySelector(elementId[0]).innerHTML = `${h}`
205            }
206            if (document.querySelector(elementId[1]) != null) {
207                document.querySelector(elementId[1]).innerHTML = `${m}`
208            }
209            if (document.querySelector(elementId[2]) != null) {
210                document.querySelector(elementId[2]).innerHTML = `${seconds}`
211            }
212          }else {
213            document.querySelector(elementId).innerHTML = `${h}:${m}:${seconds}`
214          }
215    //   }
216          // If the count down is finished, write some text
217          if (distance < 0) {
218              clearInterval(x);
219          }
220      }, 1000);
221  }

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.