-
-
Save nog/92274 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<Module> | |
<ModulePrefs title="コピペ運動会最新のコピペ" | |
description="コピペ運動会最新のコピペ" | |
height="100" scrolling="true"> | |
<Require feature="opensocial-0.8" /> | |
<Require feature="dynamic-height"/> | |
</ModulePrefs> | |
<Content type="html" view="canvas,profile,home"><![CDATA[ | |
<style type="text/css"> | |
#content {font-size: 11px;} | |
#content div {white-space: nowrap;overflow: hidden;margin-top:5px;} | |
a:link {color: #258FB8;} | |
a:visited {color: #258FB8;} | |
a:hover {color: #996600;} | |
a:active {color: #996600;} | |
a:focus {color: #996600;} | |
</style> | |
<script type="text/javascript"> | |
var url = "http://copipe.cureblack.com/latest.xml"; | |
var num = 10; | |
var params = []; | |
params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET; | |
params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.NONE; | |
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.FEED; | |
params[gadgets.io.RequestParameters.NUM_ENTRIES] = num; | |
var callback = function(res) { | |
if(res.errors.size > 0){ | |
alert("エラーが発生しました") | |
} | |
var html = ""; | |
for(var i=0;i<res.data.Entry.length; i++) { | |
var entry = res.data.Entry[i]; | |
html += "<div>"; | |
html += "<a href='" + entry.Link + "' target='_blank'>" | |
+ entry.Title | |
+ "</a>"; | |
html += "</div>"; | |
} | |
var box = document.getElementById("content"); | |
box.innerHTML = html; | |
}; | |
</script> | |
<div id="content"></div> | |
<script type="text/javascript"> | |
gadgets.io.makeRequest(url, callback, params); | |
</script> | |
]]></Content> | |
</Module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment