<feed xmlns='http://www.w3.org/2005/Atom'>
<title>npr-text-mode-redirect, branch master</title>
<subtitle>A user script to redirect to NPR’s plain-text article mode</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/npr-text-mode-redirect/'/>
<entry>
<title>Use `window.location.assign` instead of `location.assign`</title>
<updated>2018-08-21T00:13:58+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-08-21T00:13:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/npr-text-mode-redirect/commit/?id=e6b8478d09db8ccac7bc80e401e998473352f41e'/>
<id>e6b8478d09db8ccac7bc80e401e998473352f41e</id>
<content type='text'>
Previously the `choice.npr.org` page wasn't showing up in history. Using
`window` appears to fix this and correctly add the choice page to
browser history.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously the `choice.npr.org` page wasn't showing up in history. Using
`window` appears to fix this and correctly add the choice page to
browser history.
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle cases where the article ID isn't in 6th position</title>
<updated>2018-08-21T00:11:00+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-08-21T00:11:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/npr-text-mode-redirect/commit/?id=36758fd1ff687ee062d0403930aad85c7477d9bf'/>
<id>36758fd1ff687ee062d0403930aad85c7477d9bf</id>
<content type='text'>
In this example:

    https://www.npr.org/sections/thesalt/2018/08/20/636845604/beer-drinking-water-and-fish-tiny-plastic-is-everywhere

the article ID isn't in the position we expect it to be, and we instead
get `08` as the `article_id`.

Instead of expecting the article ID to always be in the same spot, look
for it in the second-from-last position.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In this example:

    https://www.npr.org/sections/thesalt/2018/08/20/636845604/beer-drinking-water-and-fish-tiny-plastic-is-everywhere

the article ID isn't in the position we expect it to be, and we instead
get `08` as the `article_id`.

Instead of expecting the article ID to always be in the same spot, look
for it in the second-from-last position.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add README</title>
<updated>2018-08-06T00:51:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-08-06T00:51:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/npr-text-mode-redirect/commit/?id=7f44413d44d080ad3ad209759e80fdb0292d8d5d'/>
<id>7f44413d44d080ad3ad209759e80fdb0292d8d5d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add license (GNU GPLv3+)</title>
<updated>2018-08-05T23:58:36+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-08-05T23:58:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/npr-text-mode-redirect/commit/?id=e93996af941aebf3d3ee84d6b5fb76005a9348fc'/>
<id>e93996af941aebf3d3ee84d6b5fb76005a9348fc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>User script to redirect to NPR's text version</title>
<updated>2018-08-05T23:48:35+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-08-05T23:48:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/npr-text-mode-redirect/commit/?id=a587ea1004b4fd57635c987fd4dafed4b178e5c0'/>
<id>a587ea1004b4fd57635c987fd4dafed4b178e5c0</id>
<content type='text'>
Since the site doesn't provide a function to do this, make a mechanism
to do it automatically.

The text mode version is light and doesn't track visitors.

In order to redirect to the text version of the article, we pull out the
article's ID and use it in the text mode URL.

Thanks to these MDN docs explaining how to parse query string arguments:
- https://developer.mozilla.org/en-US/docs/Web/API/URL/searchParams#Example
- https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/get#Example
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the site doesn't provide a function to do this, make a mechanism
to do it automatically.

The text mode version is light and doesn't track visitors.

In order to redirect to the text version of the article, we pull out the
article's ID and use it in the text mode URL.

Thanks to these MDN docs explaining how to parse query string arguments:
- https://developer.mozilla.org/en-US/docs/Web/API/URL/searchParams#Example
- https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/get#Example
</pre>
</div>
</content>
</entry>
</feed>
