makebooth x300

  • /*
     * @title makebooth x300
     * @description makebooth x300
     * @include http://diy.makebooth.com/DIY/
     * @license MIT License
     * @require 
     */
    
    var script = document.createElement('script');
    script.textContent = '(' + (function () {
    
    $.getJSON("http://diy.makebooth.com/js/people.json",function(a){people=a.urls});var ichi=0;var win_height,win_width,tmp_top,tmp_left,gen_top,gen_left,intervalID;var min_top=250;var max_top=520;var min_left=$(window).width()/2-220;var max_left=$(window).width()/2+220;gen_top=function(){win_height=$(window).height();tmp_top=Math.floor(Math.random()*win_height);return tmp_top};gen_left=function(){win_width=$(window).width();tmp_left=Math.floor(Math.random()*win_width)-15;return tmp_left};intervalID=setInterval(function(){var a=gen_top();var b=gen_left();while(a>min_top&&a<max_top&&b>min_left&&b<max_left){var a=gen_top();var b=gen_left()}$("#people").append('<img src="'+people[ichi]+'" style="top:'+a+"px;left:"+b+'px;"/>');ichi+=1;if(ichi>people.length-1){clearInterval(intervalID)}},1)
    
    }).toString() + ')();';
    document.body.appendChild(script);
    document.body.removeChild(script);
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2012/07/13 01:21:42 - 2012-07-13