Skip to content

Instantly share code, notes, and snippets.

@moskowite
Created April 12, 2012 20:44
Show Gist options
  • Save moskowite/2370867 to your computer and use it in GitHub Desktop.
Save moskowite/2370867 to your computer and use it in GitHub Desktop.
http://blogs.oreilly.com/makedeal/shed.js
var newcontent = document.createElement('p');
newcontent.id = 'js-shed-homepage';
newcontent.appendChild(document.write('<MTEntries lastn="1" sort_order="descend"><div id="dotd"><img src="<MTentrydatadotd_image>" alt="<MTentrydatadotd_product_title>" /><h4><MTentrydatadotd_product_title></h4></div></mtentries>'));
var scr = document.getElementById('maker-shed-grabber');
scr.parentNode.insertBefore(newcontent, scr);
http://blog.makezine.com/mshomepagewidget/
var newcontent = document.createElement('p');
newcontent.id = 'js-shed-homepage';
newcontent.appendChild(document.write('<div id="dotd">
<img width="300" height="225" src="http://makezineblog.files.wordpress.com/2012/04/mkad20-2t.jpg?w=300" class="attachment-medium wp-post-image" alt="MKAD20-2T" title="MKAD20-2T" /> <h4>Drawdio Fun&nbsp;Pack</h4>
</div>'));
var scr = document.getElementById('maker-shed-grabber');
scr.parentNode.insertBefore(newcontent, scr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment