<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/"/>

<title>Jeff Epler's blog</title>
<modified>2008-08-13T13:01:19Z</modified>
<tagline>Photos, electronics, cnc, and more</tagline>
<author><name>Jeff Epler</name><email>jepler@unpythonic.net</email></author>
<entry>
<title>Marking anchors in HTML with a javascript bookmark</title>
<issued>2008-08-13T13:01:19Z</issued>
<modified>2008-08-13T13:01:19Z</modified>
<id>http://emergent.unpythonic.net/01218632479</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/01218632479"/>
<content type="text/html" mode="escaped">
To send links to internal anchors in HTML documents, use &lt;a href=&quot;javascript:(function(){%20var%20rows=document.evaluate('//a[@name]',%20document,%20null,%20XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,%20null);%20for(var%20i=0;%20i%3crows.snapshotLength;%20i++)%20{%20var%20it%20=%20rows.snapshotItem(i);%20var%20name%20=%20it.getAttribute('name');%20if(0%20%26%26%20it.GetAttribute('href')%20||%20it.innerHTML)%20continue;%20it.innerHTML=%22#%22;%20it.setAttribute(%22href%22,%20%22#%22%20+%20name);%20}%20rows%20=%20document.evaluate('//*[@id]',%20document,%20null,%20XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,%20null);%20for(var%20i=rows.snapshotLength-1;%20i%3e=0;%20i--)%20{%20var%20it%20=%20rows.snapshotItem(i);%20var%20id%20=%20it.getAttribute('id');%20it.innerHTML%20=%20%22%3ca%20href=\%22#%22%20+%20id%20+%20%22\%22%3e#%3c/a%3e%22%20+%20it.innerHTML;%20}%20})()&quot;&gt;this bookmarklet&lt;/A&gt;.

&lt;p&gt;I find this bookmarklet very useful when sending people links to emc
documentation and the wiki, because there are often more anchors available than
those that are actually linked to in tables of contents.

&lt;p&gt;</content>
</entry>
<entry>
<title>glif: generate client-side gif files from javascript</title>
<issued>2005-09-11T18:15:11Z</issued>
<modified>2005-09-11T18:15:11Z</modified>
<id>http://emergent.unpythonic.net/software/01126462511-glif</id>
<link rel="alternate" type="text/html" href="http://emergent.unpythonic.net/software/01126462511-glif"/>
<content type="text/html" mode="escaped">It probably won't be the biggest thing since AJAX, but I hit upon the
idea of generating images client-side.  The current ways to do this seem to
involve using tables or absolute-positioning of very small DIVs.  (See, for
example, &lt;a href=&quot;http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm&quot;&gt;http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm&lt;/a&gt;) My
technique, which I call &lt;i&gt;glif&lt;/i&gt; (for &lt;i&gt;GIF&lt;/i&gt; and &lt;i&gt;glyph&lt;/i&gt;),
generates a gif-format image on the client side.

&lt;p&gt;One application for this that comes immediately to mind is client-side
generation of &lt;a href=&quot;http://www.xml.com/pub/a/2005/06/22/sparklines.html&quot;&gt;sparklines&lt;/a&gt;-type images, possibly from an AJAX source.


&lt;p&gt;&lt;a href=&quot;http://media.unpythonic.net/emergent-files/software/01126462511-glif/glif.html&quot;&gt;glif.html&lt;/a&gt; is a small demo which draws a sine wave in an image (Known not to work in IE) &lt;b&gt;Update: &lt;a href=&quot;http://media.unpythonic.net/emergent-files/software/01126462511-glif/sparglif2.html&quot;&gt;SparGlif demo&lt;/a&gt;&lt;/b&gt;</content>
</entry>
</feed>

