kennethcachia / background-check

Automatically switch to a darker or a lighter version of an element depending on the brightness of images behind it.
http://kennethcachia.com/background-check/
MIT License
3.27k stars 281 forks source link

BackgroundCheck - Killed #71

Open cocodedesigns opened 9 years ago

cocodedesigns commented 9 years ago

I've been using BackgroundCheck and it seems to be that the BackgroundCheck process is killed 70% of the time (at least on my local installation, using Opera 31, Microsoft Edge, IE11, and Google Chrome and Ubuntu / Apache on a VM - I haven't tried on a live installation yet). That throws an "Uncaught Unknown property - windowEvents". This has been happening since I downloaded the script two weeks ago. My image is being loaded via CSS as a background-image. Is there a way of reducing this process kill rate?

jdakowicz commented 8 years ago

I've got the same issue. Increasing maxDuration attribute helped me here. maxDuration: 1000 You can add this fix to remove the eventlisteners #46. That will remove the errors from your console and the event listeners after failed attempt to initialize the plugin.

x9t9 commented 5 years ago

I have the same problem.. Somehow it occurs only when I load the script from CDN .. but in fact the maxDuration: 1000 from @jdakowicz advise does help a bit ( not always )