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:
parent
8cec88f5f7
commit
3cefcfe702
7 changed files with 64 additions and 11 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue