<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>firefox on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/firefox/</link>
    <description>Recent content in firefox on S Anand</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 09 Mar 2009 08:47:15 +0000</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/firefox/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Keyword searches as a Web command line</title>
      <link>https://www.s-anand.net/blog/keyword-searches-as-a-web-command-line/</link>
      <pubDate>Fri, 05 Sep 2008 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/keyword-searches-as-a-web-command-line/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://tools-for-thought.com/2008/09/03/15-ubiquity-commands-to-enhance-your-web-experience/&#34;&gt;Andre&amp;rsquo;s mentions&lt;/a&gt; dumping &lt;a href=&#34;http://www.google.com/chrome&#34;&gt;Google Chrome&lt;/a&gt; because of lack of extension support, especially &lt;a href=&#34;https://wiki.mozilla.org/Labs/Ubiquity&#34;&gt;Ubiquity&lt;/a&gt;, and lists 15 useful Ubiquity commands.&lt;/p&gt;
&lt;p&gt;If you haven&amp;rsquo;t seen Ubiquity, you should. It&amp;rsquo;s a great extension that transforms your browser into an Internet command prompt. It is modelled on the &lt;a href=&#34;http://www.humanized.com/enso/launcher/&#34;&gt;Enso Launcher&lt;/a&gt;, which is a great piece of work by itself.&lt;/p&gt;
&lt;p&gt;I wasn&amp;rsquo;t quite prepared to let go of Chrome that easily. On Task Manager, seeing 10 Chrome processes, the largest of which takes up 60MB, is a lot more comforting, psychologically, than 1 Firefox process taking up 300MB. (I rarely hit my 1GB RAM limit, so it shouldn&amp;rsquo;t matter either way. Yet, the spendthrift in me keeps watching.)&lt;/p&gt;
&lt;p&gt;So the question is, can I do all the items on his list &lt;strong&gt;without using Ubiquity&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s pick the easiest. Google search. If you typed &amp;ldquo;g some words&amp;rdquo; on Ubiquity, you get the Google search results for &amp;ldquo;some words&amp;rdquo;. But you already have that. If you have Firefox, typing any words on the address bar automatically does a Google search for you. On Internet Explorer, it search live.com, but you can easily change that by installing the &lt;a href=&#34;http://toolbar.google.com/&#34;&gt;Google Toolbar&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But the great thing is that this can be customised. On Firefox, click on the down arrow icon next to the search box and select &amp;ldquo;Manage Search Engines&amp;hellip;&amp;rdquo; to see a list of your search engines. Select the one you want to use, click on &amp;ldquo;Edit Keyword&amp;hellip;&amp;rdquo; and select the keyword you want. For instance, I&amp;rsquo;ve typed &amp;ldquo;google&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-manage-search-engines_2830355060_o-png.webp&#34; title=&#34;Manage Search Engines by S Anand, on flickr&#34;&gt;&lt;img alt=&#34;Manage Search Engines&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-manage-search-engines_2830355060_o-png.webp&#34;&gt;&lt;/a&gt; &lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-add-keywords_2830355062_o-png.webp&#34; title=&#34;Add Keywords by S Anand, on Flickr&#34;&gt;&lt;img alt=&#34;Add Keywords&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-add-keywords_2830355062_o-png.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So when I type &amp;ldquo;google some words&amp;rdquo; on the address bar (not the search bar, the address bar) I get search results for &amp;ldquo;some words&amp;rdquo;. These are called &lt;a href=&#34;http://www.mozilla.org/docs/end-user/keywords.html&#34;&gt;keyword searches&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On Firefox, you add your own search engines, but you do that using bookmarks. Press Ctrl-Shift-B (Organize Bookmarks) and create a New Bookmark. You can type in any URL in the location field. If you type &amp;ldquo;%s&amp;rdquo; as part of the URL, that will be replaced by the search string. So for instance, using a location &lt;code&gt;http://en.wikipedia.org/wiki/Special:Search?search=%s&lt;/code&gt; and the keyword &amp;ldquo;wiki&amp;rdquo; will do a Wikipedia search for &amp;ldquo;Harry Potter&amp;rdquo; if you type &amp;ldquo;wiki Harry Potter&amp;rdquo; on the address bar.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It works on Internet Explorer&lt;/strong&gt; as well, even with version 6. The easiest way is to download &lt;a href=&#34;http://www.microsoft.com/windowsxp/Downloads/powertoys/Xppowertoys.mspx&#34;&gt;TweakUI&lt;/a&gt;. Go to Internet Explorer - Search. Click on the Create button. Type in a keyword (called Prefix) and a URL. If you type &amp;ldquo;%s&amp;rdquo; as part of the URL, that will be replaced by the search string.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-tweakui_2830355066_o-png.webp&#34; title=&#34;TweakUI by S Anand, on Flickr&#34;&gt;&lt;img alt=&#34;TweakUI&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-tweakui_2830355066_o-png.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On Google Chrome, get to the Options (what, no shortcut key?) and in the Basics tab, click the Manage button. Here, you can click on &amp;ldquo;Add&amp;rdquo; to add a search engine.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-chrome_2830355070_o-png.webp&#34; title=&#34;Chrome by S Anand, on Flickr&#34;&gt;&lt;img alt=&#34;Chrome&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-chrome_2830355070_o-png.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So that takes care of all the basic searches: Google, Amazon, IMDB, Wikipedia, etc.&lt;/p&gt;
&lt;p&gt;\&lt;/p&gt;
&lt;p&gt;Can we go further? Item 8 on &lt;a href=&#34;http://tools-for-thought.com/2008/09/03/15-ubiquity-commands-to-enhance-your-web-experience/&#34;&gt;the list&lt;/a&gt; caught my attention:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Twit.&lt;/strong&gt; As much as I love full-featured Twitter clients like TweetDeck, nothing beats the simplicity of hitting &lt;strong&gt;Ctrl-Space&lt;/strong&gt; and typing &lt;strong&gt;twit [message] to so_and_so&lt;/strong&gt;, or sending a selection of text using &lt;strong&gt;twit this to so_and_so&lt;/strong&gt;. At the moment, there&amp;rsquo;s no way to receive tweets or ping Twitter for new messages.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don&amp;rsquo;t use &lt;a href=&#34;http://twitter.com/&#34;&gt;Twitter&lt;/a&gt;, but I do use &lt;a href=&#34;http://identi.ca/sanand0&#34;&gt;Identi.ca&lt;/a&gt;, and I would like something like this. Right now, I&amp;rsquo;m using Google Talk to update identi.ca. Two problems. I don&amp;rsquo;t like chatting, and logging on exposes me to a lot of distraction. Secondly, I&amp;rsquo;d rather not have to open an application just for this. Something in the browser would be perfect. But is it possible?&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://identi.ca/&#34;&gt;Identi.ca&lt;/a&gt; (and Twitter, and most micro-blogging services) let you update via e-mail. So if I could write a program that would mail identi.ca, I should be done. So I did that with a Perl script.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-perl&#34; data-lang=&#34;perl&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;my&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$q&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;CGI&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;open&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OUT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;|/usr/sbin/sendmail -t&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OUT&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;join&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;\n&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s&#34;&gt;&amp;#34;From: my.authenticated.id@gmail.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s&#34;&gt;&amp;#34;To: 1234567890abcdef@identica.com&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s&#34;&gt;&amp;#34;Subject: \n\n&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nv&#34;&gt;$q&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;param&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#39;q&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So if I placed this at &lt;a href=&#34;https://www.s-anand.net/identica&#34;&gt;www.s-anand.net/identica&lt;/a&gt; (no, I haven&amp;rsquo;t placed it there), I just need to create a keyword search with a prefix Tidentica&amp;quot; that points to &lt;code&gt;www.s-anand.net/identica?q=%s&lt;/code&gt;. Then I can type &amp;ldquo;identica Here is a message that I want to post&amp;rdquo; on the address bar, and it gets posted.&lt;/p&gt;
&lt;p&gt;Actually, if you can write your own programs, the possibilities are endless. If you&amp;rsquo;re looking for someone to host this sort of thing for free, &lt;a href=&#34;http://appengine.google.com/&#34;&gt;Google&amp;rsquo;s AppEngine&lt;/a&gt; may be a reasonable point to start.&lt;/p&gt;
&lt;p&gt;\&lt;/p&gt;
&lt;p&gt;But the real power of this comes with Javascript. Those URLs that you saw for keyword searches? &lt;strong&gt;Those can be Javascript URLs&lt;/strong&gt;. So item 9 on &lt;a href=&#34;http://tools-for-thought.com/2008/09/03/15-ubiquity-commands-to-enhance-your-web-experience/&#34;&gt;the list&lt;/a&gt;&amp;hellip;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Word count.&lt;/strong&gt; As a student of copywriting, I’m frequently curious about an article’s word length. Highlighting the desired text and entering &lt;strong&gt;word count&lt;/strong&gt; into Ubiquity will give you just that.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;hellip; might just be possible.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s easy to get the selection. The following snippet gives you the current selection. (Tested in IE 5.5 - 8, Firefox 3 and Google Chrome. Should work for Opera, Safari.)&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;selection&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;selection&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;createRange&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getSelection&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getSelection&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;toString&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To get the word count, just split by white space, and count the results:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;s&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;selection&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;selection&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;createRange&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getSelection&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getSelection&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;toString&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;alert&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;split&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sr&#34;&gt;/\s+/&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34; words&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, this whole thing can be made into a keyword search. Let&amp;rsquo;s call it count. If I go to the address bar and type &amp;ldquo;count it&amp;rdquo;, I want to use count the words in the selection. If I typed &amp;ldquo;count some set of words here&amp;rdquo;, I want to count the words in &amp;ldquo;some set of words here&amp;rdquo;. Here&amp;rsquo;s how to do that.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;javascript&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;s&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;%s&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;s&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;it&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;s&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;selection&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;selection&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;createRange&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getSelection&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getSelection&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;toString&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;alert&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;split&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sr&#34;&gt;/\s+/&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34; words&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, put all of this in one line and add it as your keyword search. Try it!&lt;/p&gt;
&lt;p&gt;(Note: You need to replace { curly braces } with %7B and %7D in Google Chrome. It interprets curly braces as a special command. Also, Chrome replaces spaces with a +, so the word count will always return 1 if you search for &amp;ldquo;count some set of words here&amp;rdquo;.)&lt;/p&gt;
&lt;p&gt;\&lt;/p&gt;
&lt;p&gt;You could use selections to search as well. If you wanted to Google your selection, just use:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;javascript&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;s&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;%s&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;s&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;it&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;s&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;selection&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;selection&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;createRange&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getSelection&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;?&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getSelection&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;toString&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;location&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;replace&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;http://www.google.com/search?q=&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Typing &amp;ldquo;google it&amp;rdquo; will search for your selected words on Google. &amp;ldquo;google some words&amp;rdquo; will search for &amp;ldquo;some words&amp;rdquo; on Google.&lt;/p&gt;
&lt;p&gt;\&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve configured these keyword searches on my browser to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Share sites&lt;/strong&gt;. Typing &amp;ldquo;share google&amp;rdquo; adds the page to Google Reader, &amp;ldquo;share delicious&amp;rdquo; posts it to del.icio.us, &amp;ldquo;share digg&amp;rdquo; diggs the page, etc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Send mail from the address bar&lt;/strong&gt;. Typing &amp;ldquo;mail &lt;a href=&#34;mailto:someone@gmail.com&#34;&gt;someone@gmail.com&lt;/a&gt; sub:This is the subject. Rest of the message&amp;rdquo; in the address bar will send the mail out. (Of course, you need to have created a mail gateway. I&amp;rsquo;ll try and share this shortly.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add entries to my calendar&lt;/strong&gt;. Typing &amp;ldquo;remind Prepare dinner at 8pm&amp;rdquo; adds a reminder to my calendar to prepare dinner at 8pm.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Highlight parts of a page&lt;/strong&gt;. Typing &amp;ldquo;highlight it&amp;rdquo; highlights what I&amp;rsquo;ve selected on the page. Even after I remove the selection, the highlighting stays. Typing &amp;ldquo;highlight some phrase&amp;rdquo; highlights all occurrences of &amp;ldquo;some phrase&amp;rdquo; in the entire document. The colours change every time you use it on a page, so you can search for multiple words and see where how they&amp;rsquo;re distributed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Replaces tables with charts&lt;/strong&gt;. Typing &amp;ldquo;chart it&amp;rdquo; with a table selected replaces the table with a chart. Typing &amp;ldquo;chart it as pie&amp;rdquo; or &amp;ldquo;chart it as scatter&amp;rdquo; changes the chart type.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You could actually take any bookmarklet and convert it into a keyword search. Which means that practically anything you can do on Javascript can be convert into a command-line-like syntax on the address bar.&lt;/p&gt;
&lt;p&gt;So there it is! You can pretty much have a web command line. I wonder if we could add UNIX-pipes-like functionality.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Google Browser Sync</title>
      <link>https://www.s-anand.net/blog/google-browser-sync/</link>
      <pubDate>Thu, 08 Jun 2006 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/google-browser-sync/</guid>
      <description>&lt;p&gt;Using the &lt;a href=&#34;http://www.google.com/tools/firefox/browsersync/index.html&#34;&gt;Google Browser Sync&lt;/a&gt; extension for Firefox, you can access your bookmarks, tabs, history, saved passwords and cookies from any machine. You can browse from office, go back home, and continue browsing where you left off. Gina Trapani of Lifehacker says &lt;a href=&#34;http://www.lifehacker.com/software/google/google-sync-update-not-all-that-evil-179318.php&#34;&gt;Google Browser Sync is not a privacy risk&lt;/a&gt; after all.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Reducing your memory usage in Firefox</title>
      <link>https://www.s-anand.net/blog/reducing-your-memory-usage-in-firefox/</link>
      <pubDate>Thu, 06 Apr 2006 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/reducing-your-memory-usage-in-firefox/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://tech.cybernetnews.com/2006/04/04/reducing-your-memory-usage-in-firefox/&#34;&gt;Reducing your memory usage in Firefox&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Delicious tags</title>
      <link>https://www.s-anand.net/blog/delicious-tags/</link>
      <pubDate>Wed, 13 Apr 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/delicious-tags/</guid>
      <description>&lt;p&gt;If you move the mouse over a link, a popup appears, showing the most popular tags on del.icio.us for the link. Click on the tag to visit all related links on del.icio.us.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Sathish&lt;/strong&gt; &lt;em&gt;15 Apr 2005 3:56 am&lt;/em&gt;:
What is this post related to? Did try out the new &amp;ldquo;big del.icio.us post&amp;rdquo; script? or are you talking of something else?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;15 Apr 2005 4:02 am&lt;/em&gt;:
If you move your mouse over any of my blog posts, a tooltip pops up. Did you notice?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sathish&lt;/strong&gt; &lt;em&gt;18 Apr 2005 5:05 am&lt;/em&gt;:
I notice it now.. I notice it on the right hand side corner of the page.. I am using firefox to view.. is it how u planned to show it or is there a problem?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;18 Apr 2005 6:03 am&lt;/em&gt;:
Looks like a problem. I will check it out.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;sathish&lt;/strong&gt; &lt;em&gt;20 Apr 2005 3:59 am&lt;/em&gt;:
it works now..&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
    <item>
      <title>lickr</title>
      <link>https://www.s-anand.net/blog/lickr/</link>
      <pubDate>Mon, 11 Apr 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/lickr/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://brevity.org/code/mozilla/greasemonkey/lickr/&#34;&gt;lickr&lt;/a&gt;: Flickr, without the Flash.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Flickr is a popular photo hosting service that uses embedded Flash files as part of their interface. On every page, there will be a little delay while a new Flash file loads. Lickr removes the need for Flash. It runs within the web browser Firefox, stripping the Flash before the user can even see it, and replacing it with an equivalent interface in pure HTML and Javascript.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
    </item>
    <item>
      <title>Firefox prefetches Google results</title>
      <link>https://www.s-anand.net/blog/firefox-prefetches-google-results/</link>
      <pubDate>Fri, 01 Apr 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/firefox-prefetches-google-results/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://googleblog.blogspot.com/2005/03/enhanced-searching-with-firefox.html&#34;&gt;Firefox prefetches Google results&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>200531</title>
      <link>https://www.s-anand.net/blog/200531/</link>
      <pubDate>Thu, 31 Mar 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/200531/</guid>
      <description>&lt;p&gt;When I use the URL &lt;a href=&#34;http://www.geocities.com/root_node/?200531&#34;&gt;http://www.geocities.com/root_node/?200531&lt;/a&gt; to view my site, it doesn&amp;rsquo;t show the Yahoo! ad bar on the right. But when I use any other number, like &lt;a href=&#34;http://www.geocities.com/root_node/?200530&#34;&gt;http://www.geocities.com/root_node/?200530&lt;/a&gt;, or load it plain, like &lt;a href=&#34;http://www.geocities.com/root_node&#34;&gt;http://www.geocities.com/root_node&lt;/a&gt;, it doesn&amp;rsquo;t work. I suspect the 200531 is related to today&amp;rsquo;s date (2005 Mar 31), that it changes every day, and that this feature is used by one of Firefox&amp;rsquo;s ad blockers.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Jetru&lt;/strong&gt; &lt;em&gt;31 Mar 2005 9:15 am&lt;/em&gt;:
Cool!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Jetru&lt;/strong&gt; &lt;em&gt;31 Mar 2005 9:25 am&lt;/em&gt;:
Hey, your search searches the html.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;1 Apr 2005 3:51 am&lt;/em&gt;:
It does use dates. On April 1, I have to use 20051 instead of 200531&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;1 Apr 2005 3:52 am&lt;/em&gt;:
Yes, Jetru &amp;ndash; the search box does a regular expression search of all HTML&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
  </channel>
</rss>
