<?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>PUBLOG</title>
	<atom:link href="http://blog.webkitchen.cz/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.webkitchen.cz</link>
	<description></description>
	<lastBuildDate>Wed, 16 Nov 2011 00:41:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>View Selection Source &#8211; Google Chrome Extension</title>
		<link>http://blog.webkitchen.cz/view-selection-source-chrome-extension</link>
		<comments>http://blog.webkitchen.cz/view-selection-source-chrome-extension#comments</comments>
		<pubDate>Wed, 10 Feb 2010 12:26:09 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=519</guid>
		<description><![CDATA[After many years with Opera as my primary browser, I&#8217;ve partly started to use Google Chrome as it&#8217;s rather fast and the UI is really sweet. Google Chrome has got some very useful tools for webdevelopers, but I was surprised that there was no &#8216;View Selection Source&#8217; item in the context menu. I&#8217;ve therefore decided to [...]]]></description>
			<content:encoded><![CDATA[<p><img style="float: right;" src="/wp-content/uploads/2010/02/view-selection-source-chrome.png" alt="View Selection Source - Google Chrome Extension" width="237" height="207" />After many years with Opera as my primary browser, I&#8217;ve partly started to use Google Chrome as it&#8217;s rather fast and the UI is really sweet. Google Chrome has got some very useful tools for webdevelopers, but I was surprised that there was no &#8216;View Selection Source&#8217; item in the context menu. I&#8217;ve therefore decided to port my <a href="/view-selection-source">User JavaScript</a> which allows you to see the source of a selected part of a page, originally developed for Opera, to Google Chrome as an extension (which turned out to be surprisingly easy).</p>
<p>The Chrome extension API doesn&#8217;t allow you to add items to the context menu (yet?), so after installation, there is an icon next to the address bar which you can click to display the source code. If you don&#8217;t like the default Mozilla-like color scheme of syntax highlighting, you can go to the Options page and choose the Desert one instead.</p>
<h3>Download</h3>
<p>You can install it either from the Google Chrome extensions gallery or as a bookmarklet:</p>
<ul>
<li><a href="https://chrome.google.com/extensions/detail/hhlpjofmehafeaiaiflnddnfgnnpibgf">View Selection Source as a Google Chrome extension</a></li>
<li><a href="http://www.webkitchen.cz/lab/opera/view-selection-source/js/view-selection-source-bookmarklet.js.txt">Bookmarklet version</a> (displays the code in a new window and has no configuration options)</li>
</ul>
<h3>Screenshots</h3>

<a href='http://blog.webkitchen.cz/view-selection-source-chrome-extension/screenshot-3' title='Desert color sheme of syntax highlighting'><img width="150" height="90" src="http://blog.webkitchen.cz/wp-content/uploads/2010/02/Screenshot-150x90.png" class="attachment-thumbnail" alt="" title="Desert color sheme of syntax highlighting" /></a>
<a href='http://blog.webkitchen.cz/view-selection-source-chrome-extension/screenshot-1-2' title='Mozilla color sheme of syntax highlighting'><img width="150" height="90" src="http://blog.webkitchen.cz/wp-content/uploads/2010/02/Screenshot-1-150x90.png" class="attachment-thumbnail" alt="" title="Mozilla color sheme of syntax highlighting" /></a>
<a href='http://blog.webkitchen.cz/view-selection-source-chrome-extension/screenshot-2-2' title='Options'><img width="150" height="93" src="http://blog.webkitchen.cz/wp-content/uploads/2010/02/Screenshot-2-150x93.png" class="attachment-thumbnail" alt="" title="Options" /></a>

<h3>Custom Color Schemes</h3>
<p>If you feel like creating a new color scheme, here is how the CSS code looks like. Hope the class names are descriptive enough:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#desert</span> body <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#desert</span> <span style="color: #6666ff;">.tag</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#BDB76B</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#desert</span> <span style="color: #6666ff;">.entity</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span> <span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#desert</span> <span style="color: #6666ff;">.tagName</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#BDB76B</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#desert</span> <span style="color: #6666ff;">.attrName</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#BDB76B</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#desert</span> <span style="color: #6666ff;">.attrValue</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFA0A0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#desert</span> <span style="color: #6666ff;">.quote</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFA0A0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#desert</span> <span style="color: #6666ff;">.comment</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.comment</span> <span style="color: #00AA00;">*</span>  <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#87CEEB</span> !important <span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span> !important <span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#desert</span> <span style="color: #6666ff;">.cdataMark</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ff6600</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#desert</span> <span style="color: #6666ff;">.cdataContent</span><span style="color: #00AA00;">,</span> <span style="color: #6666ff;">.cdataContent</span> <span style="color: #00AA00;">*</span>  <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ff6600</span> !important <span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span> !important <span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Once you&#8217;ve created one, don&#8217;t forget to send it to me so that I can build it into the extension!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/view-selection-source-chrome-extension/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Virtualhosty pro Apache bez nutnosti editace /etc/hosts</title>
		<link>http://blog.webkitchen.cz/virtualhosty</link>
		<comments>http://blog.webkitchen.cz/virtualhosty#comments</comments>
		<pubDate>Tue, 01 Dec 2009 15:21:42 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[Česky]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=444</guid>
		<description><![CDATA[Následující postup umožní vytvářet nové lokální subdomény pro virtualhosty Apache bez nutnosti editace souboru /etc/hosts. Docílí se toho použitím dnsmasq jako lokálního DNS serveru. Jedná se o řešení pro Linux.  Postup byl testován ve Fedoře, v jiných distribucích se pravděpodobně bude lišit minimálně způsob instalace.
Nainstalujeme dnsmasq:

yum -y install dnsmasq

Povolíme spuštění po startu:

chkconfig --level 5 [...]]]></description>
			<content:encoded><![CDATA[<p>Následující postup umožní vytvářet nové lokální subdomény pro virtualhosty Apache bez nutnosti editace souboru /etc/hosts. Docílí se toho použitím dnsmasq jako lokálního DNS serveru. Jedná se o řešení pro Linux. <span id="more-444"></span> Postup byl testován ve Fedoře, v jiných distribucích se pravděpodobně bude lišit minimálně způsob instalace.</p>
<p>Nainstalujeme dnsmasq:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> dnsmasq</pre></div></div>

<p>Povolíme spuštění po startu:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">chkconfig <span style="color: #660033;">--level</span> <span style="color: #000000;">5</span> dnsmasq on</pre></div></div>

<p>Do souboru /etc/dnsmasq.conf přidáme následující řádek, který zajistí, že <code><em>cokoliv.</em>dev</code> bude směřováno na localhost (lze zadat více záznamů s různými doménami a IP adresami):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">address</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>127.0.0.1</pre></div></div>

<p>Upravíme /etc/resolv.conf tak, aby se používal lokální DNS server, následující řádek vložíme do tohoto souboru jako první:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">nameserver 127.0.0.1</pre></div></div>

<p>Spustíme dnsmasq:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">service dnsmasq start</pre></div></div>

<p>V tuto chvíli by již mělo fungovat cokoliv.dev pro localhost. Otestovat můžeme např. pomocí příkazu:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">host test.dev</pre></div></div>

<p>Problém je však v tom, že NetworkManager při každém připojení a odpojení obsah /etc/resolv.conf kompletně přepíše. Toto je možné ošetřit vytvoření scriptu, který bude automaticky volán  NetworkManagerem po tom, co dojde k připojení či odpojení od Internetu.</p>
<p>Vytvoříme soubor /etc/NetworkManager/dispatcher.d/add-local-nameserver (název může být libovolný, ale musí jít o spustitelný soubor, do kterého může zapisovat pouze uživatel root), kam vložíme toto:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #007800;">RESOLV</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>resolv.conf
<span style="color: #007800;">RESOLV_TMP</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>resolv.conf
<span style="color: #007800;">LOC_NS</span>=127.0.0.1
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-q</span> <span style="color: #007800;">$LOC_NS</span> <span style="color: #007800;">$RESOLV</span>; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;# Generated by $0&quot;</span>  <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #007800;">$RESOLV_TMP</span>
	<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;nameserver <span style="color: #007800;">$LOC_NS</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$RESOLV_TMP</span>
	<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$RESOLV</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$RESOLV_TMP</span>
	<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$RESOLV_TMP</span> <span style="color: #007800;">$RESOLV</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></div></div>

<p>Tím se pokaždé utomaticky do /etc/resolv.conf vloží lokální nameserver.</p>
<p><a href="http://phpfashion.com/heureka-example-l-na-localhost">Návod pro dosažení stejného výsledku pro Windows</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/virtualhosty/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Vylepšená náhrada textu obrázkem: acIR</title>
		<link>http://blog.webkitchen.cz/acir</link>
		<comments>http://blog.webkitchen.cz/acir#comments</comments>
		<pubDate>Fri, 08 May 2009 21:56:07 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[Česky]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=343</guid>
		<description><![CDATA[Nemám rád sIFR, proto když mi můj oblíbený (dis)grafik nakreslil nový design pro mojí homepage s použitím moc hezkého, ale nestandradního, fontu, rozhodl jsem se najít jiné řešení pro jeho použití při zachování přístupnosti. Přístupností mám na mysli to, aby byl text v kódu skutečně jako text, byl vidět i při vypnutých obrázcích a šel [...]]]></description>
			<content:encoded><![CDATA[<p>Nemám rád <a href="http://www.mikeindustries.com/blog/sifr/">sIFR</a>, proto když mi můj <a href="http://disgrafik.eu/">oblíbený (dis)grafik</a> nakreslil nový design pro mojí homepage s použitím moc hezkého, ale nestandradního, fontu, rozhodl jsem se najít jiné řešení pro jeho použití při zachování přístupnosti. Přístupností mám na mysli to, aby byl text v kódu skutečně jako text, byl vidět i při vypnutých obrázcích a šel označit pomocí myši.</p>
<p><span id="more-343"></span></p>
<p>Řešení vychází z použití <a href="http://wellstyled.com/css-replace-text-by-image.html">Pixyho náhrady textu obrázkem</a>, které řeší požadavek na text v kódu a funkčnost při vypnutých obrázcích. Zbývalo tedy dořešit problém s označením pomocí myši. Toho jsem dosáhl kouskem JavaScriptu, který při pokusu o označení textu, jenž je ve skutečnosti obrázkem na pozadím elementu opravdový text překrývající, tento překrývající element skryje a po zrušení označení ho opět zobrazí. Malá ukázka (<a href="http://blog.webkitchen.cz/wp-content/uploads/2009/05/09/gifcast.gif">screencast</a>):</p>
<div id="acir">Lorem ipsum dolor sit amet,<br />
consectetur adipiscing elit<span id="acir-in"><!-- keep this WP please --></span></div>
<p><script src="http://blog.webkitchen.cz/js/acir.js?3" type="text/javascript"></script></p>
<p>Accesible Image Replacement neboli acIR, jak jsem toto řešení honosně nazval, vypadá takto:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> acIR <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    FF<span style="color: #339933;">:</span> <span style="color: #009966; font-style: italic;">/Firefox/i</span>.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">navigator</span>.<span style="color: #660066;">userAgent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
&nbsp;
    init<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> element<span style="color: #339933;">,</span> elements <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'span'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> elements.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            element <span style="color: #339933;">=</span> elements<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>element.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">tagName</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'A'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    acIR.<span style="color: #660066;">enableSelection</span><span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
    enableSelection<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
        acIR.<span style="color: #660066;">FF</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> element.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span>element<span style="color: #339933;">,</span> element.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">firstChild</span><span style="color: #009900;">&#41;</span>
&nbsp;
        window.<span style="color: #660066;">opera</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>element.<span style="color: #660066;">style</span>.<span style="color: #660066;">cursor</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        element.<span style="color: #660066;">onmousedown</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// clean-up</span>
            document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmousedown</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmousedown</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmouseup</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmouseup</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">// Left button is down, enable selection by hiding the picture</span>
            <span style="color: #003366; font-weight: bold;">var</span> e <span style="color: #339933;">=</span> e <span style="color: #339933;">||</span> window.<span style="color: #660066;">event</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">button</span> <span style="color: #339933;">===</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">||</span> e.<span style="color: #660066;">button</span> <span style="color: #339933;">===</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                acIR.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmouseup</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #006600; font-style: italic;">// ..released immediately without moving, cancel the process</span>
                    acIR.<span style="color: #660066;">end</span><span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmousemove</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmousemove</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #006600; font-style: italic;">// ...cursor moved, init the re-appear process</span>
                    document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmouseup</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
                    document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmousemove</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
&nbsp;
                    <span style="color: #006600; font-style: italic;">// Down-move-up means 'click' to some browsers, work it around</span>
                    document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmousedown</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #006600; font-style: italic;">// The button is down again, we're going to show the pic again soon</span>
                        document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmousemove</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                            document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmouseup</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span>
                        document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmouseup</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #006600; font-style: italic;">// ...clicked, let's show it</span>
                            <span style="color: #003366; font-weight: bold;">var</span> e <span style="color: #339933;">=</span> e <span style="color: #339933;">||</span> window.<span style="color: #660066;">event</span><span style="color: #339933;">;</span>
                            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">button</span> <span style="color: #339933;">===</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">||</span> e.<span style="color: #660066;">button</span> <span style="color: #339933;">===</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                acIR.<span style="color: #660066;">end</span><span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onclick</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
                                document.<span style="color: #660066;">body</span>.<span style="color: #660066;">onmousedown</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
                            <span style="color: #009900;">&#125;</span>
                        <span style="color: #009900;">&#125;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
    start<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>acIR.<span style="color: #660066;">FF</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            element.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'none'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
            element.<span style="color: #660066;">style</span>.<span style="color: #660066;">visibility</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'hidden'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
    end<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>acIR.<span style="color: #660066;">FF</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            element.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'block'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
            element.<span style="color: #660066;">style</span>.<span style="color: #660066;">visibility</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'visible'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Určitě by stálo za to kód přetvořit do podoby používající nějaký framework nebo alespoň DOM3 events, aby ho bylo možné použít i na stránkách již obsahujující JavaScript, se kterým by acIR v tuto chvíli kvůli způsobu zavěšování posluchačů událostí mohl kolidovat.</p>
<p>acIR bez problému funguje v Opeře, Google Chrome, Konqueroru, IE6, IE7. Ve Firefoxu funguje též, ale je tam menší nedostatek v tom, že <span style="text-decoration: line-through;">po skrytí překrývajícího elementu není text pod ním ihned vybrán &#8211; je potřeba pokus o výběr zopakovat</span> výběr začíná od začátku textu nikoliv přesně od místa, kde bylo kliknuto.</p>
<p>V akci lze acIR vidět také na <a href="http://www.webkitchen.cz/">WebKitchen.cz</a>.</p>
<p>Licence pro acIR: <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/cz/"><img style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/cz/88x31.png" alt="Creative Commons License" /></a></p>
<p><strong>Aktualizace:</strong> tento článek je již staršího data, v současné době samozřejmě <code>@font-face</code> rule them all</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/acir/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>html2texy! &#8211; konvertor (X)HTML do Texy!</title>
		<link>http://blog.webkitchen.cz/html2texy</link>
		<comments>http://blog.webkitchen.cz/html2texy#comments</comments>
		<pubDate>Tue, 10 Mar 2009 19:51:56 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[Česky]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[texy]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=264</guid>
		<description><![CDATA[Html2texy! je konvertor (X)HTML do Texy!. Pokud nevíte, co že to Texy! je, tak vězte, že se jedná o velice elegantní způsob tvorby textů, které chceme mít ve finále na webu jako HTML, ale nechceme je přímo v HTML psát. Texy ale bohužel nenabízí možnost zpětné konverze na HTML, proto jsem se před časem rozhodl [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-291" src="http://texy.info/images/buttons/88x31-blue.gif" alt="Texy!" width="88" height="31" /><a href="http://www.webkitchen.cz/lab/html2texy/">Html2texy!</a> je konvertor (X)HTML do <a href="http://texy.info/">Texy!</a>. Pokud nevíte, co že to Texy! je, tak vězte, že se jedná o velice elegantní způsob tvorby textů, které chceme mít ve finále na webu jako HTML, ale nechceme je přímo v HTML psát. Texy ale bohužel nenabízí možnost zpětné konverze na HTML, proto jsem se před časem rozhodl napsat tento nástroj.</p>
<p><span id="more-264"></span></p>
<p>Konverze je provedena pomocí jediné <a href="http://www.webkitchen.cz/lab/html2texy/html2texy.xsl.html">XSLT šablony</a>. K dispozici je jednoduchá PHP knihovna, která poskytuje API, jehož použití vypadá takto:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Importujeme konvertor
</span><span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'Html2texy.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Vytvorime instanci
</span><span style="color: #000088;">$h2t</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Html2texy<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Provedeme konverzi
</span><span style="color: #000088;">$texy</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$h2t</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">convert</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$html</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Nutno podotknout, že konverze není 100%. Např. tabulky používající colspan jsou převedeny bez ohledu na tento atribut.</p>
<p>Html2texy! si můžete <a href="http://www.webkitchen.cz/lab/html2texy/">stáhnout</a> pod licencí GNU/GPL (domluva na jiné licenci je možná).  Pro jednorázový převod lze použít <a href="http://www.webkitchen.cz/lab/html2texy/demo">online demo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/html2texy/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Slovník cizích slov</title>
		<link>http://blog.webkitchen.cz/slovnik-cizich-slov</link>
		<comments>http://blog.webkitchen.cz/slovnik-cizich-slov#comments</comments>
		<pubDate>Fri, 20 Feb 2009 14:29:37 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[Česky]]></category>
		<category><![CDATA[slovník]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=257</guid>
		<description><![CDATA[ Další z novinek na Online-Slovník.cz je slovník cizích slov. Co ve slovníku cizích můžete nalézt? Jedná se o klasický slovník cizích slov, takže obsahuje především slova převzatá z jiných jazyků (zejména z angličtiny), výrazy používané odborníky z různých oborů, slangové výrazy, argot apod. Tato slova se běžně vyskytují kolem nás a není v lidských [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-291" title="slovnik-cizich-slov2" src="http://blog.webkitchen.cz/wp-content/uploads/2009/03/slovnik-cizich-slov2.png" alt="slovník cizích slov" width="150" height="101" /> Další z novinek na Online-Slovník.cz je <a href="http://www.online-slovnik.cz/slovnik-cizich-slov">slovník cizích slov</a>. Co ve slovníku cizích můžete nalézt? Jedná se o klasický slovník cizích slov, takže obsahuje především slova převzatá z jiných jazyků (zejména z angličtiny), výrazy používané odborníky z různých oborů, slangové výrazy, argot apod. Tato slova se běžně vyskytují kolem nás a není v lidských silách je všechny znát natož si pamatovat jejich významy, a právě proto existují slovníky cizích slov.</p>
<p>Slovník cizích slov je možné procházet podle abecedy nebo lze použít vyhledávání, které umožňuje fulltextově prohledávat i definice cizích slov (tato volba je k nalezení pod odkazem „další volby“).</p>
<p>Na závěr <a href="http://www.online-slovnik.cz/slovnik-cizich-slov/dekolt">ukázka definice ve slovníku cizích slov</a> (bohužel bez obrázkového doprovodu definovaného <img src='http://blog.webkitchen.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/slovnik-cizich-slov/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Překladač vět</title>
		<link>http://blog.webkitchen.cz/prekladac</link>
		<comments>http://blog.webkitchen.cz/prekladac#comments</comments>
		<pubDate>Tue, 17 Feb 2009 02:28:47 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[Česky]]></category>
		<category><![CDATA[překladač]]></category>
		<category><![CDATA[slovník]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=213</guid>
		<description><![CDATA[Po delší době došlo opět k atualizaci webového slovníku Online-Slovník.cz, tentokrát byl přidán plnohodnotný online překladač celých vět a delších textů.
Překladač umí překládat z a do cca 40 jazyků, přičemž podporuje i automatickou detekci zdrojového jazyka. To znamená, že ani není potřeba vědět, jaký je jazyk textu, který chci přeložit. Jediné, co je překladači potřeba [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.online-slovnik.cz/prekladac"><img class="alignright size-thumbnail wp-image-220" title="překladač" src="http://blog.webkitchen.cz/wp-content/uploads/2009/02/screenshot-2-150x150.png" alt="překladač" width="150" height="150" /></a>Po delší době došlo opět k atualizaci webového slovníku Online-Slovník.cz, tentokrát byl přidán plnohodnotný online <a href="http://www.online-slovnik.cz/prekladac">překladač</a> celých vět a delších textů.</p>
<p>Překladač umí překládat z a do cca 40 jazyků, přičemž podporuje i automatickou detekci zdrojového jazyka. To znamená, že ani není potřeba vědět, jaký je jazyk textu, který chci přeložit. Jediné, co je překladači potřeba říct, je jazyk, do kterého chceme text pomocí překladače přeložit.</p>
<p>Důležitou vlastností překladače je také možnost přehrání výslovnosti celého textu (je-li výsledný překlad v angličtině).</p>
<p>Translator je šikovně integrován do slovníku, takže není-li hledané slovo či fráze nalezena přímo ve slovníku, je automaticky nabídnut překlad z překladače.</p>
<p>Překladač plně využívá Ajax, takže práce s ním je velice rychlá a při každém překladu se načítá pouze přeložený text, nikoliv celá stránka.</p>
<p>A na závěr malá <a href="http://www.online-slovnik.cz/prekladac?from=cs&amp;to=en&amp;text=Online-Slovnik.cz%20tak%C3%A9%20obsahuje%20online%20p%C5%99eklada%C4%8D%20pro%20cel%C3%A9%20v%C4%9Bty">ukázka překladu</a> pomocí překladače z češtiny do angličtiny.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/prekladac/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Implementation of CSS3 selectors in JavaScript</title>
		<link>http://blog.webkitchen.cz/css3-selectors-in-javascript</link>
		<comments>http://blog.webkitchen.cz/css3-selectors-in-javascript#comments</comments>
		<pubDate>Sat, 10 Jan 2009 13:39:46 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=266</guid>
		<description><![CDATA[ A couple of years ago, there was a need for an implementation of CSS3 selectors in JavaScript (as a part of a debugging tool I was working on). The implementation is ready and tested, but is not needed anymore so I&#8217;ve decided to publish it for free download.

The implementation is almost 100% complete. It [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-190" title="w3c_main" src="http://blog.webkitchen.cz/wp-content/uploads/2009/01/w3c_main.png" alt="" width="315" height="48" /> A couple of years ago, there was a need for an implementation of <a href="http://www.w3.org/TR/css3-selectors/">CSS3 selectors</a> in JavaScript (as a part of a debugging tool I was working on). The implementation is ready and tested, but is not needed anymore so I&#8217;ve decided to publish it for free download.</p>
<p><span id="more-266"></span></p>
<p>The implementation is almost 100% complete. It can even handle such things as unicode notations. For example, the following selector is processed exactly as per the spec:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">:</span>not<span style="color: #00AA00;">&#40;</span><span style="color: #00AA00;">:</span>root<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">:</span>not<span style="color: #00AA00;">&#40;</span>form<span style="color: #00AA00;">&#41;</span><span style="color: #3333ff;">:first-child</span><span style="color: #00AA00;">:</span>not<span style="color: #00AA00;">&#40;</span><span style="color: #00AA00;">:</span>lang<span style="color: #00AA00;">&#40;</span>en<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span> &amp;gt<span style="color: #00AA00;">;</span> div<span style="color: #3333ff;">:first-</span>child ~ div</pre></div></div>

<p>The library uses standard DOM methods only, which means that there isn&#8217;t any pre-conversion of CSS selectors to an XPath expressions as other such libraries usualy do.  The script hasn&#8217;t been much optimized in terms of speed and doesn&#8217;t work in IE. The main and only goal was to create an implementation that would follow the specification as much as possible and work in the Gecko family browsers.</p>
<p><strong><a href="https://github.com/jkbr/Selectors/">https://github.com/jkbr/Selectors/</a></strong></p>
<p>You can try the library directly from your browser (unless you are using IE) on a <a href="http://www.webkitchen.cz/lab/js/Selectors/test.html">demo page</a>.</p>
<p>An application to the official W3C&#8217;s CSS3 selectors test suit is also <a href="http://www.webkitchen.cz/lab/js/Selectors/W3C-tests">available</a>. Note that when performing those tests all <strong><em>!important</em> statements are being ignored.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/css3-selectors-in-javascript/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementace CSS3 selectorů v JavaScriptu</title>
		<link>http://blog.webkitchen.cz/selectors</link>
		<comments>http://blog.webkitchen.cz/selectors#comments</comments>
		<pubDate>Fri, 09 Jan 2009 20:36:25 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[Česky]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=187</guid>
		<description><![CDATA[ Pro účely jedné, velice speciální a nakonec nikdy nedokončené, zakázky, bylo potřeba vytvořit implementaci CSS3 selectorů v JavaScriptu. Implementace je hotová, funkční a otestovaná, ale již není potřeba, tak se o ní podělím alespoň tady na blogu.

Jedná se o (v rámci možností) kompletní implementaci, která si poradí i s takovými záludnostmi, jako je zápis [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-190" title="w3c_main" src="http://blog.webkitchen.cz/wp-content/uploads/2009/01/w3c_main.png" alt="" width="315" height="48" /> Pro účely jedné, velice speciální a nakonec nikdy nedokončené, zakázky, bylo potřeba vytvořit implementaci <a href="http://www.w3.org/TR/css3-selectors/">CSS3 selectorů</a> v JavaScriptu. Implementace je hotová, funkční a otestovaná, ale již není potřeba, tak se o ní podělím alespoň tady na blogu.</p>
<p><span id="more-187"></span></p>
<p>Jedná se o (v rámci možností) kompletní implementaci, která si poradí i s takovými záludnostmi, jako je zápis pomocí unicode. Např. takovýto selector není problém:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">:</span>not<span style="color: #00AA00;">&#40;</span><span style="color: #00AA00;">:</span>root<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">:</span>not<span style="color: #00AA00;">&#40;</span>form<span style="color: #00AA00;">&#41;</span><span style="color: #3333ff;">:first-child</span><span style="color: #00AA00;">:</span>not<span style="color: #00AA00;">&#40;</span><span style="color: #00AA00;">:</span>lang<span style="color: #00AA00;">&#40;</span>en<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span> &amp;gt<span style="color: #00AA00;">;</span> div<span style="color: #3333ff;">:first-</span>child ~ div</pre></div></div>

<p>Při hledání elementů se využívají pouze standardní DOM metody (tudíž žádná konverze na XPath, jak je bežné pro podobné knihovny psané pro prostředí Internetu). Script nebyl příliš optimalizováno z hlediska rychlosti a ani IE nebyl brán v potaz, neb to nebylo v zadání. Důraz byl kladen především na věrnou implenetaci všech selectorů dle specifikace od W3C.</p>
<p><strong><a href="https://github.com/jkbr/Selectors">https://github.com/jkbr/Selectors</a></strong></p>
<p>Vyzkoušet možnosti knihovny je možné přímo z prohlížeče na speciální <a href="http://www.webkitchen.cz/lab/js/Selectors/test.html">testovací stránce</a>.</p>
<p>K dispozici je také <a href="http://www.webkitchen.cz/lab/js/Selectors/W3C-tests.php">aplikace na oficiální sadu testů</a> z dílny W3C. Při zkoušení těchto testů je potřeba mít na paměti, že při aplikování vlastností není brána v potaz priorita, takže i v případě, že např. barva nesedí, nemusí to nutně znamenat, že jde o chybu scriptu (a vice versa).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/selectors/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>„Zobrazit zdrojový kód výběru“ pro Operu</title>
		<link>http://blog.webkitchen.cz/zdrojovy-kod-vyberu</link>
		<comments>http://blog.webkitchen.cz/zdrojovy-kod-vyberu#comments</comments>
		<pubDate>Fri, 05 Dec 2008 15:02:11 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[Česky]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[userjs]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=147</guid>
		<description><![CDATA[ &#8220;Zobrazit zdrojový kód výběru&#8221; (View Selection Source) — jednoduchý bookmarklet (favelet) nebo uživatelský JavaScript, který umožní zobrazení zdrojového kódu libovolné části HTML nebo XML stránky. Velmi užitečné zejména při tvorbě webu.

Zkuste si to!
Stačí označit nějaký text na této stránce, vybrat barevné schéma (nebo ponechat výchozí &#8220;Mozilla&#8221;) a kliknout na tlačitko níže:

 Mozilla  
 [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-90" title="Opera logo" src="http://blog.webkitchen.cz/wp-content/uploads/2008/11/ologo_wback.gif" alt="" width="138" height="52" /> &#8220;Zobrazit zdrojový kód výběru&#8221; (View Selection Source) — jednoduchý bookmarklet (favelet) nebo uživatelský JavaScript, který umožní zobrazení zdrojového kódu libovolné části HTML nebo XML stránky. Velmi užitečné zejména při tvorbě webu.</p>
<p><span id="more-147"></span></p>
<h3>Zkuste si to!</h3>
<p><strong>Stačí označit nějaký text na této stránce, vybrat barevné schéma (nebo ponechat výchozí &#8220;Mozilla&#8221;) a kliknout na tlačitko níže:</strong></p>
<p><label for="moz"></p>
<input id="moz" checked="checked" name="scheme" type="radio" value="mozilla" /> Mozilla </label> <label for="desert"></p>
<input id="desert" name="scheme" type="radio" value="desert" /> Desert</label> <label for="opera"></p>
<input id="opera" name="scheme" type="radio" value="opera" /> Opera</label></p>
<p><button id="view-selection-source-demo">View Selection Source!</button></p>
<h3>Tři způsoby instalace</h3>
<h4>1. User JavaScript (Uživatelský JavaScript)</h4>
<p>Nejkomplikovanější instalace, ale nejkomfortnější používání s možností přizpůsobení.</p>
<h5>Krok 1: Povolení uživatelských scriptů v Opeře</h5>
<p>Pro povolení použijte Nástroje &gt; Nastavení &gt; Pokročilé &gt; Obsah &gt; JavaScript options. Zde vyberte adresář, kde chcete mít uloženy scripty. Opera pak bude nahrávat všechny soubory s příponou .js jako uživatelské JavaScripty.</p>
<h5>Krok 2. Instalace &#8220;View Selection Source&#8221;</h5>
<p>Stáhněte si  <a href="http://www.webkitchen.cz/lab/opera/view-selection-source/js/view-selection-source.js">&#8220;View Selection Source&#8221;</a>User JS soubor. Uložte ho do adresáře, který jste zvolili v předchozím kroku. (Jeho umístění se můžete dozvědět též na interní stránce prohlížeče <a href="opera:about">opera:about</a>.</p>
<h5>Krok 3: Přidání položky &#8220;Zobrazit zdrojový kód výběru&#8221; do kontextového menu Opery</h5>
<p>Je potřeba lokalizovat soubor s nastavení menu. Běžte do Nástroje &gt; Nastavení &gt; Pokročilé &gt; Nástrojové lišty. Pokud zde v boxu Nastavení menu vidíte pouze položku Opera Standard, tak jí označte a klikněte na tlačítko <button>Duplikovat</button>.<br />
<img src="http://www.webkitchen.cz/lab/opera/view-selection-source/menu-configuration.png" alt="Menu configuration" width="455" height="114" /><br />
Jděte na stránku <a href="opera:about">opera:about</a> a nalezněte <em>Opera directory</em>. Jděte do podadresáře <em>menu</em> a otevřete soubor s příponou .ini ve své oblíbeném textovém editoru (např. Poznámkový blok, Vim, Textmate, jEdit, apod.). <strong>Před úpravami Operu vypněte.</strong><br />
V souboru vyhledejte sekci <em>Hotclick Popup Menu</em>. Na konec této sekce přidejte:</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">Item, <span style="color: #933;">&quot;View selection source&quot;</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #933;">&quot;Go to page, &quot;</span>javascript:opera.getSelectionSource<span style="">&#40;</span><span style="">&#41;</span><span style="color: #933;">&quot;&quot;</span></pre></div></div>

<p><strong>Po úpravě by tato sekce měla vypadat nějak takto:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Hotclick Popup Menu<span style="">&#93;</span></span>
Item, <span style="">50872</span>         <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Copy</span>
Item, <span style="">67652</span>         <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Copy to note</span>
Platform Win2000-Unix-Mac, Feature Voice, Item, <span style="">70494</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Speak selection</span>
--------------------<span style="">1</span>
Item, <span style="">65184</span>             <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Hotclick search, 200</span>
<span style="color: #666666; font-style: italic;">;Submenu, 291920, Search with menu</span>
Submenu, <span style="">291920</span>, Internal Search With
Item, <span style="">65187</span>         <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Hotclick search, 50</span>
Item, <span style="">65188</span>         <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Hotclick search, 51</span>
--------------------<span style="">2</span>
Submenu, <span style="">291960</span>, Translate menu
<span style="color: #666666; font-style: italic;">;Item, 65186        = Hotclick search, 52</span>
--------------------<span style="">3</span>
Item, <span style="">67394</span>             <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Go to page, </span><span style="color: #933;">&quot;%t&quot;</span>
Item, <span style="">65218</span>         <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Send text in mail</span>
--------------------<span style="">4</span>
Item, <span style="color: #933;">&quot;View selection source&quot;</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #933;">&quot;Go to page, &quot;</span>javascript:opera.getSelectionSource<span style="">&#40;</span><span style="">&#41;</span><span style="color: #933;">&quot;&quot;</span></pre></div></div>

<p>A výsledek:</p>
<p><img src="http://www.webkitchen.cz/lab/opera/view-selection-source/usage1.png" alt="View Selection Source in menu" width="372" height="229" /></p>
<h4>2. Favelet v konfiguračním souboru pro menu</h4>
<p>Toto je velmi podobné předchozí variatně, ale není potřeba soubor s uživatelským JavaScriptem, celý kód se přidá do definice menu. Prosím následujte kroky 1 a 3 z předchozí varianty instalace. Ve třetím kroku vložte do menu místo kódu z předchozí varianty kód z <a href="http://www.webkitchen.cz/lab/opera/view-selection-source/js/view-selection-source-menu-item.js.txt">tohoto souboru</a>.</p>
<h4>3. Klasický bookmarklet</h4>
<p>Nejjednodušší způsob instalace. Vytvořte novou položku v &#8220;Oblíbených&#8221; a do políčka pro adresu vložte kód z <a href="http://www.webkitchen.cz/lab/opera/view-selection-source/js/view-selection-source-bookmarklet.js.txt">tohoto souboru</a>.<br />
<img src="http://www.webkitchen.cz/lab/opera/view-selection-source/favelet.png" alt="Create favelet" /></p>
<h3 id="cust">Přizpůsobení</h3>
<p>Pokud jste zvolili instalaci jako uživatelský JavaScript, tak si můžete zvolit jedno ze tří připravený barevných schémat zvýrazňování syntaxe, případně si napsat schéma vlastní. Např. definice výchozího schéma &#8220;Mozilla&#8221; vypadá takto:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">schemes.<span style="color: #660066;">mozilla</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
    background<span style="color: #339933;">:</span>     <span style="color: #3366CC;">'White'</span><span style="color: #339933;">,</span>
    fontFamily<span style="color: #339933;">:</span>     <span style="color: #3366CC;">'monospace'</span><span style="color: #339933;">,</span>
    fontSize<span style="color: #339933;">:</span>           <span style="color: #3366CC;">'12px'</span><span style="color: #339933;">,</span>
    stringColor<span style="color: #339933;">:</span>        <span style="color: #3366CC;">'Black'</span><span style="color: #339933;">,</span>
    bracketColor<span style="color: #339933;">:</span>       <span style="color: #3366CC;">'Black'</span><span style="color: #339933;">,</span>
    tagNameColor<span style="color: #339933;">:</span>       <span style="color: #3366CC;">'Purple'</span><span style="color: #339933;">,</span>
    tagNameBold<span style="color: #339933;">:</span>        <span style="color: #3366CC;">'bold'</span><span style="color: #339933;">,</span>
    attrNameColor<span style="color: #339933;">:</span>      <span style="color: #3366CC;">'Black'</span><span style="color: #339933;">,</span>
    attrNameBold<span style="color: #339933;">:</span>       <span style="color: #3366CC;">'bold'</span><span style="color: #339933;">,</span>
    attrValueColor<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Blue'</span><span style="color: #339933;">,</span>
    attrValueBold<span style="color: #339933;">:</span>      <span style="color: #3366CC;">'normal'</span><span style="color: #339933;">,</span>
    quoteColor<span style="color: #339933;">:</span>     <span style="color: #3366CC;">'Blue'</span><span style="color: #339933;">,</span>
    quoteBold<span style="color: #339933;">:</span>      <span style="color: #3366CC;">'bold'</span><span style="color: #339933;">,</span>
    commentColor<span style="color: #339933;">:</span>       <span style="color: #3366CC;">'Green'</span><span style="color: #339933;">,</span>
    commentBold<span style="color: #339933;">:</span>        <span style="color: #3366CC;">'normal'</span><span style="color: #339933;">,</span>
    cdataMarkColor<span style="color: #339933;">:</span> <span style="color: #3366CC;">'#ff6600'</span><span style="color: #339933;">,</span>
    cdataMarkBold<span style="color: #339933;">:</span> <span style="color: #3366CC;">'bold'</span><span style="color: #339933;">,</span>
    cdataContentColor<span style="color: #339933;">:</span> <span style="color: #3366CC;">'#ff6600'</span><span style="color: #339933;">,</span>
    cdataContentBold<span style="color: #339933;">:</span> <span style="color: #3366CC;">'normal'</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Další nastavení lze provést prostřednictví proměnné conf, ve zdrojovém kódu scriptu, výchozí hodnoty jsou tyto:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> conf <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// window settings</span>
    wWidth<span style="color: #339933;">:</span>            <span style="color: #CC0000;">700</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// window width</span>
    wHeight<span style="color: #339933;">:</span>           <span style="color: #CC0000;">300</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// window height</span>
    wTop<span style="color: #339933;">:</span>              <span style="color: #CC0000;">100</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// window position Y</span>
    wLeft<span style="color: #339933;">:</span>              <span style="color: #CC0000;">50</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// window position X</span>
    closeOnKeystroke<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    closeKeyCode<span style="color: #339933;">:</span>       <span style="color: #CC0000;">27</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// ESC</span>
    toggleWrapKeyCode<span style="color: #339933;">:</span> <span style="color: #CC0000;">13</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// ENTER</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// syntax highligthing settings</span>
    scheme<span style="color: #339933;">:</span> schemes.<span style="color: #660066;">desert</span> <span style="color: #006600; font-style: italic;">// set to the your prefered color scheme</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>Licence</h3>
<p>Tento program je volný software; můžete jej šířit a modifikovat podle ustanovení Obecné veřejné licence GNU, vydávané Free Software Foundation; a to buď verze 2 této licence anebo (podle vašeho uvážení) kterékoli pozdější verze.</p>
<p><script src="/js/view-selection-source-demo.js" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/zdrojovy-kod-vyberu/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>View Selection Source for Opera</title>
		<link>http://blog.webkitchen.cz/view-selection-source</link>
		<comments>http://blog.webkitchen.cz/view-selection-source#comments</comments>
		<pubDate>Thu, 13 Nov 2008 20:38:51 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[userjs]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=87</guid>
		<description><![CDATA[View Selection Source — a simple JavaScript bookmarklet (favelet) or a User JavaScript which allows you to see HTML source of any part of a page, it's very useful for web developers. You probably know it from Firefox.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-90" title="Opera logo" src="http://blog.webkitchen.cz/wp-content/uploads/2008/11/ologo_wback.gif" alt="" width="138" height="52" /> The &#8216;View Selection Source&#8217; is a simple JavaScript bookmarklet (favelet) or a User JavaScript which allows you to see the HTML source of any part of a page, which is very useful for web developers. It brings to Opera the same functionality as Firefox has by default.</p>
<p><span id="more-87"></span></p>
<h3>Try it right now!</h3>
<p>To see how it works,  select any text on this page, choose a color scheme for syntax highlighting (or keep the default one) and hit the button below:<br />
<label for="moz"></p>
<input id="moz" checked="checked" name="scheme" type="radio" value="mozilla" />Mozilla</label><label for="desert"><br />
<input id="desert" name="scheme" type="radio" value="desert" />Desert</label><label for="opera"><br />
<input id="opera" name="scheme" type="radio" value="opera" />Opera</label></p>
<p><button id="view-selection-source-demo">View Selection Source!</button></p>
<h3>Three installation methods</h3>
<p>There are three ways to install the script. They differ in how complicated the installation is, how the script is integrated into Opera&#8217;s user interface and in the possibility of further <a href="#customization">customization</a>.</p>
<ol>
<li><a href="#userjs">User JavaScript</a></li>
<li><a href="#inmenu">Bookmarklet in a menu</a></li>
<li><a href="#bookmarklet">Plain bookmarklet</a></li>
</ol>
<h4 id="userjs">1. User JavaScript</h4>
<p>This method is a little bit complicated but offers more comfortable usage. 		You will be able to call the script from the document context menu and also have the possibility of customizing it.</p>
<dl>
<dt>Step 1: Enable User JavaScript in Opera</dt>
<dd>To enable user JavaScript, use <span class="menu">Tools &gt; Preferences &gt; Advanced &gt;  Content &gt; JavaScript options</span>, and select the directory where you want to store your User JavaScript files. Opera will load all the files in the specified directory whose names end with &#8220;.js&#8221; and use them as User JavaScript files.<img src="http://www.webkitchen.cz/lab/opera/view-selection-source/user-javascript-configuration.png" alt="JavaScript configuration" width="409" height="75" /></dd>
<dt>Step 2: Install the &#8220;View Selection Source&#8221; User JS</dt>
<dd>Download the <a href="http://www.webkitchen.cz/lab/opera/view-selection-source/js/view-selection-source.js">&#8220;View Selection Source&#8221; User JS 				file</a> and save it into the in previous step created directory (you can also find the location in the <a href="opera:about">opera:about</a> page &#8211; llook for <em>User 				JavaScript files</em>).</p>
</dd>
<dt>Step 3: Add the &#8220;View Selection Source&#8221; item to the Opera&#8217;s context menu</dt>
<dd>We need to locate the ini file with your menu definition. Go to the toolbar preferences: <span class="menu">Tools &gt; Preferences &gt; Advanced &gt; Toolbars</span>. 				If there is only an<em> &#8220;Opera Standard&#8221; </em>item in the <span class="menu">&#8216;Menu Setup&#8217;</span> box, select it and click the <button>Duplicate</button> button. If you can see more than one item there, do 				nothing.<img src="http://www.webkitchen.cz/lab/opera/view-selection-source/menu-configuration.png" alt="Menu configuration" width="455" height="114" /></p>
<p>Now, go to the <a href="opera:about">opera:about</a> page and 				look for <em>&#8216;Opera directory</em>&#8216;. Go to that directory and open a subdirectory called <em>menu</em> and find a file ending with &#8220;.ini&#8221; 				and open it in your favorite text editor (such as Notepad, Vim, 				Textmate, jEdit, etc). <strong>Before editing stop Opera please.</strong></p>
<p>In the INI file, find a section called <em>Hotclick Popup Menu</em> and append the following code  at the end of that section:</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">Item, <span style="color: #933;">&quot;View selection source&quot;</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #933;">&quot;Go to page, &quot;</span>javascript:opera.getSelectionSource<span style="">&#40;</span><span style="">&#41;</span><span style="color: #933;">&quot;&quot;</span></pre></div></div>

<p><strong>Finally the section should look similarly to this:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Hotclick Popup Menu<span style="">&#93;</span></span>
Item, <span style="">50872</span>         <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Copy</span>
Item, <span style="">67652</span>         <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Copy to note</span>
Platform Win2000-Unix-Mac, Feature Voice, Item, <span style="">70494</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Speak selection</span>
--------------------<span style="">1</span>
Item, <span style="">65184</span>             <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Hotclick search, 200</span>
<span style="color: #666666; font-style: italic;">;Submenu, 291920, Search with menu</span>
Submenu, <span style="">291920</span>, Internal Search With
Item, <span style="">65187</span>         <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Hotclick search, 50</span>
Item, <span style="">65188</span>         <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Hotclick search, 51</span>
--------------------<span style="">2</span>
Submenu, <span style="">291960</span>, Translate menu
<span style="color: #666666; font-style: italic;">;Item, 65186        = Hotclick search, 52</span>
--------------------<span style="">3</span>
Item, <span style="">67394</span>             <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Go to page, </span><span style="color: #933;">&quot;%t&quot;</span>
Item, <span style="">65218</span>         <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> Send text in mail</span>
--------------------<span style="">4</span>
Item, <span style="color: #933;">&quot;View selection source&quot;</span><span style="color: #000066; font-weight:bold;">=</span><span style="color: #933;">&quot;Go to page, &quot;</span>javascript:opera.getSelectionSource<span style="">&#40;</span><span style="">&#41;</span><span style="color: #933;">&quot;&quot;</span></pre></div></div>

<p>Finally, the result  should look like the following picture shows:</p>
<p><img src="http://www.webkitchen.cz/lab/opera/view-selection-source/usage1.png" alt="View Selection Source in menu" width="372" height="229" /></p>
</dd>
</dl>
<h4 id="inmenu">2. Favelet in the menu definition file</h4>
<p>This is very similar to the previous variant, but any modification of the script becomes difficult since the code is compressed. The script will also be integrated into the context menu, but you don&#8217;t need to enable user JavaScripts. Please follow the steps 1 and  3 from the previous installation method, but In the third step don&#8217;t insert the code noted there, use the code from <a href="http://www.webkitchen.cz/lab/opera/view-selection-source/js/view-selection-source-menu-item.js.txt">this file</a> instead.</p>
<h4 id="bookmarklet">3. Classical bookmarklet</h4>
<p>This is the simplest way to install the script. You&#8217;ll just create a new bookmark and insert the whole JS code into the &#8216;Address 		field&#8217;. When you want to call the script, just click the created bookmark item in the &#8216;Bookmarks&#8217; panel. The 		code for this use is <a href="http://www.webkitchen.cz/lab/opera/view-selection-source/js/view-selection-source-bookmarklet.js.txt">here</a>.</p>
<p><img src="http://www.webkitchen.cz/lab/opera/view-selection-source/favelet.png" alt="Create favelet" /></p>
<h3 id="customization">Customization</h3>
<p>If you&#8217;ve installed the script as a User JavaScript, you can choose one from three 		predefined color schemes now or easily define you own new one. 		For example, the definition of the &#8220;Mozilla&#8221; color scheme looks as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">schemes.<span style="color: #660066;">mozilla</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
    background<span style="color: #339933;">:</span>     <span style="color: #3366CC;">'White'</span><span style="color: #339933;">,</span>
    fontFamily<span style="color: #339933;">:</span>     <span style="color: #3366CC;">'monospace'</span><span style="color: #339933;">,</span>
    fontSize<span style="color: #339933;">:</span>           <span style="color: #3366CC;">'12px'</span><span style="color: #339933;">,</span>
    stringColor<span style="color: #339933;">:</span>        <span style="color: #3366CC;">'Black'</span><span style="color: #339933;">,</span>
    bracketColor<span style="color: #339933;">:</span>       <span style="color: #3366CC;">'Black'</span><span style="color: #339933;">,</span>
    tagNameColor<span style="color: #339933;">:</span>       <span style="color: #3366CC;">'Purple'</span><span style="color: #339933;">,</span>
    tagNameBold<span style="color: #339933;">:</span>        <span style="color: #3366CC;">'bold'</span><span style="color: #339933;">,</span>
    attrNameColor<span style="color: #339933;">:</span>      <span style="color: #3366CC;">'Black'</span><span style="color: #339933;">,</span>
    attrNameBold<span style="color: #339933;">:</span>       <span style="color: #3366CC;">'bold'</span><span style="color: #339933;">,</span>
    attrValueColor<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Blue'</span><span style="color: #339933;">,</span>
    attrValueBold<span style="color: #339933;">:</span>      <span style="color: #3366CC;">'normal'</span><span style="color: #339933;">,</span>
    quoteColor<span style="color: #339933;">:</span>     <span style="color: #3366CC;">'Blue'</span><span style="color: #339933;">,</span>
    quoteBold<span style="color: #339933;">:</span>      <span style="color: #3366CC;">'bold'</span><span style="color: #339933;">,</span>
    commentColor<span style="color: #339933;">:</span>       <span style="color: #3366CC;">'Green'</span><span style="color: #339933;">,</span>
    commentBold<span style="color: #339933;">:</span>        <span style="color: #3366CC;">'normal'</span><span style="color: #339933;">,</span>
    cdataMarkColor<span style="color: #339933;">:</span> <span style="color: #3366CC;">'#ff6600'</span><span style="color: #339933;">,</span>
    cdataMarkBold<span style="color: #339933;">:</span> <span style="color: #3366CC;">'bold'</span><span style="color: #339933;">,</span>
    cdataContentColor<span style="color: #339933;">:</span> <span style="color: #3366CC;">'#ff6600'</span><span style="color: #339933;">,</span>
    cdataContentBold<span style="color: #339933;">:</span> <span style="color: #3366CC;">'normal'</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Another customization is possible by the <code>conf</code> variable, the default values are:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> conf <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// window settings</span>
    wWidth<span style="color: #339933;">:</span>            <span style="color: #CC0000;">700</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// window width</span>
    wHeight<span style="color: #339933;">:</span>           <span style="color: #CC0000;">300</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// window height</span>
    wTop<span style="color: #339933;">:</span>              <span style="color: #CC0000;">100</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// window position Y</span>
    wLeft<span style="color: #339933;">:</span>              <span style="color: #CC0000;">50</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// window position X</span>
    closeOnKeystroke<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    closeKeyCode<span style="color: #339933;">:</span>       <span style="color: #CC0000;">27</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// ESC</span>
    toggleWrapKeyCode<span style="color: #339933;">:</span> <span style="color: #CC0000;">13</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// ENTER</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// syntax highligthing settings</span>
    scheme<span style="color: #339933;">:</span> schemes.<span style="color: #660066;">desert</span> <span style="color: #006600; font-style: italic;">// set to the your prefered color scheme</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>Licence</h3>
<p>This script is free software, and you are welcome to redistribute and modify 		it under the terms of the GNU General Public License (either version 2 		or any later version).</p>
<p>If you have any questions, feel free to ask in the comments.</p>
<h3>Update</h3>
<p>Now available also as a <a title="View Selection Source - Google Chrome Extension" href="http://blog.webkitchen.cz/view-selection-source-chrome-extension">Google Chrome extension</a>.</p>
<p><script src="/js/view-selection-source-demo.js" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/view-selection-source/feed</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Online slovník</title>
		<link>http://blog.webkitchen.cz/slovnik</link>
		<comments>http://blog.webkitchen.cz/slovnik#comments</comments>
		<pubDate>Wed, 05 Nov 2008 10:45:35 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[Česky]]></category>
		<category><![CDATA[slovník]]></category>

		<guid isPermaLink="false">http://blog2.webkitchen.cz/?p=1</guid>
		<description><![CDATA[Potřebujete občas něco přeložit z češtiny do angličtiny nebo naopak? Pak by se Vám mohl hodit tento aglicko-český online slovník.]]></description>
			<content:encoded><![CDATA[<h3>Co <a href="http://www.online-slovnik.cz/">Online-slovník.cz</a> umí a čím se liší od podobných slovníků?</h3>
<p><img class="alignright size-medium wp-image-9" title="logo online-slovnik.cz" src="http://blog.webkitchen.cz/wp-content/uploads/2008/11/logo.png" alt="" /></p>
<p>Především je to <strong>anglická výslovnost ke všem frázím.</strong> Tato funkce je velice užitečná, protože kromě samotného překladu získáte i představu o skutečné výslovnosti. Kombinace znalosti obojího zvyšuje pravděpodobnost, že si slovo zapamatujete. Znalost výslovnosti se také hodí při mluveném projevu <img src='http://blog.webkitchen.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><span id="more-1"></span></p>
<p>Další vychytávkou je snadný <strong>překlad celých vět</strong> a úryvků textu. Jak to funguje? Do hledacího políčka stačí zadat celý text, jehož překlad Vás zajímá, a pokud není nalezen překlad celé fráze, tak se jednotlivá slova změní v odkazy, na které když kliknete, tak se dozvíte překlad toho slova. Celé je to vytvořeno pomocí Ajaxu, takže načítání je opravdu rychlé. <a href="http://www.online-slovnik.cz/?word=The+bosses+of+major+UK+banks+will+be+meeting+Bank+of+England&amp;translate-type=en-cz">Posuďte sami.</a> Jako bonus je Vám ihned nabídnuta možnost si nechat celou větu vyslovit (pokud se jedná o překlad z angličtiny do češtiny).</p>
<p>Také se Vám stává, že u mnohých slov Vám ani po překladu do češtiny není jasné, co to slovo znamená? Proto je do slovníku integrován také <strong>slovník cizích slov</strong>. Při každém překladu se dané slovo vyhledá také ve slovníku cizích slov, a je-li nalezeno, <a href="http://www.online-slovnik.cz/?word=dekolt&amp;translate-type=cz-en">zobrazí se jeho definice vedle překladu.</a></p>
<p>Mezi další zajímavé funkce patří <a href="http://www.online-slovnik.cz/napoveda#gadget">Google Gadget varianta slovníku</a>, kterou si můžete přidat buď na svoují Google Homepage nebo na svůj web či blog. Slovník je možné také snadno integrovat do Firefoxu nebo do IE7 díky <a href="http://www.online-slovnik.cz/napoveda#modul">vyhledávacího modulu</a>, (operistům samozřejmě stačí kliknout pravým tlačítkem do hledacího políčka a zvolit &#8220;Vytvořit vyhledávač&#8221;). Za zmínku stojí také <a href="http://www.online-slovnik.cz/nejcastejsi-slova">seznam nejčastějších anglických slov</a></p>
<p><script src="http://www.gmodules.com/ig/ifr?url=http://www.online-slovnik.cz/gadget/online-slovnik-gadget.xml&amp;synd=open&amp;w=320&amp;h=80&amp;title=Online+slovn%C3%ADk&amp;lang=cs&amp;country=ALL&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script></p>
<p>Popis dalších funkcí a vlastností naleznete v <a href="http://www.online-slovnik.cz/napoveda">nápovědě ke slovníku</a>.</p>
<p>Doufám, že Vás tento <a href="http://www.online-slovnik.cz/">online slovník</a> zaujme stejně jako těch několik tisíc uživatelů, kteří ho denně spkojeně používají.</p>
<p><em><strong>Aktualizace:</strong> slovník nově obsahuje též plnohodnotný <a href="http://www.online-slovnik.cz/prekladac">překladač vět a delších textů</a></em> z a do cca 40 jazyků</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/slovnik/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Integrace Texy! do jEditu</title>
		<link>http://blog.webkitchen.cz/integrace-texy-do-jeditu</link>
		<comments>http://blog.webkitchen.cz/integrace-texy-do-jeditu#comments</comments>
		<pubDate>Thu, 09 Oct 2008 19:37:03 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[Česky]]></category>
		<category><![CDATA[jedit]]></category>
		<category><![CDATA[texy]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=53</guid>
		<description><![CDATA[ Máte rádi Texy!? A používáte jEdit? Tak to se vám určitě bude hodit tento script, který integruje Texy! přímo do jEditu.

Instalace

Tento PHP script obsahuje Texy!; uložte jej na libovolné misto ve svém počítači: texy.php
Tento BSH script je macro pro jEdit; uložte ho mezi ostatní macra v adresáři s nastavením jEditu (obvykle ~/.jedit/macros): Texy.bsh
Otevřete ho [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-70  alignright" title="jEdit" src="http://blog.webkitchen.cz/wp-content/uploads/2008/11/logo64.png" alt="" width="64" height="64" /> <strong></strong><strong>Máte rádi <a href="http://texy.info/">Texy!</a>? A používáte <a href="http://jedit.org/">jEdit</a>?</strong> Tak to se vám určitě bude hodit tento script, který integruje Texy! přímo do jEditu.<br />
<span id="more-53"></span><br />
<strong>Instalace</strong></p>
<ol>
<li>Tento PHP script obsahuje Texy!; uložte jej na libovolné misto ve svém počítači: <a href="http://www.webkitchen.cz/lab/jEdit/macros/texy/texy.phps">texy.php</a></li>
<li>Tento BSH script je macro pro jEdit; uložte ho mezi ostatní macra v adresáři s nastavením jEditu (obvykle ~/.jedit/macros): <a href="http://www.webkitchen.cz/lab/jEdit/macros/texy/Texy.bsh">Texy.bsh</a></li>
<li>Otevřete ho ve svém oblibeném textovém editoru (ano, např. v jEditu <img src='http://blog.webkitchen.cz/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) a upravte hodnoty proměnných PHP_BINARY a TEXY_SCRIPT.</li>
</ol>
<p>Od této chvíle můžete kodovat přímo v Texy! a když budete chtít kod převést na XHTML, jednodušše zavolejte macro Texy.bsh z menu Macros (nebo si jej přidejte do kontextového menu, jak to můžete vidět na screenshotu níže). Script umí zpracovat i vicenasobné selekce. Chcete-li překonvertovat celý buffer, pak nic neoznačujte.</p>
<p><strong>Výsledek</strong></p>
<p><a href="http://blog.webkitchen.cz/wp-content/uploads/2008/11/jedit-texy1.png"><img class="alignleft size-medium wp-image-58" title="jedit texy" src="http://blog.webkitchen.cz/wp-content/uploads/2008/11/jedit-texy1-300x197.png" alt="" width="300" height="197" /></a><a href="http://blog.webkitchen.cz/wp-content/uploads/2008/11/jedit-texy2.png"></a></p>
<p><a href="http://blog.webkitchen.cz/wp-content/uploads/2008/11/jedit-texy2.png"><img class="alignnone size-medium wp-image-59" title="jedit texy" src="http://blog.webkitchen.cz/wp-content/uploads/2008/11/jedit-texy2-300x197.png" alt="" width="300" height="197" /></a></p>
<p><strong>Kompatabilita</strong></p>
<p>Testováno pouze na Linuxu.</p>
<p>Mimochodem, znate <a href="http://www.webkitchen.cz/lab/html2texy/">html2texy!</a>?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/integrace-texy-do-jeditu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anchorize.js &#8211; convert URLs into links</title>
		<link>http://blog.webkitchen.cz/anchorize</link>
		<comments>http://blog.webkitchen.cz/anchorize#comments</comments>
		<pubDate>Tue, 07 Oct 2008 15:33:54 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[userjs]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=41</guid>
		<description><![CDATA[ Anchorize.js is a small user JavaScript file for Opera which converts plain text links into real clikable links. It works on both HTML pages and text files.


Download anchorize.js


All of the following URLs are correctly converted into clickable links when using anchorize.js:

http://example.com/
http://192.160.1.1/~root
https://foo.example.com/bar?aaa=eee&#38;yyy=ooo
ftp://example.com/foo
http://en.wikipedia.org/wiki/Term_(language)
(http://example.com/)
www.example.com/beer[]=pilsner

If Anchorize.js causes some problems on a particular website or you just want to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-90 alignright" title="Opera logo" src="http://blog.webkitchen.cz/wp-content/uploads/2008/11/ologo_wback.gif" alt="Opera logo" width="138" height="52" /> Anchorize.js is a small user JavaScript file for Opera which converts plain text links into real clikable links. It works on both HTML pages and text files.</p>
<p><span id="more-41"></span></p>
<ul>
<li><a href="http://www.webkitchen.cz/lab/opera/anchorize/anchorize.js"><strong>Download anchorize.js</strong></a></li>
</ul>
<p><img class="alignnone" title="Anchorize - prevod URL na odkazy" src="http://www.webkitchen.cz/lab/opera/anchorize/anchorize.png" alt="" width="565" height="343" /></p>
<p>All of the following URLs are correctly converted into clickable links when using anchorize.js:</p>
<ul>
<li>http://example.com/</li>
<li>http://192.160.1.1/~root</li>
<li>https://foo.example.com/bar?aaa=eee&amp;yyy=ooo</li>
<li>ftp://example.com/foo</li>
<li>http://en.wikipedia.org/wiki/Term_(language)</li>
<li>(http://example.com/)</li>
<li>www.example.com/beer[]=pilsner</li>
</ul>
<p>If Anchorize.js causes some problems on a particular website or you just want to disable it for a specific domain (e.g. in my instalation I&#8217;ve disabled it for Google Search), use an @exclude directive as described in <a href="http://www.opera.com/browser/tutorials/userjs/using/">Opera documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/anchorize/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Anchorize.js &#8211; převod URL na odkazy</title>
		<link>http://blog.webkitchen.cz/anchorizejs</link>
		<comments>http://blog.webkitchen.cz/anchorizejs#comments</comments>
		<pubDate>Tue, 07 Oct 2008 16:13:58 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[Česky]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[userjs]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=33</guid>
		<description><![CDATA[ Anchorize.js je uživatelský JavaScript pro Operu, který převadí URL z textu na klikatelné odkazy. Poradí si s ruznými formami zápisu URL.


Stáhnout anchorize.js


Všechny tyto URL jsou při použití anchorize.js korektně převedeny na klikatelné odkazy:

http://example.com/
http://192.160.1.1/~root
https://foo.example.com/bar?aaa=eee&#38;yyy=ooo
ftp://example.com/foo
http://en.wikipedia.org/wiki/Term_(language)
(http://example.com/)
www.example.com/beer[]=pilsner
[www.example.com]
&#60;http://example.com/&#62;

]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-90 alignright" title="Opera logo" src="http://blog.webkitchen.cz/wp-content/uploads/2008/11/ologo_wback.gif" alt="Opera logo" width="138" height="52" /> Anchorize.js je uživatelský JavaScript pro Operu, který převadí URL z textu na klikatelné odkazy. Poradí si s ruznými formami zápisu URL.</p>
<p><span id="more-33"></span></p>
<ul>
<li><a href="http://www.webkitchen.cz/lab/opera/anchorize/anchorize.js"><strong>Stáhnout anchorize.js</strong></a></li>
</ul>
<p><img class="alignnone" title="Anchorize - prevod URL na odkazy" src="http://www.webkitchen.cz/lab/opera/anchorize/anchorize.png" alt="" width="565" height="343" /></p>
<p>Všechny tyto URL jsou při použití anchorize.js korektně převedeny na klikatelné odkazy:</p>
<ul>
<li>http://example.com/</li>
<li>http://192.160.1.1/~root</li>
<li>https://foo.example.com/bar?aaa=eee&amp;yyy=ooo</li>
<li>ftp://example.com/foo</li>
<li>http://en.wikipedia.org/wiki/Term_(language)</li>
<li>(http://example.com/)</li>
<li>www.example.com/beer[]=pilsner</li>
<li>[www.example.com]</li>
<li>&lt;http://example.com/&gt;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/anchorizejs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Pretty XML tree view&#8221; &#8211; uživatelský JavaScript pro Operu</title>
		<link>http://blog.webkitchen.cz/pretty-xml-tree-cz</link>
		<comments>http://blog.webkitchen.cz/pretty-xml-tree-cz#comments</comments>
		<pubDate>Tue, 07 Oct 2008 15:55:43 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[Česky]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[userjs]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=29</guid>
		<description><![CDATA["Pretty XML tree view" je user JavaScript (uzivatelsky JavaScript) pro prohlizec Opera, ktery automaticky konveruje nenastylovane XML (napr. RSS)  na stromovou strukturu podobne, jako to dela napr. Firefox.]]></description>
			<content:encoded><![CDATA[<p><img class=" alignright" title="Opera logo" src="http://promote.opera.com/logos/ologo_wback.gif" alt="Opera" width="138" height="52" /></p>
<p>&#8220;Pretty XML tree view&#8221; je <a href="http://www.opera.com/support/tutorials/userjs/">user JavaScript</a> (uživatelský JavaScript) pro prohlížeč Opera, který automaticky konveruje nenastylované XML (napr. RSS)  na stromovou strukturu podobně, jako to činí např. Firefox.</p>
<p><span id="more-29"></span></p>
<p>Transformace je prováděna <strong>pomocí XSLT</strong> (<a href="http://www.webkitchen.cz/lab/opera/pretty-xml-tree/files/pretty-xml-tree.xsl">XSLT šablona</a> je obsazena v souboru se scriptem), takže se jedna o velmi rychlý proces.</p>
<ul>
<li><strong><a href="http://www.webkitchen.cz/lab/opera/pretty-xml-tree/files/pretty-xml-tree.xsl.html">ukazkový vystup</a></strong></li>
</ul>
<p>Ve vysledné stromové struktuře lze jednotlivé elementy jednoduše sbalit a rozbalit kliknutim na počatecní či koncovou značku daného elementu.</p>
<h3>Stažení</h3>
<ul>
<li><a href="http://www.webkitchen.cz/lab/opera/pretty-xml-tree/files/pretty-xml-tree.js">pretty-xml-tree.js</a> &#8211; soubor s uživatelským JavaScriptem</li>
<li><a href="http://www.webkitchen.cz/lab/opera/pretty-xml-tree/files/pretty-xml-tree.xsl">pretty-xml-tree.xsl</a> &#8211; originalní XSLT sablona <em>(tento soubor nepotřebujete &#8211; je již obsazen ve scriptu -, ale může se hodit, pokud chcete porozumnet, jak je přesně transformace udelána)</em></li>
</ul>
<h3>Screenshot</h3>
<p><img class="alignnone" title="Pretty XML tree view for Opera" src="http://www.webkitchen.cz/lab/opera/pretty-xml-tree/files/pretty-xml-view-opera.png" alt="" width="530" height="592" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/pretty-xml-tree-cz/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pretty XML tree view for Opera</title>
		<link>http://blog.webkitchen.cz/pretty-xml-tree</link>
		<comments>http://blog.webkitchen.cz/pretty-xml-tree#comments</comments>
		<pubDate>Tue, 07 Oct 2008 15:29:38 +0000</pubDate>
		<dc:creator>Jakub</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[userjs]]></category>
		<category><![CDATA[webdev]]></category>

		<guid isPermaLink="false">http://blog.webkitchen.cz/?p=13</guid>
		<description><![CDATA[Pretty XML tree view is an user JavaScript for the Opera browser, that automatically transforms a raw unstyled XML (i.e. RSS feed) into pretty - Firefox like - tree view, which is more user friendly.]]></description>
			<content:encoded><![CDATA[<p><img class=" alignright" title="Opera logo" src="http://promote.opera.com/logos/ologo_wback.gif" alt="Opera" width="138" height="52" /> Pretty XML tree view is a <a href="http://www.opera.com/support/tutorials/userjs/">user JavaScript</a> for the Opera browser that automatically transforms raw unstyled XML files (i.e. RSS feeds) into a pretty &#8211; Firefox like &#8211; tree view which is much more user friendly.</p>
<p><span id="more-13"></span></p>
<p>The transformation is done <strong>using XSLT</strong> (<a href="http://www.webkitchen.cz/lab/opera/pretty-xml-tree/files/pretty-xml-tree.xsl">the stylesheet</a> is embeded into the JavaScript file), so that it&#8217;s <strong>much faster</strong> than i.e. the first <a href="http://userjs.org/scripts/general/developer_tools/xml-tree">XML tree</a> user JavaScript (written by Mark &#8220;Tarquin&#8221; Wilton-Jones) even with large documents.</p>
<p>See <a href="http://www.webkitchen.cz/lab/opera/pretty-xml-tree/files/pretty-xml-tree.xsl.html">Pretty XML tree sample output.</a></p>
<p>Note that the formatted output allows you to <strong>fold elements</strong> &#8211; just click either the opening  or the closing tag of an element and its content will be replaced with three green dots; click again to unfold it.</p>
<p>If you want to know which <strong>namespace</strong> particular element belongs to, just hold your mouse over it and the URI of the namespace appears in a few seconds.</p>
<h3>Download</h3>
<ul>
<li><a href="http://www.webkitchen.cz/lab/opera/pretty-xml-tree/files/pretty-xml-tree.js">pretty-xml-tree.js</a> &#8211; the user JavaScript file</li>
<li><a href="http://www.webkitchen.cz/lab/opera/pretty-xml-tree/files/pretty-xml-tree.xsl">pretty-xml-tree.xsl</a> &#8211; the original XSLT file <em>(you most likely don&#8217;t need this file, it&#8217;s here in case you want to study it)</em></li>
</ul>
<h3>Screenshot</h3>
<p><img class="alignnone" title="Pretty XML tree view for Opera" src="http://www.webkitchen.cz/lab/opera/pretty-xml-tree/files/pretty-xml-view-opera.png" alt="" width="530" height="592" /></p>
<h3>Update</h3>
<p>Some guys&#8217;ve created a Chrome extension based on my script &#8211; <a href="https://chrome.google.com/extensions/detail/gbammbheopgpmaagmckhpjbfgdfkpadb">XML Tree for Chrome</a>. I really like the idea to allow search in the tree by XPath expressions!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webkitchen.cz/pretty-xml-tree/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>

