mirror of https://github.com/gorhill/uBlock.git
Bring fingerprint2.js scriptlet up to date
Related issue: - https://github.com/uBlockOrigin/uAssets/pull/4961
This commit is contained in:
parent
db5967731d
commit
d95b27915f
|
@ -1156,11 +1156,17 @@
|
||||||
// https://github.com/uBlockOrigin/uAssets/issues/2912
|
// https://github.com/uBlockOrigin/uAssets/issues/2912
|
||||||
/// fingerprint2.js
|
/// fingerprint2.js
|
||||||
(function() {
|
(function() {
|
||||||
let fp2 = function(){};
|
let browserId = '';
|
||||||
fp2.prototype = {
|
for ( let i = 0; i < 8; i++ ) {
|
||||||
get: function(cb) {
|
browserId += (Math.random() * 0x10000 + 0x1000 | 0).toString(16).slice(-4);
|
||||||
setTimeout(function() { cb('', []); }, 1);
|
|
||||||
}
|
}
|
||||||
|
const fp2 = function(){};
|
||||||
|
fp2.get = function(opts, cb) {
|
||||||
|
if ( !cb ) { cb = opts; }
|
||||||
|
setTimeout(( ) => { cb(browserId, []); }, 1);
|
||||||
|
};
|
||||||
|
fp2.prototype = {
|
||||||
|
get: fp2.get
|
||||||
};
|
};
|
||||||
window.Fingerprint2 = fp2;
|
window.Fingerprint2 = fp2;
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in New Issue