<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Burad&#039;s Blog &#187; web browser</title>
	<atom:link href="http://www.aburad.com/blog/tag/web-browser/feed" rel="self" type="application/rss+xml" />
	<link>http://www.aburad.com/blog</link>
	<description>A computer nerd who would soon be an MBA</description>
	<lastBuildDate>Thu, 28 Oct 2010 15:53:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Creating Firefox Extension</title>
		<link>http://www.aburad.com/blog/2006/06/creating-firefox-extension.html</link>
		<comments>http://www.aburad.com/blog/2006/06/creating-firefox-extension.html#comments</comments>
		<pubDate>Mon, 05 Jun 2006 11:38:00 +0000</pubDate>
		<dc:creator>burad</dc:creator>
				<category><![CDATA[firefox]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web browser]]></category>

		<guid isPermaLink="false">http://aburad.com/blog/?p=78</guid>
		<description><![CDATA[Learn by example Everyone has a good idea at one time or another to implement a new feature in a web browser. Well, with the goodness that is Mozilla Firefox, now you can do just that. You need to have a vague understanding of XUL and Javascript, but you certainly don&#8217;t need to be a [...]]]></description>
			<content:encoded><![CDATA[<h4><strong>Learn by example</strong></h4>
<p>Everyone has a good idea at one time or another to implement a new feature in a web browser. Well, with the goodness that is Mozilla Firefox, now you can do just that. You need to have a vague understanding of XUL and Javascript, but you certainly don&#8217;t need to be a master of either.<br />
The <a href="http://extensions.roachfiend.com/">author</a> explains how the extensions break down in a nutshell, using <span class="file">BugMeNot</span> as an example</p>
<p><a href="http://extensions.roachfiend.com/howto_bug.html">read more &gt;&gt;</a></p>
<p>Related Post : <a href="http://aburad.com/blog/2006/10/if-you-want-to-develop-firefox-extension.html">If you want to develop firefox extension</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aburad.com/blog/2006/06/creating-firefox-extension.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Little tweaks with javascript : Bookmarklets.</title>
		<link>http://www.aburad.com/blog/2006/03/little-tweaks-with-javascript-bookmarklets.html</link>
		<comments>http://www.aburad.com/blog/2006/03/little-tweaks-with-javascript-bookmarklets.html#comments</comments>
		<pubDate>Thu, 23 Mar 2006 20:26:00 +0000</pubDate>
		<dc:creator>burad</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[web browser]]></category>

		<guid isPermaLink="false">http://aburad.com/blog/?p=61</guid>
		<description><![CDATA[A bookmarklet is a snippet of Javascript that can be bookmarked (or saved as a favorite) inside your web browser. Bookmarklets can enhance web pages, add special functionality using javascript which is supported by most browsers today and make your browsing experience a lot more efficient by offering one-click access. I will first start with [...]]]></description>
			<content:encoded><![CDATA[<p>A bookmarklet is a snippet of Javascript that can be bookmarked (or saved as a favorite) inside your web browser. Bookmarklets can enhance web pages, add special functionality using javascript  which is supported by most browsers today and make your browsing experience a lot more efficient by offering one-click access. I will first start with basics.<br />Consider a simple javascript :
<ul>
<li><span style="font-style: italic;">    javascript:alert(&#8216;You clicked on the page&#8217;);</span></li>
</ul>
<p>When you type this in browsers location bar  then it will show a message box with &#8220;you clicked on the page&#8221; message.  Now  change this slightly :
<ul style="font-style: italic;">
<li> javascript:function ab(){alert(&#8220;hello&#8221;) ;};void(setInterval(ab,1));</li>
</ul>
<p>Now this will repeatedly pop-up the message box in every 1-sec interval. Though this is of no use i&#8217;m  just telling this to explain basics of javascript.</p>
<p>Now filling form with javascript :
<ul>
<li><span style="font-style: italic;">javascript:function ab() {document.forms[0].login_username.value=&#8221;someText&#8221; ; } ab() ;</span></li>
</ul>
<p>Now this javascript will fill the value &#8220;someText&#8221; in field login_username of form in html page.<br />And lets try to take some user-input :</p>
<ul style="font-style: italic;">
<li>javascript:function ab() {q=document.getSelection(); if(!q) {void(q=prompt(&#8216;Text :&#8217;,&#8221;))} else alert(q)} ab();</li>
</ul>
<p>Now this javascript will first check if some text is selected on page. If no text is selected it will prompt user for text else will show an message box with selected text. Now we can put this script to some good use : like</p>
<ul style="font-style: italic;">
<li>javascript:function ab(){q=document.getSelection(); if(!q){void(q=prompt(&#8216;Search Text at My Blog:  &#8216;,&#8221;))} location.href=&#8221;http://www.technorati.com/search/ &#8220;+q+&#8221; linux?from=http://burad.blogspot.com &#8220;; }; ab();</li>
</ul>
<p>Now this will search the selected text on my blog or if text is not selected than prompt user for text.</p>
<p>An equivalent script for searching on  wikipedia is :
<ul style="font-style: italic;">
<li>javascript:(function(){q=document.getSelection(); if(!q){void(q=prompt(&#8216;Wikipedia keywords:&#8217;,&#8221;))}; if(q) location.href= &#8216;http://en.wikipedia.org/w/wiki.phtml?search=&#8217;+escape(q)})()</li>
</ul>
<p>Now you can bookmark this script in toolbar so every tim you click on button in toolbar it will execute javascript. For example Drag this to your firefox bookmark toolbar :</p>
<p><a href="javascript:function ab(){q=document.getSelection(); if(!q){void(q=prompt('Search Text at My Blog:  ',''))} location.href='http://www.technorati.com/search/ '+q+' linux?from=http://burad.blogspot.com '; }; ab();<br />&#8220;>Search Burad&#8217;s Blog</a><br />Or for wikipedia<br /><a href="javascript:(function(){q=document.getSelection(); if(!q){void(q=prompt('Wikipedia keywords:',''))}; if(q)location.href='http://en.wikipedia.org/w/wiki.phtml?search='+escape(q)})()">Search Wikipedia</a></p>
<p>Some more bookmarklets :<br /><a href="javascript:(function(){ function zoomImage(image, amt) { if(image.initialHeight == null) { /* avoid accumulating integer-rounding error */ image.initialHeight=image.height; image.initialWidth=image.width; image.scalingFactor=1; } image.scalingFactor*=amt; image.width=image.scalingFactor*image.initialWidth; image.height=image.scalingFactor*image.initialHeight; } var i,L=document.images.length; for (i=0;i<l;++i) zoomImage(document.images[i], 2); if (!L) alert('This page contains no images.'); })();">Scale Images</a></p>
<p><a href="javascript:function toArray (c){var a, k;a=new Array;for (k=0; k<c.length; ++k)a[k]=c[k];return a;}function insAtTop(par,child){if(par.childNodes.length) par.insertBefore(child, par.childNodes[0]);else par.appendChild(child);}function countCols(tab){var nCols, i;nCols=0;for(i=0;i<tab.rows.length;++i)if(tab.rows[i].cells.length>nCols)nCols=tab.rows[i].cells.length;return nCols;}function makeHeaderLink(tableNo, colNo, ord){var link;link=document.createElement(&#8216;a&#8217;);link.href=&#8217;javascript:sortTable(&#8216;+tableNo+&#8217;,'+colNo+&#8217;,'+ord+&#8217;);&#8217;;link.appendChild(document.createTextNode((ord>0)?&#8217;a':&#8217;d'));return link;}function makeHeader(tableNo,nCols){var header, headerCell, i;header=document.createElement(&#8216;tr&#8217;);for(i=0;i<nCols;++i){headerCell=document.createElement('td');headerCell.appendChild(makeHeaderLink(tableNo,i,1));headerCell.appendChild(document.createTextNode('/'));headerCell.appendChild(makeHeaderLink(tableNo,i,-1));header.appendChild(headerCell);}return header;}g_tables=toArray(document.getElementsByTagName('table'));if(!g_tables.length) alert('This page does not contain any tables.');(function(){var j, thead;for(j=0;j<g_tables.length;++j){thead=g_tables[j].createTHead();insAtTop(thead, makeHeader(j,countCols(g_tables[j])))}}) ();function compareRows(a,b){if(a.sortKey==b.sortKey)return 0;return (a.sortKey < b.sortKey) ? g_order : -g_order;}function sortTable(tableNo, colNo, ord){var table, rows, nR, bs, i, j, temp;g_order=ord;g_colNo=colNo;table=g_tables[tableNo];rows=new Array();nR=0;bs=table.tBodies;for(i=0; i<bs.length; ++i)for(j=0; j<bs[i].rows.length; ++j){rows[nR]=bs[i].rows[j];temp=rows[nR].cells[g_colNo];if(temp) rows[nR].sortKey=temp.innerHTML;else rows[nR].sortKey='';++nR;}rows.sort(compareRows);for (i=0; i < rows.length; ++i)insAtTop(table.tBodies[0], rows[i]);}">Sort Table</a> </p>
<p><a href="javascript:(function(){var d=document,q='table',i,j,k,y,r,c,t;for(i=0;t=d.getElementsByTagName(q)[i];++i){var w=0,N=t.cloneNode(0);N.width='';N.height='';N.border=1;for(j=0;r=t.rows[j];++j)for(y=k=0;c=r.cells[k];++k){var z,a=c.rowSpan,b=c.colSpan,v=c.cloneNode(1);v.rowSpan=b;v.colSpan=a;v.width='';v.height='';if(!v.bgColor)v.bgColor=r.bgColor;while(w<y+b)N.insertRow(w++).p=0;while(N.rows[y].p>j)++y;N.rows[y].appendChild(v);for(z=0;z<b;++z)N.rows[y+z].p+=a;y+=b;}t.parentNode.replaceChild(N,t);}})()">Transpose Table</a></p>
<p><a href="javascript:(function(){var s,F,j,f,i; s = ''; F = document.forms; for(j=0; j<f.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f[i].type.toLowerCase() == 'password') s += f[i].value + '\n'; } } if (s) alert('Passwords in forms on this page:\n\n' + s); else alert('There are no passwords in forms on this page.');})();">Show Password</a></p>
<p>So in a way they are different from bookmarks and provides extra functionality through power of javascript. Here are some more javascript bookmarklet<br />You can view source for each bookmarklet by viewing page source .<br />You can find more bookmarklets at :<a href="http://www.squarefree.com/bookmarklets/"> http://www.squarefree.com/bookmarklets/</a> </p>
<p>See this <a href="http://weblog.infoworld.com/udell/gems/bookmarklet.html">helpful screencast on bookmarklets.</a></p>
<p>Some More  Example at <a href="http://www.wisdombay.com/bm/bm00001.htm">Wisdombay</a> </p>
<p><span style="font-weight: bold;">Updated : For changing documenet backgrounds : </span><br /><a href="javascript:function ab() {document.bgColor='red'; }; void(ab());">Change to Red </a><br /><a href="javascript:function ab() {document.bgColor='green'; }; void(ab());">Change to green </a><br /><a href="javascript:function ab() {document.bgColor='blue'; }; void(ab());">Change to blue </a><br />This may not work with pages using css</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aburad.com/blog/2006/03/little-tweaks-with-javascript-bookmarklets.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

