Editing Location bar tricks

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 87: Line 87:
which means that instead of typing <code>go foo</code> into the address bar to get a search for foo from the full-fat google.com one would type <code>g foo</code> to search google.co.uk.
which means that instead of typing <code>go foo</code> into the address bar to get a search for foo from the full-fat google.com one would type <code>g foo</code> to search google.co.uk.
-
An alternative, UK-centric version of the search file is available [http://talk.maemo.org/attachment.php?attachmentid=14436&d=1286383620 here]. Follow the instructions above to use it. Diferences include making google.co.uk the default search engine, usind Oxford English Dictionaries reather than dictionary.com and adding [http://traintimes.org.uk traintimes.org.uk] support. For instance, putting <code>tt hitchin york 1000 tomorrow</code> will search for tomorrow's departures from Hitchin to York at around 1000; you can click the iCal links from its search results to get the times entered into your N900 calendar. The site can also use the N900's geolocation abilities; typing <code>tt nearest York</code> or <code>tt n York</code> will, after prompting for permission to use geolocation, search for the next service to York from the station neaest to you.  For more on how to use this look at information on bookmarable searches on the [http://traintimes.org.uk traintimes] frontpage.
+
A further change possible is to add the lines
 +
urls['tt']='http://traintimes.org.uk/%s';
 +
into the search engine list block of code and
 +
redirUrl = redirUrl.replace(/%2F/g,"\/");
 +
before the line
 +
  document.location.replace(redirUrl);
 +
This allows you to replicate the bookmarkable search function for UK train journeys on the excellent [traintimes.org.uk] by typing, for instance
 +
<code>tt hitchin/york/1000/tomorrow</code> to search for tomorrow's departures from Hitchin to York at around 1000.
 +
The second line of code needs to be added as else between the script and the browser / is replaced with %2F which confuses the website.  For more on how to use this look at the [http://traintimes.org.uk/] frontpage; you can click the iCal links from its search results to get the times entered into your N900 calendar.
[[Category:Web]]
[[Category:Web]]
[[Category:Power users]]
[[Category:Power users]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)