きんモザルーレット

  • /*
     * @title きんモザルーレット
     * @description TV『きんいろモザイク』の公式サイト(http://www.kinmosa.com/)でルーレットをします
     * @include http://www.kinmosa.com/
     * @license NYSL
     * @require 
     */
    
    (function(){
        var timer = -1;
        var i = 0;
        var button = $("<a href='#'>").css("font-size","32px").text("START");
        var imgs = $(".main-visual [class^=c] img");
        button.on("click", function(evt){
            evt.preventDefault();
            if(timer < 0) {
                timer = setInterval(function(){
                    imgs.css("opacity",0.5).eq(i++%5).css("opacity",1);
                },50);
                $(this).text("STOP");
            } else {
                clearInterval(timer);
                timer = -1;
                $(this).text("START");
            }
        });
        
        $("header").prepend($("<div>").css({"text-align":"center", "padding-top":"10px"}).append(button));
    })();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/07/13 18:28:59 - 2014-07-13
  2. 2014/07/13 18:26:18 - 2014-07-13
  3. 2014/07/13 18:25:01 - 2014-07-13