<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Peniquitous, branch v0.0.1</title>
<subtitle>A user script that provides ubiquitous Ctrl-P &amp; Ctrl-N support in search fields</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Peniquitous/'/>
<entry>
<title>README.md: Add demo gif</title>
<updated>2015-05-24T22:24:05+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-05-24T22:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Peniquitous/commit/?id=76dc2213fa8963fd7e9fc66556c1ad43c17ae8c3'/>
<id>76dc2213fa8963fd7e9fc66556c1ad43c17ae8c3</id>
<content type='text'>
Show people what's going on and how to use the extension.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Show people what's going on and how to use the extension.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add README.md</title>
<updated>2015-05-24T22:16:24+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-05-24T22:16:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Peniquitous/commit/?id=39c67219005e2f590e30b707cc03ce636158c302'/>
<id>39c67219005e2f590e30b707cc03ce636158c302</id>
<content type='text'>
* Description
* Installation notes
* License information
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Description
* Installation notes
* License information
</pre>
</div>
</content>
</entry>
<entry>
<title>Add LICENSE</title>
<updated>2015-05-24T21:57:08+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-05-24T21:57:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Peniquitous/commit/?id=b5c8b47d7e9adac2c7ffe4f6493c52b3b084eb7a'/>
<id>b5c8b47d7e9adac2c7ffe4f6493c52b3b084eb7a</id>
<content type='text'>
MIT license.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MIT license.
</pre>
</div>
</content>
</entry>
<entry>
<title>peniquitous.js: Target "search"-type inputs</title>
<updated>2015-05-24T21:51:32+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-05-24T21:51:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Peniquitous/commit/?id=82acf609516e94c2825a1b7e2af7106232bf9c8e'/>
<id>82acf609516e94c2825a1b7e2af7106232bf9c8e</id>
<content type='text'>
Apparently Wikipedia uses `input[type="search"]`. Might as well include
it since that's probably a common type of input for this use case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apparently Wikipedia uses `input[type="search"]`. Might as well include
it since that's probably a common type of input for this use case.
</pre>
</div>
</content>
</entry>
<entry>
<title>peniquitous.js: Get rid of key code magic numbers</title>
<updated>2015-05-24T21:19:40+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-05-24T21:19:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Peniquitous/commit/?id=ed15eefe0ab87f33d3c3d9e5e2204a7bf508bf70'/>
<id>ed15eefe0ab87f33d3c3d9e5e2204a7bf508bf70</id>
<content type='text'>
Move the key code numerical values into a hash so we can refer to them
by name instead of obtuse magic numbers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the key code numerical values into a hash so we can refer to them
by name instead of obtuse magic numbers.
</pre>
</div>
</content>
</entry>
<entry>
<title>peniquitous.js: Get rid of test code</title>
<updated>2015-05-24T21:14:55+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-05-24T21:14:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Peniquitous/commit/?id=c51f5ade946771a3a5c2398aff4b46bef9e8efe2'/>
<id>c51f5ade946771a3a5c2398aff4b46bef9e8efe2</id>
<content type='text'>
This was used to test out simulating a down arrow key press on the
Google search home page with the field selected and something typed in.
If the first entry in the suggestion drop-down was selected after the
timeout fired, that means it worked.

We no longer need this test code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was used to test out simulating a down arrow key press on the
Google search home page with the field selected and something typed in.
If the first entry in the suggestion drop-down was selected after the
timeout fired, that means it worked.

We no longer need this test code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Inject peniquitous.js into the page context</title>
<updated>2015-05-24T21:09:51+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-05-24T21:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Peniquitous/commit/?id=1f8c77706f219f4e91f26eb28de63f64961727ce'/>
<id>1f8c77706f219f4e91f26eb28de63f64961727ce</id>
<content type='text'>
Instead of handling the keyboard events in the content script, inject a
script onto the page that does the key listening and simulating.

This allows the simulation of up &amp; down arrow key presses to actually
trigger the proper page event listeners and allow our custom code to do
the right thing instead of firing a key event in the Chrome extension's
isolated environment and not having anything happening because no
listeners are attached in the isolated environment.

Also inject the `KeyEvent` object from Mousetrap so we can use it's key
simulation feature. Will likely want to extract that into our own custom
code so we're not including a whole script that we only use 20% of or
so.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of handling the keyboard events in the content script, inject a
script onto the page that does the key listening and simulating.

This allows the simulation of up &amp; down arrow key presses to actually
trigger the proper page event listeners and allow our custom code to do
the right thing instead of firing a key event in the Chrome extension's
isolated environment and not having anything happening because no
listeners are attached in the isolated environment.

Also inject the `KeyEvent` object from Mousetrap so we can use it's key
simulation feature. Will likely want to extract that into our own custom
code so we're not including a whole script that we only use 20% of or
so.
</pre>
</div>
</content>
</entry>
<entry>
<title>peniquitous.js: Try to listen for &amp; simulate key events</title>
<updated>2015-05-24T21:00:32+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-05-24T20:49:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Peniquitous/commit/?id=5a9aab5e4ebb71770c67fa266ef651b2e8dcbbd6'/>
<id>5a9aab5e4ebb71770c67fa266ef651b2e8dcbbd6</id>
<content type='text'>
Doesn't quite work. We're correctly listening for Ctrl-N/P presses, and
seemingly correctly simulating corresponding up/down key presses, but it
seems that the 'content scripts' can't trigger page events.

See
https://developer.chrome.com/extensions/content_scripts#execution-environment
which describes the "isolated" execution environment of Chrome content
scripts.

Spent a while trying to figure out why this wasn't working. Finally
looked back through my Chrome console history and found out what I did
previously to get it working and it turns out that was the same thing
I'm doing here. Finally had a moment of inspiration that prompted me to
look into the different execution environment thing.

Found a useful Stack Overflow post that descibes how to inject a script
onto the page, which will give me access to the page's context:
http://stackoverflow.com/questions/9515704/building-a-chrome-extension-inject-code-in-a-page-using-a-content-script

Doing that should get this working, so that's what I'm going to try
next.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Doesn't quite work. We're correctly listening for Ctrl-N/P presses, and
seemingly correctly simulating corresponding up/down key presses, but it
seems that the 'content scripts' can't trigger page events.

See
https://developer.chrome.com/extensions/content_scripts#execution-environment
which describes the "isolated" execution environment of Chrome content
scripts.

Spent a while trying to figure out why this wasn't working. Finally
looked back through my Chrome console history and found out what I did
previously to get it working and it turns out that was the same thing
I'm doing here. Finally had a moment of inspiration that prompted me to
look into the different execution environment thing.

Found a useful Stack Overflow post that descibes how to inject a script
onto the page, which will give me access to the page's context:
http://stackoverflow.com/questions/9515704/building-a-chrome-extension-inject-code-in-a-page-using-a-content-script

Doing that should get this working, so that's what I'm going to try
next.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add peniquitous.js, bind to input focus (WIP)</title>
<updated>2015-05-23T20:48:45+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-05-23T20:48:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Peniquitous/commit/?id=e8c2b483d0ac3540dad9374ee00a586db321e016'/>
<id>e8c2b483d0ac3540dad9374ee00a586db321e016</id>
<content type='text'>
Work in progress.

Get all inputs on the page. Bind a callback to their focus event. The
intention is that when the input is focused, I attach a handler to
listen for Ctrl-N/P presses.

Now that I'm writing this and thinking about it though, I might as well
just bind the Ctrl-N/P listeners to all inputs to begin with an be done
with it. Kind of a brute-force way of dealing with it but then I
wouldn't have to keep track of whether or not I've bound those listeners
to an input that was already focused previously.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Work in progress.

Get all inputs on the page. Bind a callback to their focus event. The
intention is that when the input is focused, I attach a handler to
listen for Ctrl-N/P presses.

Now that I'm writing this and thinking about it though, I might as well
just bind the Ctrl-N/P listeners to all inputs to begin with an be done
with it. Kind of a brute-force way of dealing with it but then I
wouldn't have to keep track of whether or not I've bound those listeners
to an input that was already focused previously.
</pre>
</div>
</content>
</entry>
<entry>
<title>Set up Bower. Install Mousetrap.</title>
<updated>2015-05-23T20:21:38+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-05-23T20:21:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/Peniquitous/commit/?id=3a09e4dd09a6af3b228fcda68aa0709626b5ee51'/>
<id>3a09e4dd09a6af3b228fcda68aa0709626b5ee51</id>
<content type='text'>
* Create limited bower.json file
* Create .bowerrc that tells Bower to use the `lib` directory
* Install Mousetrap for key events
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Create limited bower.json file
* Create .bowerrc that tells Bower to use the `lib` directory
* Install Mousetrap for key events
</pre>
</div>
</content>
</entry>
</feed>
