mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-03-13 11:44:12 +01:00
parent
af6fcd8026
commit
7b7583afe0
@ -56,7 +56,7 @@
|
|||||||
setRandomSupplyByType(prefs("rng"));
|
setRandomSupplyByType(prefs("rng"));
|
||||||
var fake = changedFunction.fakeGenerator(prefs, function(messageId){
|
var fake = changedFunction.fakeGenerator(prefs, function(messageId){
|
||||||
notify({url: window.location.href, errorStack: error.stack, messageId});
|
notify({url: window.location.href, errorStack: error.stack, messageId});
|
||||||
});
|
}, original);
|
||||||
switch (fake){
|
switch (fake){
|
||||||
case true:
|
case true:
|
||||||
return original;
|
return original;
|
||||||
|
@ -187,13 +187,13 @@
|
|||||||
return status;
|
return status;
|
||||||
},
|
},
|
||||||
object: "CanvasRenderingContext2D",
|
object: "CanvasRenderingContext2D",
|
||||||
fakeGenerator: function(prefs, notify){
|
fakeGenerator: function(prefs, notify, original){
|
||||||
var maxSize = prefs("maxFakeSize") || Number.POSITIVE_INFINITY;
|
var maxSize = prefs("maxFakeSize") || Number.POSITIVE_INFINITY;
|
||||||
return function getImageData(sx, sy, sw, sh){
|
return function getImageData(sx, sy, sw, sh){
|
||||||
var window = getWindow(this.canvas);
|
var window = getWindow(this.canvas);
|
||||||
var context;
|
var context;
|
||||||
if (sw * sh > maxSize){
|
if (sw * sh > maxSize){
|
||||||
context = this;
|
return original.call(this, sx, sy, sw, sh);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
notify("fakedReadout");
|
notify("fakedReadout");
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
Version 0.3.5
|
||||||
|
changes:
|
||||||
|
-
|
||||||
|
|
||||||
|
new features:
|
||||||
|
- improved performance when canvas bigger than maxSize.
|
||||||
|
|
||||||
|
fixes:
|
||||||
|
-
|
||||||
|
|
||||||
Version 0.3.4:
|
Version 0.3.4:
|
||||||
changes:
|
changes:
|
||||||
- different fake modes show independent notifications
|
- different fake modes show independent notifications
|
||||||
|
Loading…
x
Reference in New Issue
Block a user