Found a solution which you may want to implement in your plugin.
where you have:
if ( document.referrer.indexOf("<?php bloginfo('site_url'); ?>") != 0 ) {
<?php bloginfo(‘site_url’); ?> is no longer valid, it should be <?php bloginfo(‘url’); ?>
I also changed the if statement to the following to get more consistent results.
if ( document.referrer.indexOf("<?php bloginfo('url'); ?>") == -1 ) {