Why is blur.js trying to access the file "none"?

I am trying to use blur.js to create a blur effect on my site so that you can see the background of the site behind the content. However, it seems he is trying to access an image called "none".

Here is the result from javascript chrome log:

$('#container').blurjs({source: 'body',radius: 10}); [ <div id=​"container">​… ] GET http://rymate.x10.mx/test/none 404 (Not Found) blur.min.js:285 (anonymous function) blur.min.js:285 jQuery.extend.each jquery-1.7.1.js:658 jQuery.fn.jQuery.each jquery-1.7.1.js:271 $.fn.blurjs blur.min.js:199 (anonymous function) InjectedScript._evaluateOn InjectedScript._evaluateAndWrap InjectedScript.evaluate 

My code is online https://gist.github.com/rymate1234/6162990 , as well as at http://rymate.x10.mx/test/ .

Any help would be appreciated.

+4
source share
1 answer

This is a bug in the plugin, it assumes that the element you pass to the plugin has the correct URL as the source.

This may be a reasonable assumption, but it does not cope with the situation where the background image in the source element is missing, when the browser says "none" .

You should probably report this if you care about the plugin because it is an unwanted and useless download on the server.

In any case, you should also use the plugin correctly, what you want:

 source: '#page' 

However, the original image must be placed by you, not onlinedesign4uu.co.uk , because the cross-contour image will not work.

+6
source

Source: https://habr.com/ru/post/1495490/


All Articles