SeatNext Ext Bookmarklet

    @@ -5,7 +5,33 @@ * @include http://tweetvite.com/* * @license MIT License */ -function addJs(a){var b=document.createElement("script");b.type="text/javascript";b.text=a;document.body.appendChild(b)}function jsop(a){var b=document.createElement("script");b.charset="UTF-8";b.src=a;document.body.appendChild(b)} -(function(){var a=location.href;if(a!=""){addJs('function openSeatNext(d,c){for(var b="",a=0;a<d.length;a++)if(c[a]=="tid"||c[a]=="nick"){if(b!="")b+="+";if(c[a]=="nick")b+="$";b+=d[a]}location.href="http://www.seatnext.com/?import="+b};');if(a.indexOf("http://atnd.org/events/")>-1){a=a.replace("http://atnd.org/events/","");addJs('function atnd(a){var c=[],d=[];a=a.events;for(var e=0;e<a.length;e++)for(var g=a[e],f=0;f<g.users.length;f++){var b=g.users[f];if(b.status==1)if(b.twitter_id!=null){c.push(b.twitter_id);d.push("tid")}else{c.push(b.nickname);d.push("nick")}}openSeatNext(c,d)};'); -jsop("http://api.atnd.org/events/users/?event_id="+a+"&format=jsonp&callback=atnd")}else if(a.indexOf("http://tweetvite.com/event/")>-1){a=a.replace("http://tweetvite.com/event/","");addJs('function tweetvite(a){var c=[],d=[];a=a.value.items[0].guests;for(var e=0;e<a.length;e++){var b=a[e];if(b.rsvp!="N")if(b.profile.service_type=="1"){c.push(b.profile.display_name);d.push("tid")}else{c.push(b.profile.display_name);d.push("nick")}}openSeatNext(c,d)};');jsop("http://pipes.yahoo.com/pipes/pipe.run?_id=028aa9b989f4cb07f0bd066ea4d615a9&_render=json&public_id="+ -a+"&_callback=tweetvite")}}})(); +function addJs(text) { + var ele = document.createElement("script"); + ele.type = "text/javascript"; + ele.text = text; + document.body.appendChild(ele); + +} +function jsop(url) { + var s = document.createElement('script'); + s.charset = 'UTF-8'; + s.src = url; + document.body.appendChild(s) +} +( + function(){ + var url = location.href; + if (url != "") { + addJs('function openSeatNext(d,c){for(var b="",a=0;a<d.length;a++)if(c[a]=="tid"||c[a]=="nick"){if(b!="")b+="+";if(c[a]=="nick")b+="$";b+=d[a]}location.href="http://www.seatnext.com/?import="+b};'); + if (url.indexOf( "http://atnd.org/events/") > -1) { + var event_id = url.replace("http://atnd.org/events/", ""); + addJs('function atnd(a){var c=[],d=[];a=a.events;for(var e=0;e<a.length;e++)for(var g=a[e],f=0;f<g.users.length;f++){var b=g.users[f];if(b.status==1)if(b.twitter_id!=null){c.push(b.twitter_id);d.push("tid")}else{c.push(b.nickname);d.push("nick")}}openSeatNext(c,d)};'); + jsop('http://api.atnd.org/events/users/?event_id=' + event_id + '&format=jsonp&callback=atnd'); + } else if (url.indexOf( "http://tweetvite.com/event/") > -1) { + var public_id = url.replace("http://tweetvite.com/event/", ""); + addJs('function tweetvite(a){var c=[],d=[];a=a.value.items[0].guests;for(var e=0;e<a.length;e++){var b=a[e];if(b.rsvp!="N")if(b.profile.service_type=="1"){c.push(b.profile.display_name);d.push("tid")}else{c.push(b.profile.display_name);d.push("nick")}}openSeatNext(c,d)};'); + jsop('http://pipes.yahoo.com/pipes/pipe.run?_id=028aa9b989f4cb07f0bd066ea4d615a9&_render=json&public_id=' + public_id + '&_callback=tweetvite'); + } + } + } + )();
  • /*
     * @title SeatNext Ext Bookmarklet
     * @description ATND, tweetviteからSeatNextへImportするBookmarklet
     * @include http://atnd.org/*
     * @include http://tweetvite.com/*
     * @license MIT License
     */
    function addJs(text) {
        var ele = document.createElement("script");
        ele.type = "text/javascript";
        ele.text = text;
        document.body.appendChild(ele);
        
    }
    function jsop(url) {
        var s = document.createElement('script');
        s.charset = 'UTF-8';
        s.src = url;
        document.body.appendChild(s)
    }
    (
        function(){
            var url = location.href;
            if (url != "") {
                addJs('function openSeatNext(d,c){for(var b="",a=0;a<d.length;a++)if(c[a]=="tid"||c[a]=="nick"){if(b!="")b+="+";if(c[a]=="nick")b+="$";b+=d[a]}location.href="http://www.seatnext.com/?import="+b};');
                if (url.indexOf( "http://atnd.org/events/")  > -1) {
                    var event_id = url.replace("http://atnd.org/events/", "");
                    addJs('function atnd(a){var c=[],d=[];a=a.events;for(var e=0;e<a.length;e++)for(var g=a[e],f=0;f<g.users.length;f++){var b=g.users[f];if(b.status==1)if(b.twitter_id!=null){c.push(b.twitter_id);d.push("tid")}else{c.push(b.nickname);d.push("nick")}}openSeatNext(c,d)};');
                    jsop('http://api.atnd.org/events/users/?event_id=' + event_id + '&format=jsonp&callback=atnd');
                } else if (url.indexOf( "http://tweetvite.com/event/")  > -1) {
                    var public_id = url.replace("http://tweetvite.com/event/", "");
                    addJs('function tweetvite(a){var c=[],d=[];a=a.value.items[0].guests;for(var e=0;e<a.length;e++){var b=a[e];if(b.rsvp!="N")if(b.profile.service_type=="1"){c.push(b.profile.display_name);d.push("tid")}else{c.push(b.profile.display_name);d.push("nick")}}openSeatNext(c,d)};');
                    jsop('http://pipes.yahoo.com/pipes/pipe.run?_id=028aa9b989f4cb07f0bd066ea4d615a9&_render=json&public_id=' + public_id + '&_callback=tweetvite');
                }
            }
        }
        )();
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2010/10/24 09:43:50 - 2010-10-24
  2. 2010/10/23 00:57:59 - 2010-10-23
  3. 2010/10/23 00:56:21 - 2010-10-23
  4. 2010/10/23 00:40:07 - 2010-10-23
  5. 2010/10/22 13:39:23 - 2010-10-22