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

Added TextMetrics protection

Fixes #448
This commit is contained in:
kkapsner 2020-03-14 12:54:23 +01:00
parent 692b4616e2
commit ec128796e3
18 changed files with 328 additions and 3 deletions

View file

@ -50,7 +50,15 @@
}
const cache = {};
const valueCache = [{}, {}, {}, {}];
const valueCache = [{}, {}, {}, {}, {}];
scope.cache = {
valueCache,
X: 0,
Y: 1,
WIDTH: 2,
HEIGHT: 3,
OTHER: 4
};
function getFakeDomRect(window, domRect, prefs, notify){
const hash = getHash(domRect);
let cached = cache[hash];