<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.zaori.org/w/index.php?action=history&amp;feed=atom&amp;title=User%3AApheori%2Fcommon.js</id>
	<title>User:Apheori/common.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.zaori.org/w/index.php?action=history&amp;feed=atom&amp;title=User%3AApheori%2Fcommon.js"/>
	<link rel="alternate" type="text/html" href="https://wiki.zaori.org/w/index.php?title=User:Apheori/common.js&amp;action=history"/>
	<updated>2026-06-10T18:36:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.0-alpha</generator>
	<entry>
		<id>https://wiki.zaori.org/w/index.php?title=User:Apheori/common.js&amp;diff=678&amp;oldid=prev</id>
		<title>Apheori: .</title>
		<link rel="alternate" type="text/html" href="https://wiki.zaori.org/w/index.php?title=User:Apheori/common.js&amp;diff=678&amp;oldid=prev"/>
		<updated>2013-11-02T17:50:48Z</updated>

		<summary type="html">&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/* Tab thing like proper (yoinked from SO) */&lt;br /&gt;
jQuery( &amp;quot;textarea&amp;quot; ).keydown( function( e ) {&lt;br /&gt;
	if( e.keyCode === 9 ) { // tab was pressed&lt;br /&gt;
		// get caret position/selection&lt;br /&gt;
		var start = this.selectionStart;&lt;br /&gt;
		var end = this.selectionEnd;&lt;br /&gt;
 &lt;br /&gt;
		var $this = jQuery( this );&lt;br /&gt;
		var value = $this.val();&lt;br /&gt;
 &lt;br /&gt;
		// set textarea value to: text before caret + tab + text after caret&lt;br /&gt;
		$this.val( value.substring( 0, start )&lt;br /&gt;
			+ &amp;quot;\t&amp;quot;&lt;br /&gt;
			+ value.substring( end ) );&lt;br /&gt;
 &lt;br /&gt;
		// put caret at right position again (add one for the tab)&lt;br /&gt;
		this.selectionStart = this.selectionEnd = start + 1;&lt;br /&gt;
 &lt;br /&gt;
		// prevent the focus lose&lt;br /&gt;
		e.preventDefault();&lt;br /&gt;
	}&lt;br /&gt;
} );&lt;/div&gt;</summary>
		<author><name>Apheori</name></author>
	</entry>
</feed>