Skip to content
Permalink
Browse files
Bring fingerprint2.js scriptlet up to date
Related issue:
- uBlockOrigin/uAssets#4961
  • Loading branch information
gorhill authored and JustOff committed Jun 14, 2020
1 parent d1d3559 commit ae2114d31d94f630631f994e20f9cb1234446cf9
Showing with 9 additions and 3 deletions.
  1. +9 −3 assets/resources/resources.txt
@@ -1971,11 +1971,17 @@ twitch-videoad.js application/javascript
# https://github.com/uBlockOrigin/uAssets/issues/2912
fingerprint2.js application/javascript
(function() {
let browserId = '';
for ( let i = 0; i < 8; i++ ) {
browserId += (Math.random() * 0x10000 + 0x1000 | 0).toString(16).slice(-4);
}
let 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;
})();

0 comments on commit ae2114d

Please sign in to comment.