Tag Archives: Chrome

HTML5 Voice Search for your blog! (Chrome only)

HTML5 Logo Shield

HTML5 Voice Search How To

A while ago Google added their voice search to google.com.  This feature has been around for a while on Android and proven to be quite useful.

The HTML5 drafts have begun defining the api for voice search.

http://lists.w3.org/Archives/Public/public-xg-htmlspeech/2011Feb/att-0020/api-draft.html

If you have Google Chrome and you’ve tried the voice search, then you might want to add it to your site!

Believe it or not, it’s really simple! I added it to this website in about 30 minutes from not knowing anything about to full implementation.

How to do it!

<!DOCTYPE html>
<html>
    <head></head>
    <body>
        <script type="text/javascript">     
            function startSearch(event) {       
               document.getElementById("searchform").submit();     
            }   
        </script>
        <form action="#" method="get" id="searchform">
            <input title="Search"  type="text" name="q"  x-webkit-speech="" x-webkit-grammar="builtin:search" onwebkitspeechchange="startSearch()" />
        </form>
    </body>
</html>

More Information

http://slides.html5rocks.com/#speech-input

http://www.w3.org/TR/xhtml+voice/

http://lists.w3.org/Archives/Public/public-xg-htmlspeech/2011Feb/att-0020/api-draft.html

Weird MediaWiki/Chrome Problem

I have MediaWiki installed on my computer using Xampp. It’s good for brain dumps and organizing information easily.

This evening I encountered a strange problem. For some reason, when editing the page, clicking “Save Page” doesn’t make any difference to what’s shown. Going back to edit, though, shows the right content, but it isn’t reflected when the page is rendered. Clicking “Preview Page” will render the updated contents, but Save Page gives nothing.

It seems to be a problem with Chrome, which has been working fine with MediaWiki for months. When I loaded the wiki up in Firefox, it was rendered right and edited like it used to.

Update: Okay…it was clock issue. For some reason my computer set itself three hours behind. When I corrected it, the wiki worked fine, probably due to MediaWiki’s version control. It was giving me the content from three hours ago (I guess).