diff --git a/canvasblocker.xpi b/canvasblocker.xpi index 89abdf0..5b3b4ad 100644 Binary files a/canvasblocker.xpi and b/canvasblocker.xpi differ diff --git a/data/inject.js b/data/inject.js index b3e8544..fbb1099 100644 --- a/data/inject.js +++ b/data/inject.js @@ -65,13 +65,15 @@ mode: blockMode.readAPI, object: unsafeWindow.CanvasRenderingContext2D, fake: function(sx, sy, sw, sh){ - var imageData = new window.ImageData(sw, sh); var l = sw * sh * 4; + var data = new Uint8ClampedArray(l); for (var i = 0; i < l; i += 1){ - imageData.data[i] = Math.floor( + data[i] = Math.floor( Math.random() * 256 ); } + var imageData = new window.ImageData(sw, sh); + imageData.data.set(cloneInto(data, unsafeWindow)); return imageData; } },