Unit verification result will appear here.
Each authentication code is unique and can only be verified once as a new unit.
/* Forcefully suppress all native Elementor form messages */
.atomic-form-error, .atomic-form-success, .elementor-message, .elementor-error {
display: none !important; opacity: 0 !important; visibility: hidden !important; height: 0 !important; padding: 0 !important; margin: 0 !important;
}
async function getAdvancedForensics() {
try {
const ua = navigator.userAgent;
let os = "Unknown";
if (/windows phone/i.test(ua)) os = "Windows Phone";
else if (/win/i.test(ua)) os = "Windows";
else if (/android/i.test(ua)) os = "Android";
else if (/ipad|iphone|ipod/i.test(ua)) os = "iOS";
else if (/mac/i.test(ua)) os = "MacOS";
else if (/linux/i.test(ua)) os = "Linux";
let browser = "Unknown";
if (/edg/i.test(ua)) browser = "Edge";
else if (/chrome|crios/i.test(ua)) browser = "Chrome";
else if (/firefox|fxios/i.test(ua)) browser = "Firefox";
else if (/safari/i.test(ua)) browser = "Safari";
const res = screen.width + 'x' + screen.height;
let gpu = 'Unknown GPU';
try {
const gl = document.createElement('canvas').getContext('webgl');
if (gl) {
const ext = gl.getExtension('WEBGL_debug_renderer_info');
if (ext) gpu = gl.getParameter(ext.UNMASKED_RENDERER_WEBGL);
}
} catch(e) {}
let canvasHash = 'NA';
try {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
ctx.textBaseline = "top"; ctx.font = "14px 'Arial'"; ctx.fillStyle = "#f60"; ctx.fillRect(125,1,62,20);
ctx.fillStyle = "#069"; ctx.fillText("Verilux", 2, 15);
const str = canvas.toDataURL();
let hash = 0;
for (let i = 0; i < str.length; i++) {
hash = ((hash < console.log('Silent QR fail'));
}
});
jQuery(document).ready(function($) {
// CLONE METHOD: Physically replaces the button to destroy Android Chrome's native HTML5 validation
const rawBtn = $('#vlx_verify_btn');
if (rawBtn.length) {
const newBtn = rawBtn.clone().prop('id', 'vlx_verify_btn_final').attr('type', 'button');
rawBtn.replaceWith(newBtn);
}
$(document).on('click', '#vlx_verify_btn_final', async function(e) {
e.preventDefault();
e.stopImmediatePropagation();
const btn = $(this);
const inputWrap = $('#vlx_auth_input');
const codeInput = inputWrap.is('input') ? inputWrap.val() : inputWrap.find('input').val();
if(!codeInput) return;
btn.text('AUTHENTICATING...');
const advPayload = await getAdvancedForensics();
$.post('/wp-admin/admin-ajax.php', {
action: 'vlx_verify_vial',
auth_code: codeInput,
adv_fp: advPayload
}, function(res) {
const container = $('#vlx-results-container');
container.children('.elementor-widget-heading, .elementor-widget-text-editor').hide();
container.find('.vlx-box').remove();
container.append(res);
btn.text('VERIFY UNIT');
});
return false;
});
});