mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 03:56:26 +02:00
Ask mode did not show canvas canvas any more.
This commit is contained in:
parent
95605ef746
commit
2f4fca10ab
4 changed files with 14 additions and 12 deletions
|
@ -214,7 +214,7 @@
|
|||
if (canvasSizeShouldBeFaked(this, prefs)){
|
||||
var fakeCanvas = getFakeCanvas(window, this, prefs);
|
||||
if (fakeCanvas !== this){
|
||||
notify.call(this, "fakedReadout");
|
||||
notify("fakedReadout");
|
||||
}
|
||||
return original.apply(fakeCanvas, window.Array.from(args));
|
||||
}
|
||||
|
@ -244,7 +244,7 @@
|
|||
if (canvasSizeShouldBeFaked(this, prefs)){
|
||||
var fakeCanvas = getFakeCanvas(window, this, prefs);
|
||||
if (fakeCanvas !== this){
|
||||
notify.call(this, "fakedReadout");
|
||||
notify("fakedReadout");
|
||||
}
|
||||
return original.apply(fakeCanvas, window.Array.from(args));
|
||||
}
|
||||
|
@ -275,7 +275,7 @@
|
|||
if (canvasSizeShouldBeFaked(this, prefs)){
|
||||
var fakeCanvas = getFakeCanvas(window, this, prefs);
|
||||
if (fakeCanvas !== this){
|
||||
notify.call(this, "fakedReadout");
|
||||
notify("fakedReadout");
|
||||
}
|
||||
return original.apply(fakeCanvas, window.Array.from(args));
|
||||
}
|
||||
|
@ -305,7 +305,7 @@
|
|||
fakeCanvas = getFakeCanvas(window, this.canvas, prefs);
|
||||
}
|
||||
if (fakeCanvas && fakeCanvas !== this.canvas){
|
||||
notify.call(this, "fakedReadout");
|
||||
notify("fakedReadout");
|
||||
context = window.HTMLCanvasElement.prototype.getContext.call(
|
||||
fakeCanvas,
|
||||
"2d"
|
||||
|
@ -335,7 +335,7 @@
|
|||
var rng = randomSupply.getValueRng(1, window);
|
||||
var originalValue = original.apply(this, window.Array.from(args));
|
||||
if ((typeof originalValue) === "boolean"){
|
||||
notify.call(this, "fakedReadout");
|
||||
notify("fakedReadout");
|
||||
var index = x + this.width * y;
|
||||
return original.call(this, rng(x, index), rng(y, index));
|
||||
}
|
||||
|
@ -361,7 +361,7 @@
|
|||
var rng = randomSupply.getValueRng(1, window);
|
||||
var originalValue = original.apply(this, window.Array.from(args));
|
||||
if ((typeof originalValue) === "boolean"){
|
||||
notify.call(this, "fakedReadout");
|
||||
notify("fakedReadout");
|
||||
var index = x + this.width * y;
|
||||
return original.call(this, rng(x, index), rng(y, index));
|
||||
}
|
||||
|
@ -385,7 +385,7 @@
|
|||
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||
var {prefs, notify, window, original} = check;
|
||||
if (!this || canvasSizeShouldBeFaked(this.canvas, prefs)){
|
||||
notify.call(this, "fakedInput");
|
||||
notify("fakedInput");
|
||||
var oldImageData;
|
||||
try {
|
||||
// "this" is not trustable - it may be not a context
|
||||
|
@ -420,7 +420,7 @@
|
|||
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||
var {prefs, notify, window, original} = check;
|
||||
if (!this || canvasSizeShouldBeFaked(this.canvas, prefs)){
|
||||
notify.call(this, "fakedInput");
|
||||
notify("fakedInput");
|
||||
var oldImageData;
|
||||
try {
|
||||
// "this" is not trustable - it may be not a context
|
||||
|
@ -455,7 +455,7 @@
|
|||
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||
var {prefs, notify, window, original} = check;
|
||||
if (!this || canvasSizeShouldBeFaked(this.canvas, prefs)){
|
||||
notify.call(this, "fakedReadout");
|
||||
notify("fakedReadout");
|
||||
var fakeCanvas = getFakeCanvas(window, this.canvas, prefs);
|
||||
var {context} = copyCanvasToWebgl(
|
||||
window,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue