mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 03:56:26 +02:00
parent
e128cba84a
commit
096db123d7
7 changed files with 70 additions and 2 deletions
|
@ -79,10 +79,16 @@
|
|||
var l = desc.length;
|
||||
|
||||
var ignoredColors = {};
|
||||
var statistic;
|
||||
if (prefs("ignoreFrequentColors")){
|
||||
var statistic = colorStatistics.compute(source);
|
||||
statistic = colorStatistics.compute(source);
|
||||
ignoredColors = statistic.getMaxColors(prefs("ignoreFrequentColors"));
|
||||
}
|
||||
if (prefs("minColors")){
|
||||
if (!colorStatistics.hasMoreColors(source, prefs("minColors"), statistic)){
|
||||
return original;
|
||||
}
|
||||
}
|
||||
|
||||
var rng = randomSupply.getPixelRng(l, window, ignoredColors);
|
||||
var fakeAlphaChannel = prefs("fakeAlphaChannel");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue