How to hide Javascript from Netsurf
Failing content
Netsurf doesnt support Javascript but it appears the authors have written the browser to detect and ignore anything in a <script> tag
So it is possible to write Javascript content that will display normally on browsers like Internet Explorer, Oregano and Firefox. Then for Netsurf we get a simplfied Non-Javascript version that will not leave any odd effects
The goal is to keep the Javascript content within the <script> tag
Of course this means you can also forget online shopping and banking with Netsurf
Note this is common practice on the internet for websites to detect the capabilities of web browsers and downgrade the content so you can still view a simplified version of it (Flash, Javascript)
For forms and textareas make sure you generate them within the Javascript, for this use document.write()
<script type="text/javascript">
document.write("<center><form name='demoform'><input type='text' name='demotext' size='40'></form></center>")
var message = "Hello this is a message, how very interesting, it goes on and on, actually not that exciting, more an example of a scrolling text in a form."
function scrollform()
{
message = message.substring(1, message.length) + message.substring(0, 1)
document.demoform.demotext.value = message
setTimeout("scrollform()", 100)
}
setTimeout("scrollform()", 1000)
</script>
If you are using Rollovers or image swopping you will lose the ability to make the images flip
For Rollovers with a link this doesnt matter as the link still works so people will be none the wiser
For things like the clock demonstrated earlier obviously you dont want a broken clock on Netsurf so use document.write() to generate the images within the <script> tag
document.write('<center><img name="clockTH" src="images/0.jpg" alt="clockTH" width="34" height="50"><img name="clockUH" src="images/0.jpg" alt="clockUH" width="34" height="50"><img name="dot1" src="images/dotOn.jpg" alt="Valve" width="11" height="50"><img name="clockTM" src="images/0.jpg" alt="clockTM" width="34" height="50"><img name="clockUM" src="images/0.jpg" alt="clockUM" width="34" height="50"><img name="dot2" src="images/dotOn.jpg" alt="Valve" width="11" height="50"><img name="clockTS" src="images/0.jpg" alt="clockTS" width="34" height="50"><img name="clockUS" src="images/0.jpg" alt="clockUS" width="34" height="50"><img name="dotampm" src="images/AM.jpg" alt="dotampm" width="11" height="50"></center>')
This is a version written to hide itself on Netsurf:
Page14