1
0
Fork 0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-07-15 14:09:36 +02:00

Added method to display faked canvas content.

This commit is contained in:
kkapsner 2017-07-08 22:40:38 +02:00
parent 8cec88f5f7
commit 3cefcfe702
7 changed files with 64 additions and 11 deletions

View file

@ -81,7 +81,26 @@
case "fake":
setRandomSupplyByType(prefs("rng"));
var fake = changedFunction.fakeGenerator(prefs, function(messageId){
notify({url, errorStack: error.stack, messageId, timestamp: new Date(), functionName: name});
notify({
url,
errorStack: error.stack,
messageId, timestamp: new Date(),
functionName: name,
dataURL:
prefs("storeImageForInspection") &&
prefs("showNotifications")
?
(
this instanceof HTMLCanvasElement?
this.toDataURL():
(
this.canvas instanceof HTMLCanvasElement?
this.canvas.toDataURL():
false
)
):
false
});
}, window, original);
switch (fake){
case true: