Skip to content

Instantly share code, notes, and snippets.

@cgrusden
Created September 11, 2012 07:00
Show Gist options
  • Select an option

  • Save cgrusden/3696556 to your computer and use it in GitHub Desktop.

Select an option

Save cgrusden/3696556 to your computer and use it in GitHub Desktop.
Add images to model mayhem with this bookmarklet-ish
javascript:(function(){
_my_script=document.createElement('SCRIPT');
_my_script.type='text/javascript';
_my_script.src='https://raw.github.com/gist/3696556/5ca9ff6c6c386ea8ca7ed4568abb3f2b33160d98/model_mayhem.js?';
document.getElementsByTagName('head')[0].appendChild(_my_script);
})();
function get_url(id) {
$.get("http://www.modelmayhem.com/"+id, {async:false, dataType:"text"}, function(data) {
url = $(data).find('.big_image').attr("src");
$(".profile_photo_"+id).attr("src", url);
});
}
$("span a.camlink").each(function(elem) {
profile_id = $(this).attr("numotherid");
img = $(document.createElement("img"));
img.addClass("big_image");
img.addClass("profile_photo_"+profile_id)
$(this).parent().append(img);
get_url(profile_id);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment