diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index babdd1230..29973d8e8 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -1156,11 +1156,17 @@ // https://github.com/uBlockOrigin/uAssets/issues/2912 /// fingerprint2.js (function() { - let fp2 = function(){}; + let browserId = ''; + for ( let i = 0; i < 8; i++ ) { + browserId += (Math.random() * 0x10000 + 0x1000 | 0).toString(16).slice(-4); + } + const fp2 = function(){}; + fp2.get = function(opts, cb) { + if ( !cb ) { cb = opts; } + setTimeout(( ) => { cb(browserId, []); }, 1); + }; fp2.prototype = { - get: function(cb) { - setTimeout(function() { cb('', []); }, 1); - } + get: fp2.get }; window.Fingerprint2 = fp2; })();