[Plugin: Processing JS] Message for IE users
-
As processing.js doesn’t work on Internet Explorer (despite some simple examples on IE9) I give a message to IE users. The easiest way (but probably not the most elegant) consists in two modifications of the plugin:
1. Deactivate processing.js reference in header because of erros it produces on IE changing line 32 of processing-js.php:
if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') == false)) { wp_enqueue_script('processing-js', plugin_dir_url(__FILE__) . 'js/processing-1.3.6.min.js'); }
2. Show error message instead of Canvas adding code to line 8 of js/init.js and putting the rest of the code inside else statement:
if (jQuery.browser.msie) { jQuery(document).ready(function($){ var script = jQuery("script[type*=processing]").get(0); jQuery(script).after("<p>IE doesn't support canvas, please use Firefox or Chrome.</p>"); }); } else { //original javascript code of init.js }
- The topic ‘[Plugin: Processing JS] Message for IE users’ is closed to new replies.