1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-04 20:46:39 +02:00

navigator.oscpu and navigator.buildID are undefined in non Gecko browsers

Fixes #411
This commit is contained in:
kkapsner 2019-12-01 01:27:29 +01:00
parent 1aff68d802
commit 59ad6fc7d6
3 changed files with 58 additions and 6 deletions

View file

@ -58,6 +58,9 @@
}
}
function parseString(string, stack){
if (string === "{undefined}"){
return undefined;
}
return string.replace(/{([a-z[\]_. -]*)}/ig, function(m, name){
return getValue(name, stack.slice());
});