<?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>info.michael-simons.eu &#187; JavaScript</title>
	<atom:link href="http://info.michael-simons.eu/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://info.michael-simons.eu</link>
	<description>Just another nerd blog</description>
	<lastBuildDate>Fri, 09 Jul 2010 07:40:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>OS X Suchfelder in Safari</title>
		<link>http://info.michael-simons.eu/2006/05/01/os-x-suchfelder-in-safari/</link>
		<comments>http://info.michael-simons.eu/2006/05/01/os-x-suchfelder-in-safari/#comments</comments>
		<pubDate>Mon, 01 May 2006 09:19:22 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://www.msimons.info/?p=13</guid>
		<description><![CDATA[Safari hat eine schöne Funktion. Trifft er im HTML Text einer Seite auf ein input Element vom Typ &#8220;search&#8221;, so stellt er es so dar: Der Inputtyp &#8220;search&#8221; ist allerdings nicht XHTML konform. Mit einem kleinen JavaScript, dass man beim onload des Bodies ausführt, bekommt gültiges XHMTL raus. Im XHTML Code der Seite ganz normal [...]]]></description>
			<content:encoded><![CDATA[<p>Safari hat eine schöne Funktion. Trifft er im HTML Text einer Seite auf ein <em>input</em> Element vom Typ &#8220;search&#8221;, so stellt er es so dar:</p>
<p><img id="image12" src="http://info.michael-simons.eu/wp-content/suchfeldsafari.thumbnail.jpg" alt="Suchfeld im Safari" /></p>
<p>Der Inputtyp &#8220;search&#8221; ist allerdings nicht XHTML konform. Mit einem kleinen JavaScript, dass man beim onload des Bodies ausführt, bekommt gültiges XHMTL raus.</p>
<p>Im XHTML Code der Seite ganz normal den Typ &#8220;text&#8221; notieren und eine Id vergeben:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;input type=&quot;text&quot; id=&quot;searchtextinput&quot; title=&quot;Suche&quot; name=&quot;s&quot;/&gt;&amp;#160;&lt;input type=&quot;submit&quot; value=&quot;go!&quot; /&gt;</pre></div></div>

<p>danach eine JavaScript Funktion mit folgendem Inhalt erstellen und onload ausführen:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> input <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;searchtextinput&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
input.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;search&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p class="akst_link"><a href="http://info.michael-simons.eu/?p=13&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_13" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2006/05/01/os-x-suchfelder-in-safari/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.0.x, Safari und der Visual Rich Editor</title>
		<link>http://info.michael-simons.eu/2006/04/22/wordpress-20x-safari-und-der-visual-rich-editor/</link>
		<comments>http://info.michael-simons.eu/2006/04/22/wordpress-20x-safari-und-der-visual-rich-editor/#comments</comments>
		<pubDate>Sat, 22 Apr 2006 11:05:46 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://www.msimons.info/?p=4</guid>
		<description><![CDATA[Ein passender, erster seitenspezifischer Eintrag: Nachdem ich gerade ohne Probleme WordPress 2.0.2 mit dem wundervollen Tiger Style Administration Panel von Steve Smith eingerichtet habe, muss ich mich direkt drüber ärgern, dass auch dort im Safari unter Mac OS X der Default Visual Rich Editor von WordPress nicht angezeigt wird. Anscheinend führt der Visual Rich Editor [...]]]></description>
			<content:encoded><![CDATA[<p>Ein passender, erster seitenspezifischer Eintrag:</p>
<p>Nachdem ich gerade ohne Probleme WordPress 2.0.2 mit dem wundervollen Tiger Style Administration Panel von <a rel="external" href="http://www.orderedlist.com">Steve Smith</a> eingerichtet habe, muss ich mich direkt drüber ärgern, dass auch dort im Safari unter Mac OS X der Default Visual Rich Editor von WordPress nicht angezeigt wird.</p>
<p>Anscheinend führt der Visual Rich Editor im Safari direkt zu einem Totalabsturz. Leider funktionieren selbst die Quicktags nicht im Safari bzw. die Buttons erscheinen erst gar nicht.</p>
<p>Das allerdings kann man leicht ändern: Man braucht nur die Datei <em>admin-functions.php</em> im Verzeichnis <em style="font-style: italic">wp-admin</em> wie folgt anpassen:</p>
<p><span id="more-4"></span></p>
<p>Nach folgendem Textfragment suchen:</p>
<pre>if (!strstr($_SERVER['HTTP_USER_AGENT'], 'Safari'))</pre>
<p>Danach folgenden Text:</p>

<div class="wp_syntax"><div class="code"><pre class="php-brief" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Safari'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">'
	&lt;div id=&quot;quicktags&quot;&gt;
		&lt;script src=&quot;../wp-includes/js/quicktags.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
		&lt;script type=&quot;text/javascript&quot;&gt;if ( typeof tinyMCE == &quot;undefined&quot; || tinyMCE.configs.length &lt; 1 ) edToolbar();&lt;/script&gt;
	&lt;/div&gt;
'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">else</span> <span style="color: #990000;">echo</span> <span style="color: #0000ff;">'</span></pre></div></div>

<p>in diesen ändern</p>

<div class="wp_syntax"><div class="code"><pre class="php-brief" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP</span>
<span style="color: #990000;">echo</span> <span style="color: #0000ff;">'
&lt;div id=&quot;quicktags&quot;&gt;
	&lt;script src=&quot;../wp-includes/js/quicktags.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
	&lt;script type=&quot;text/javascript&quot;&gt;if ( typeof tinyMCE == &quot;undefined&quot; || tinyMCE.configs.length &lt; 1 ) edToolbar();&lt;/script&gt;
&lt;/div&gt;
'</span><span style="color: #339933;">;</span>
<span style="color: #990000;">echo</span> <span style="color: #0000ff;">'</span></pre></div></div>

<p>und fertig!</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=4&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_4" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2006/04/22/wordpress-20x-safari-und-der-visual-rich-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
