ã¯ã¦ãªã«ã¯ iframe ãåãè¾¼ããªãã®ã§ããã£ããä½ã£ã Javascript ã®ã³ã³ãã³ããç°¡åã«è¦ã¦ãããäºãåºæ¥ã¾ããããããè£æ(?)ã¨ãã¦ãGoogle Gadget ãçµç±ããã¨ããæ¹æ³ãããã¾ãããã® Google Gadget ã¨ããã®ãã¡ãã£ã¨èª¿ã¹ã¦ã¿ã¾ããã
Google Gadget ã¨ã¯ã
Google Gadget ã¨ããã®ã¯ Google ã®ãã¼ã¿ã«ãµã¤ã iGoole ã«å°ããªé¨åãä»ããä»çµã¿ã§ããä½ã£ãé¨å㯠mixi çã«ãè²¼ãä»ãããããããã
Google Gadget ã®åä½åç
ã¬ã¸ã§ãã㯠Gadgets API ã«åºã¥ãã¦ä½ããã xml ãã¡ã¤ã«ã§ãããã® xml ãã¦ã§ãã«å ¬éãã¦iGoogle ãã ADD GADGET - Add feed or gadget ã§ä½ã£ã URL ãå ¥åããã¨ããªãã® iGoogle ã«ç»é²ããã¾ããã¬ã¸ã§ããã®å 容ã¯ã ãã ãæ®éã® HTML ã§ãGadget API ã¨ããã®ã使ãã¨ã¬ã¸ã§ããç¹æã®æ©è½ã使ããã¨ãåºæ¥ã¾ããã¬ã¸ã§ããã¯ç´æ¥å ¬éããå ´æããå¼ã³åºãããã®ã§ã¯ãªããä¸æ¦ google ã«ãã£ãã·ã¥ãã¾ãããªã®ã§ãç»åãã¡ã¤ã«çã¬ã¸ã§ããããåç §ãããç©ã¯çµ¶å¯¾ãã¹ãæå®ããå¿ è¦ãããã¾ãã
ã¬ã¸ã§ããã®ä½ãæ¹ã¯äºã¤ããã¾ããç°¡åãªã®ã¯ Content type="url" ã¨ã㦠URL ã§å 容ãæå®ããæ¹æ³ã§ãä¾ãã°
<?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="è¨èªã²ã¼ã " /> <Content type="url" href="http://d.hatena.ne.jp/propella/" /> </Module>
ã®ããã«ããã¨ãã®æ¥è¨ãã¬ã¸ã§ããã¨ãã¦è¡¨ç¤ºããã¾ãããã®æ¹æ³ã§æ¢åã®ã¦ã§ããã¼ã¸ããã®ã¾ã¾ã¬ã¸ã§ããã¨ãã¦ä½¿ãã¾ãããGadget API ã使ããã¨ãåºæ¥ã¾ããã
ããä¸ã¤ã¯ Content type="html" ã¨ã㦠Content ã¿ã°ã®ä¸ã«ãã¼ã¸ã®å 容ç´æ¥æ¸ãæ¹æ³ã§ã次ã®ããã«ãã¾ãã
<?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="Frank" /> <Content type="html"> <![CDATA[ <p>Hello, Frank!</p> <img src="http://metatoys.org/pub/frank.png" /> ]]> </Content> </Module>
ãã®æ¹æ³ããã ãããæ®éã® HTML ã¨åãããã«æ¸ãã¾ãã注æç¹ã¯ãã¬ã¸ã§ããã¯ä¸åº¦ google ã«ãã£ãã·ã¥ãããã®ã§ãç»åãªã©ã¯çµ¶å¯¾ãã¹ã§æ¸ãäºã§ãã
Gadget API
Content type="html" ãé¸ã¶ã¨ Gadget API ã使ããã¨ãåºæ¥ã¾ããããã§ã¦ã¼ã¶ã®æ å ±ãªãããåå¾åºæ¥ã¾ãã http://code.google.com/intl/ja/apis/gadgets/docs/reference.html ã«è©³ãã説æãããã¾ããç§ã¯ OpenSocial jQuery çµç±ã§ä½¿ãã¾ããã
OpenSocial jQuery
ç§ã¯å ã Javascript ã jQuery ç¨ã«æ¸ãã¦ããã®ã§ãçµæ§æéããããã¾ãããã¨ããã®ããGoogle Gadget ã§ã¯ã³ã³ãã³ãããã£ãã·ã¥ãããé¢ä¿ä¸ãªã¢ã¼ãã®ãªã½ã¼ã¹ãèªããªããªãããã§ããã¡ãã£ã¨ã§ãæéãæ¸ããããã« OpenSocial jQuery ã使ãã¾ããããã㯠jQuery ãæ¹é ã㦠Ajax ç³»ã®é¢æ°ãªã©ã Gadget API çµç±ã§å¼ãã§ãããã©ã¤ãã©ãªã§ããã¡ãã£ã¨å¤ãã®ã§ãããªãã¨ã¯è¡ãã¾ããã§ããããããã® Javascript ãã´ãªã´ãªæ¸ãããã¯ããã¶ã楽ã§ãããã¨ãã訳ã§ä½ã£ããã®ã
(Chrome 㨠Safari ã ãåä½ç¢ºèª)
ãã®ã¯ãã«ã¤ãã¦ã¯ä»é±ä¸ã«å¥ã®æ¥è¨ã§æ¸ãããã¨æãã¾ãã
ã¨ããã§ãGoogle ã£ã¦å²ãã¨ã±ã£ã¨ããªããµã¼ãã¹ãç°¡åã«åãå°è±¡ãããã¾ãããã® Google Gadget ãç¡ããªãã¾ããããã«ããã
åè
æ¥æ¬èªã®ä¸å¯§ãªè§£èª¬ãããã¾ãã
- ã¬ã¸ã§ããã«ã¤ãã¦: http://code.google.com/intl/ja/apis/gadgets/
- ã¬ã¸ã§ãããã§ãã«ã¼: http://www.google.com/ig/adde?moduleurl=www.google.com/ig/modules/codechecker/codechecker.xml
- OpenSocial jQuery : http://code.google.com/p/opensocial-jquery/