<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David&#039;s Blog &#187; javascript</title>
	<atom:link href="http://www.davidmoore.info/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidmoore.info</link>
	<description>Computer says no</description>
	<lastBuildDate>Thu, 26 Jan 2012 21:49:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Opera &#8220;Unlinker&#8221; User JavaScript</title>
		<link>http://www.davidmoore.info/2008/11/06/opera-unlinker-user-javascript/</link>
		<comments>http://www.davidmoore.info/2008/11/06/opera-unlinker-user-javascript/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 01:38:27 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[unlinker]]></category>
		<category><![CDATA[userjs]]></category>

		<guid isPermaLink="false">http://davidmoore.info/?p=49</guid>
		<description><![CDATA[<p>It&#8217;s quite common on many websites, particularly forums, to post links to images.</p>
<p>Unlinker is a very popular plugin for Firefox, which allows you to change the links to images in the page to in-line images.</p>
<p>Opera doesn&#8217;t have a fully-fledged plugin system like Firefox (which is a pro just as much as it is a con), but <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.davidmoore.info/2008/11/06/opera-unlinker-user-javascript/">Opera &#8220;Unlinker&#8221; User JavaScript</a></span>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s quite common on many websites, particularly forums, to post links to images.</p>
<p>Unlinker is a very popular plugin for Firefox, which allows you to change the links to images in the page to in-line images.</p>
<p>Opera doesn&#8217;t have a fully-fledged plugin system like Firefox (which is a pro just as much as it is a con), but you can customize it using <a title="Opera User JavaScript" href="http://www.opera.com/support/tutorials/userjs/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opera.com');" target="_blank">User JavaScript</a>.</p>
<p>I&#8217;ve made a simple script to implement a very basic version of Unlinker. It will scan the page for links to images, and embed the image in the page under the link. It currently also scales the image down while maintaining aspect ratio if it exceeds 640&#215;480.</p>
<p>To use this, create a directory on your machine to store your user javascripts, and save the source there as unlinker.js (or whatever name you like).</p>
<ul>
<li>Now in Opera, go to the Tools &gt; Preferences menu</li>
<li> Go to the <strong>Advanced</strong> tab</li>
<li>Click the <strong>Content</strong> section</li>
<li>Click the <strong>JavaScript Options&#8230;</strong> button</li>
<li>Browse to the User JavaScript files folder where you saved the file, then hit OK</li>
<li>Hit OK</li>
<li>You don&#8217;t have to restart Opera for the changes to take effect</li>
</ul>
<p>The source code is:<br />
<code><br />
</code></p>
<pre><code>addEventListener(
      'load',
      function (e)
      {
          var isImageRegex = new RegExp("\.gif|jpeg|jpg|png|bmp$", "i");

          var allAnchors = document.getElementsByTagName("a");

          for( var i = 0; i &lt; allAnchors.length; i++ )
          {
              var anchorElement = allAnchors[i];
              var link = anchorElement.href;
              if( link &amp;&amp; isImageRegex.test(link) )
              {
                  // The image tooltip will show the full image address
                  anchorElement.title = link;

                  // Create the image, giving it a border and some padding, resetting
                  // some styles and don't make it exceed 640x480 dimensions, auto-scaling it down
                  var image = document.createElement('IMG');
                  image.src = link;
                  image.style.border = 'solid 1px #ccc';
                  image.style.padding = '0px';
                  image.style.margin = '0px';
                  image.style.float = 'none';
                  image.style.maxWidth = '640px';
                  image.style.maxHeight = '480px';

                  anchorElement.appendChild( document.createElement('BR') );
                  anchorElement.appendChild(image);
                  anchorElement.appendChild( document.createElement('BR') );
              }
          }
      },
      false
  );

</code></pre>
<p><code><strong>Edit 2010-05-29: Updated for Opera 10.x</strong><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidmoore.info/2008/11/06/opera-unlinker-user-javascript/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Opera&#8217;s MAMA analyses the spread and use of web technologies</title>
		<link>http://www.davidmoore.info/2008/10/19/operas-mama-analyses-the-spread-and-use-of-web-technologies/</link>
		<comments>http://www.davidmoore.info/2008/10/19/operas-mama-analyses-the-spread-and-use-of-web-technologies/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 16:05:30 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mama]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://davidmoore.info/?p=37</guid>
		<description><![CDATA[<p>The Opera guys have created a project called MAMA &#8211; &#8220;Metadata Analysis and Mining Application&#8221;. It is designed to trawl the web and analyse what technologies and techniques are actually being used in web pages.</p>
<p>Their intial study results are in, taken from 3 and a half million URLs.</p>
<p>Interestingly, tables are still right up there with most <span style="color:#777"> . . . &#8594; Read More: <a href="http://www.davidmoore.info/2008/10/19/operas-mama-analyses-the-spread-and-use-of-web-technologies/">Opera&#8217;s MAMA analyses the spread and use of web technologies</a></span>]]></description>
			<content:encoded><![CDATA[<p>The Opera guys have created a project called <strong>MAMA</strong> &#8211; &#8220;Metadata Analysis and Mining Application&#8221;. It is designed to trawl the web and analyse what technologies and techniques are actually being used in web pages.</p>
<p>Their intial study results are in, taken from 3 and a half million URLs.</p>
<p>Interestingly, tables are still right up there with most popular tags, suggesting there are still a lot of people using tables for layouts, particularly when you see this quote:</p>
<blockquote><p>&#8220;Tables: TABLE, TR, and TD all used. Tables typically nested 3 levels deep.&#8221;</p></blockquote>
<p>Font tags are also still very popular.</p>
<p>It&#8217;s hard to tell at this point if this is because those pages are old, or if new sites are still using this style of markup.</p>
<p>Some more findings:</p>
<ul>
<li>A little over 4% of the pages passed W3C HTML validation</li>
<li>A third of the URLs used Flash. The lowest regional use of Flash is 25%, meaning at least 1 in 4 pages use Flash.</li>
<li>Nearly 3/4 of the URLs used javascript in one form or another</li>
</ul>
<p>Main article: <a title="Main Article" href="http://dev.opera.com/articles/view/mama/" onclick="javascript:pageTracker._trackPageview('/outbound/article/dev.opera.com');" target="_blank">http://dev.opera.com/articles/view/mama/</a><br />
Key Findings: <a title="Key Findings" href="http://dev.opera.com/articles/view/mama-key-findings/" onclick="javascript:pageTracker._trackPageview('/outbound/article/dev.opera.com');" target="_blank">http://dev.opera.com/articles/view/mama-key-findings/</a><br />
The average web page: <a title="The average web page" href="http://dev.opera.com/articles/view/mama-the-average-web-page/" onclick="javascript:pageTracker._trackPageview('/outbound/article/dev.opera.com');" target="_blank">http://dev.opera.com/articles/view/mama-the-average-web-page/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidmoore.info/2008/10/19/operas-mama-analyses-the-spread-and-use-of-web-technologies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

