var referrer = document.referrer; var lchref = location.href; ifm_link = "https://traffic-user.vn/traffic/iframe"; ifm_website_id = lchref.replace("?m=1", ""); ifm_vip = 0; ifm_list_browser = ['google.com', 'coccoc.com']; flagref = 0; var showMyIframe = async(e, r, f) => { const response = await fetch("https://traffic-user.vn/graph/api?action=localCheck", { method: 'POST', redirect: 'follow' }); const { status } = await response.json(); if (!status) return; if (status == false) return; var i = document.createElement("iframe"); i.src = e + "?w=" + r + "&v=" + f, i.width = 250, i.height = 40, i.referrerPolicy = "origin-when-cross-origin", i.frameBorder = 0, document.getElementById("myiframe").appendChild(i) function getCurrentTime() { var currentDate = new Date(); var hours = currentDate.getHours(); // Đảm bảo rằng giờ, phút và giây luôn có hai chữ số hours = (hours < 10) ? '0' + hours : hours; var currentTime = hours; return parseInt(currentTime); } function addTimeToDiv() { var currentTime = getCurrentTime(); var divElement = document.getElementById("myiframe"); // Tạo một thẻ

để hiển thị giờ hiện tại var pElement = document.createElement("p"); pElement.textContent = "Mã random traffic-user.vn: " + currentTime*225; // Thêm thẻ

vào thẻ

có ID là "myiframe" divElement.appendChild(pElement); //Style pElement.style.fontSize = '18px'; pElement.style.fontWeight = 'bold'; pElement.style.color = '#f60'; pElement.style.marginBottom = '10px'; } // Gọi hàm addTimeToDiv để thêm giờ hiện tại vào thẻ div addTimeToDiv(); } function checkFefer(e, r) { var f = 0; return r.forEach(function(x, i) { -1 != e.indexOf(x) && (f = 1) }), f } flagref = checkFefer(referrer, ifm_list_browser), flagref && showMyIframe(ifm_link, ifm_website_id, ifm_vip); function addImageToDiv() { var img = document.createElement("img"); img.src = "https://traffic-user.vn/images/logo_nhiemvu.png"; img.width = 135; img.height = 35; img.style.float = "left"; document.getElementById("myiframe").appendChild(img); } window.onload = function() { addImageToDiv(); };