Google Stickam Gadget

Google Gadget作成に入門してみた。

http://tomohiro.teranishi.googlepages.com/stickam_gadget.xml

stickamブログパーツGadget。

<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs
title="Stickam Gadget"
directory_title="Stickam Gadget"
author="Tomohiro Teranishi"
author_email="tomohiro.teranishi@gmail.com"
author_location="Somewhere IN Japan"
author_link="http://d.hatena.ne.jp/tomyhero/"
>
</ModulePrefs>

<UserPref name="stickam_key" display_name="stickam key e.g.(173728785-477694-ja)" required="true"/>
<UserPref name="width" display_name="width" default_value="160" required="true"/>
<UserPref name="height" display_name="height" default_value="160" required="true"/>
<Content type="html"><![CDATA[

<div id="stickam_box">loading</div>
<script>

disp_stickam_box();

function disp_stickam_box(){
    var prefs = new _IG_Prefs(__MODULE_ID__);
    var stickam_key = prefs.getString('stickam_key') ;
    var width       = prefs.getInt('width');
    var height      = prefs.getInt('height');
    var obj = document.getElementById('stickam_box');
    obj.innerHTML = '<embed src="http://player.stickam.com/stickamPlayer/' 
                    + stickam_key 
                    + '" type="application/x-shockwave-flash" width="'
                    + width 
                    + '" height="'
                    + height
                    + '" scale="noscale" allowScriptAccess="always"></embed>'
                    ;
}

</script>


]]></Content>
</Module>