<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>JavaScript on ShrimpWorks</title><link>/tags/javascript/</link><description>Recent content in JavaScript on ShrimpWorks</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Mon, 29 May 2017 00:00:00 +0000</lastBuildDate><atom:link href="/tags/javascript/feed.xml" rel="self" type="application/rss+xml"/><item><title>Aurial, HTML5 Subsonic Music Player</title><link>/2017/05/29/aurial-html5-subsonic-music-player/</link><pubDate>Mon, 29 May 2017 00:00:00 +0000</pubDate><guid>/2017/05/29/aurial-html5-subsonic-music-player/</guid><description>&lt;img src="/2017/05/29/aurial-html5-subsonic-music-player/2017-05-29-aurial.png" class="image-left" /&gt;
 


&lt;p&gt;I have finally decided to &lt;a href="https://github.com/shrimpza/aurial/releases"&gt;release version 1.0&lt;/a&gt; of &lt;a href="https://github.com/shrimpza/aurial"&gt;Aurial&lt;/a&gt;, my implementation of a music player/client for the &lt;a href="http://subsonic.org/"&gt;Subsonic&lt;/a&gt; music server.&lt;/p&gt;
&lt;p&gt;I started this around two years ago, some time after switching my primary desktop from Windows to Linux, and I really missed &lt;a href="https://www.foobar2000.org/"&gt;foobar2000&lt;/a&gt; - it has been my primary music player ever since. Unfortunately I have an irrational aversion to using Wine to run Windows applications, and none of the native music players on Linux felt good to me. As I already ran a Subsonic music server, I thought I&amp;rsquo;d just make use of that.&lt;/p&gt;</description></item><item><title>Client-Side Processing of Images with JavaScript Before Uploading</title><link>/2017/03/07/client-side-processing-of-images-with-javascript-before-uploading/</link><pubDate>Tue, 07 Mar 2017 00:00:00 +0000</pubDate><guid>/2017/03/07/client-side-processing-of-images-with-javascript-before-uploading/</guid><description>&lt;p&gt;The title&amp;rsquo;s quite silly unfortunately, but I was recently doing some experimentation with uploading images to &lt;a href="https://couchdb.apache.org/"&gt;CouchDB&lt;/a&gt; directly from a browser. I needed to scale the images before storage, and since I was talking directly to the CouchDB service without any kind of in-between API services or server-side scripts, needed a way to achieve this purely on the client.&lt;/p&gt;
&lt;p&gt;Thanks to modern APIs available in browsers, combined with a Canvas, it&amp;rsquo;s actually reasonably simple to process a user-selected image prior to uploading it to the server without the need for any third-party libraries or scripts.&lt;/p&gt;</description></item><item><title>Lightweight Lightbox</title><link>/2016/03/29/lightweight-lightbox/</link><pubDate>Tue, 29 Mar 2016 00:00:00 +0000</pubDate><guid>/2016/03/29/lightweight-lightbox/</guid><description>&lt;p&gt;It seems surprisingly difficult to find a simple &lt;a href="https://en.wikipedia.org/wiki/Lightbox_%28JavaScript%29"&gt;lightbox&lt;/a&gt;
implementation which doesn&amp;rsquo;t rely on jQuery. I wanted something simple for this
site, but did not want to have to re-do any HTML, so came up with a basic
JavaScript and CSS solution.&lt;/p&gt;
&lt;p&gt;This also turned out to be a useful lesson in &amp;ldquo;modern&amp;rdquo; jQuery-less DOM
manipulation. I found &lt;a href="http://tutorialzine.com/2014/06/10-tips-for-writing-javascript-without-jquery/"&gt;10 Tips for Writing JavaScript without jQuery&lt;/a&gt;
quite useful in this regard.&lt;/p&gt;
&lt;p&gt;For the Lightbox/pop-up itself, the &lt;a href="http://codepen.io/gschier/pen/HCoqh"&gt;Pure CSS Lightbox&lt;/a&gt;
by &lt;a href="http://schier.co/"&gt;Gregory Schier&lt;/a&gt; served as an excellent reference and
starting point.&lt;/p&gt;</description></item></channel></rss>