• hello, thanks for this plugin. i tested a few lazy load plugins and this is my favorite.

    i have two future requests:

    1) it’s posible to disable the lazy plugin script for specific browsers?
    it would be nice if we had an option similar with Skip images with specific classes , to have a field where to manualy enter a wildcard from User-Agent. (or inverse activate script only on specific browsers).
    i ask this because i tested this plugin with Firefox, Chrome and IE. it seems on last (IE8) is very resurce consuming (processor). i would like to disable lazy-load if IE is detected.

    2) if is posible to disable script not only for thumbnails but for all images with a smaller size? i would like an option where to skip script on images smaller then a certain wight / height.

    http://wordpress.org/plugins/bj-lazy-load/

Viewing 1 replies (of 1 total)
  • Thread Starter eliz82

    (@eliz82)

    based of this example
    http://wordpress.org/support/topic/solution-disable-bjll-on-specific-pagesspecific-browsers
    I made this code for disabling BJ Lazy Load for Internet Explorer browser.

    add this in theme’s functions.php

    <?php
    /*
     * Disable BJ Lazy Load for Internet Explorer browser
     */
    function BJLL_detect_ie()
    {
        if (isset($_SERVER['HTTP_USER_AGENT']) &&
        (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
            return true;
        else
            return false;
    }
    if (BJLL_detect_ie()){
    	function remove_BJLL_script(){ wp_deregister_script('BJLL'); }
    	add_action('wp_print_scripts','remove_BJLL_script');
    
    	function remove_BJLL_filter(){
    		$bjll = BJLL::singleton();
    		remove_filter('the_content',array($bjll, 'filter'),200);
    	}
    	add_filter('wp','remove_BJLL_filter');
    }
    ?>

    I have tested with IE, Firefox & Chrome and it seems to work correctly

Viewing 1 replies (of 1 total)
  • The topic ‘future request’ is closed to new replies.