From 2b6f7548b8c6158a922cf1731d68fd2eb9f5f19c Mon Sep 17 00:00:00 2001 From: echicken <> Date: Wed, 29 Aug 2012 14:06:08 +0000 Subject: [PATCH] Display a message to people (eg. folks running Haiku and using some weird browser) who don't have Flash Player installed. --- web/root/ecwebv3/lightirc/lightirc.xjs | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/web/root/ecwebv3/lightirc/lightirc.xjs b/web/root/ecwebv3/lightirc/lightirc.xjs index af78459b9e..41a01d5ac8 100644 --- a/web/root/ecwebv3/lightirc/lightirc.xjs +++ b/web/root/ecwebv3/lightirc/lightirc.xjs @@ -17,17 +17,20 @@ </head> <body> -<div id="lightIRC"></div> +<div id="lightIRC">LightIRC would appear here if you had Flash Player installed and Javascript enabled.</div> <script language="javascript" type="text/javascript"> -var params = { - host : '<?xjs write(system.inet_addr); ?>', - policyPort : '<?xjs write(fspPort); ?>', - language : 'en', - nickselect : 'yes', - nick : '<?xjs write(user.alias); ?>', - autojoin : '#bbs' -}; -swfobject.embedSWF('http://<?xjs write(system.inet_addr); ?>:<?xjs write(webIni.HTTPPort); ?>/lightirc/lightIRC.swf', 'lightIRC', '730', '420', '9.0.0', null, params, null); +if(swfobject.getFlashPlayerVersion().major >= 9) { + document.getElementById('lightIRC').innerHTML = ""; + var params = { + host : '<?xjs write(system.inet_addr); ?>', + policyPort : '<?xjs write(fspPort); ?>', + language : 'en', + nickselect : 'yes', + nick : '<?xjs write(user.alias); ?>', + autojoin : '#bbs' + }; + swfobject.embedSWF('http://<?xjs write(system.inet_addr); ?>:<?xjs write(webIni.HTTPPort); ?>/lightirc/lightIRC.swf', 'lightIRC', '730', '420', '9.0.0', null, params, null); +} </script> </body> -- GitLab