~webbeagle/beagle/webbeagle

« back to all changes in this revision

Viewing changes to default.js

  • Committer: Nirbheek Chauhan
  • Date: 2007-10-25 18:45:46 UTC
  • Revision ID: nirbheek.chauhan@gmail.com-20071025184546-05gurop31zi0usro
- Add link to Beagle Webinterface wiki page
- Add Easter eggs. No points for guessing what they are! :P

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        var query_str = document.queryform.querytext.value;
37
37
        // FIXME: Escape query_str
38
38
        // What kind of escaping? I couldn't do any code injection :-/
39
 
        if (query_str.length == 0)
40
 
                return;
 
39
        if (query_str.length == 0) {
 
40
                return;
 
41
        } else if (query_str == '42') {
 
42
                window.location = "http://en.wikipedia.org/wiki/The_Answer_to_Life,_the_Universe,_and_Everything";
 
43
                return;
 
44
        } else if (query_str == '4u7h0rz') {
 
45
                window.location = "http://svn.gnome.org/viewvc/beagle/trunk/beagle/AUTHORS?view=markup";
 
46
                return;
 
47
        }
41
48
 
42
49
        var req_string = '<?xml version="1.0" encoding="utf-8"?> <RequestWrapper xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Message xsi:type="Query"> <IsIndexListener>false</IsIndexListener> <Parts> <Part xsi:type="QueryPart_Human"> <Logic>Required</Logic> <QueryString>' + query_str + '</QueryString> </Part> </Parts> <MimeTypes/> <HitTypes/> <Sources/> <QueryDomain>Local System</QueryDomain> <MaxHits>100</MaxHits> </Message> </RequestWrapper> ';
43
50