Javascript 在脚本中调整图像大小
如何让此脚本将图像大小调整为宽200px高90px 我已经调整了脚本几次,但当我可以得到我想要的图像尺寸的图像质量是可怕的 有人知道在哪里改变图像大小吗Javascript 在脚本中调整图像大小,javascript,jquery,image,blogger,Javascript,Jquery,Image,Blogger,如何让此脚本将图像大小调整为宽200px高90px 我已经调整了脚本几次,但当我可以得到我想要的图像尺寸的图像质量是可怕的 有人知道在哪里改变图像大小吗 <div id="feed-list-container"></div> <div style="clear:both;"></div> <script type="text/javascript"> var multiFeed = { feedsUri: [
<div id="feed-list-container"></div>
<div style="clear:both;"></div>
<script type="text/javascript">
var multiFeed = {
feedsUri: [
{
name: "Judul Widget 1",
url: "https://elfenliedbrazil.blogspot.com/",
tag: ""
},
{
name: "Judul Widget 2",
url: "",
tag: ""
},
{
name: "Judul Widget 1",
url: "",
tag: ""
}
],
numPost: 10,
showThumbnail: true,
showSummary: true,
summaryLength: 80,
titleLength: "auto",
thumbSize: 200,
containerId: "feed-list-container",
readMore: {
text: "Selengkapnya",
endParam: "?max-results=20"
}
};
</script>
<script type='text/javascript'>
//<![CDATA[
// Multi Feed Loader Script by Taufik Nurrohman
// URL: http://www.dte.web.id, https://plus.google.com/108949996304093815163/about
var mf_defaults={feedsUri:[{name:"Posting JQuery",url:"http://www.dte.web.id",tag:"JQuery"},{name:"Posting CSS",url:"http://www.dte.web.id",tag:"CSS"},{name:"Widget-Widget Blogger",url:"http://www.dte.web.id",tag:"Widget"}],numPost:4,showThumbnail:true,showSummary:true,summaryLength:80,titleLength:"auto",thumbSize:200,newTabLink:false,containerId:"feed-list-container",listClass:"list-entries",readMore:{text:"More",endParam:"?max-results=20"},autoHeight:false,current:0,onLoadFeed:function(a){},onLoadComplete:function(){},loadFeed:function(c){var d=document.getElementsByTagName("head")[0],a=document.getElementById(this.containerId),b=document.createElement("script");b.type="text/javascript";b.src=this.feedsUri[c].url+"/feeds/posts/summary"+(this.feedsUri[c].tag?"/-/"+this.feedsUri[c].tag:"")+"?alt=json-in-script&max-results="+this.numPost+"&callback=listEntries";d.appendChild(b)}};for(var i in mf_defaults){mf_defaults[i]=(typeof(multiFeed[i])!==undefined&&typeof(multiFeed[i])!=="undefined")?multiFeed[i]:mf_defaults[i]}function listEntries(q){var p=q.feed.entry,c=mf_defaults,h=document.getElementById(c.containerId),a=document.createElement("div"),d="",l=c.feedsUri.length,n,k,m,g;for(var f=0;f<c.numPost;f++){if(f==p.length){break}n=(c.titleLength!=="auto")?p[f].title.$t.substring(0,c.titleLength)+(c.titleLength<p[f].title.$t.length?"…":""):p[f].title.$t;m=("summary" in p[f])?p[f].summary.$t.replace(/<br ?\/?>/g," ").replace(/<.*?>/g,"").replace(/[<>]/g,""):"";m=(c.summaryLength<m.length)?m.substring(0,c.summaryLength)+"…":m;g=("media$thumbnail" in p[f])?'<img src="'+p[f].media$thumbnail.url.replace(/\/s72(\-c)?\//,"/s"+c.thumbSize+"-c/")+'" style="width:'+c.thumbSize+"px;height:"+c.thumbSize+'px;">':'';for(var e=0,b=p[f].link.length;e<b;e++){k=(p[f].link[e].rel=="alternate")?p[f].link[e].href:"#"}d+='<div class="post hentry"'+(!c.autoHeight?' style="height'+c.thumbSize+'px;overflow:hidden;"':"")+">";d+=(c.showThumbnail)?g:"";d+='<div class="post-title entry-title"><a href="'+k+'"'+(c.newTabLink?' target="_blank"':"")+">"+n+"</a></div>";d+='<div class="summary">';d+="<span"+(!c.showSummary?' style="display:none;"':"")+">";d+=(c.showSummary)?m:"";d+="</span></div>";d+='<span style="display:block;clear:both;"></span></div>'}d+="";d+='<div class="more-link"><a href="'+c.feedsUri[c.current].url.replace(/\/$/,"")+"/search/label/"+c.feedsUri[c.current].tag+c.readMore.endParam+'"'+(c.newTabLink?' target="_blank"':"")+">"+c.readMore.text+"</a></div>";a.className=c.listClass;a.innerHTML='<div class="main-title"><h4>'+c.feedsUri[c.current].name+"</h4></div>"+d;h.appendChild(a);c.onLoadFeed(c.current);if((c.current+1)<l){c.loadFeed(c.current+1)}if((c.current+1)==l){c.onLoadComplete()}c.current++}mf_defaults.loadFeed(0);
//]]>
</script>
var多种子={
feedsUri:[
{
名称:“Judul Widget 1”,
url:“https://elfenliedbrazil.blogspot.com/",
标签:“
},
{
名称:“Judul Widget 2”,
url:“”,
标签:“
},
{
名称:“Judul Widget 1”,
url:“”,
标签:“
}
],
numPost:10,
是的,
小结:没错,
总长度:80,
标题长度:“自动”,
拇指尺寸:200,
containerId:“提要列表容器”,
阅读更多:{
文本:“Selengkapnya”,
endParam:“最大结果=20”
}
};
///g、 “”)。替换(//g,“”)。替换(//[]/g,“”:“”);m=(c.summaryLength试试这个
var多种子={
feedsUri:[
{
名称:“Judul Widget 1”,
url:“https://elfenliedbrazil.blogspot.com/",
标签:“
},
{
名称:“Judul Widget 2”,
url:“”,
标签:“
},
{
名称:“Judul Widget 1”,
url:“”,
标签:“
}
],
numPost:10,
是的,
小结:没错,
总长度:80,
标题长度:“自动”,
拇指尺寸:200,
containerId:“提要列表容器”,
阅读更多:{
文本:“Selengkapnya”,
endParam:“最大结果=20”
}
};
/*/g、 “”)。替换(//g,“”)。替换(//[]/g,“”:“”);
m=(c.总长度
更改:
/s“+c.thumbSize+”-c/
至/w“+c.thumbWidth+”-h“+c.thumbHeight+”-c/
还有一些出现c.thumbSize
的代码您测试了吗?随着更改,脚本停止工作。变量thumbHeight
中有一个错误,它现在应该可以工作了,我没有完整的代码,所以我无法尝试,在这里测试代码你可以实时看到更改测试我放在这里的第一个代码带有更改的代码在这个网站上不起作用,但是当在blogger上测试它时,我得到以下错误消息:第514行第140列:对实体“max-results”的引用必须以“;”结尾定界符。