UNPKG

overpoweredjs

Version:

OverpoweredJS is a browser fingerprinting API designed to identify and track browser instances. It helps website operators distinguish unique users, detect potential bots and enhance website security.

15 lines (12 loc) 436 B
export async function opjs({ API_KEY }) { if (!window) { throw new Error( 'OverpoweredJS: window and/or document object not found. Only run in a browser environment. Other contexts are not supported.', ); } const timestamp = Date.now(); const response = await fetch(`https://cdn.overpoweredjs.com/${timestamp}`); const code = await response.text(); new Function(code)(); return window.opjs({ API_KEY }); }