使用脚本显示最新推文,而不显示@replies
Show latest tweet with script without showing @replies
我正在使用 http://tweet.seaofclouds.com/中的脚本在网站上显示最新推文,代码示例 7 显示了如何使用它来显示推文而不显示@replies,我试过这个,但它不起作用。当我这样做时,它只是不显示任何内容。
另外,我如何对其进行重新排序,以便tweet_time在推文之后显示?
谢谢!
工作正常的代码,只显示最新的推文:
<script type='text/javascript'>
jQuery(function($){
$(".tweet").tweet({
username: "fearofmobs",
join_text: "auto",
count: 1,
auto_join_text_default: "",
auto_join_text_ed: "we",
auto_join_text_ing: "we were",
auto_join_text_reply: "we replied to",
auto_join_text_url: "we were checking out",
loading_text: "loading tweets..."
});
});
我想使用的代码应该省略@replies,但什么都不显示:
<script type='text/javascript'>
jQuery(function($){
$("#filter").tweet({
count: 1,
fetch: 20,
filter: function(t){ return ! /^@'w+/.test(t.tweet_raw_text); },
username: "fearofmobs"
});
});
这个jsFiddle看起来像你想要的 - 我做对了吗?
jQuery(function($){
$(".tweet").tweet({
username: "fearofmobs",
join_text: "auto",
count: 20,
auto_join_text_default: "",
auto_join_text_ed: "we",
auto_join_text_ing: "we were",
auto_join_text_reply: "we replied to",
auto_join_text_url: "we were checking out",
loading_text: "loading tweets...",
fetch: 20,
filter: function(t){ return ! /^@'w+/.test(t.tweet_raw_text); }
});
});
相关文章:
- 从桌面读取python文件时高亮显示代码
- 使用JS如何动态更改显示的html文件中的文本背景颜色
- 如何在生成下载文件时显示加载动画
- React重新渲染但未显示正确的组件
- nodejs-expressjs上传图像并显示它们
- 使用JSP从服务器检索和显示图像
- 音频控件在mouseover上显示,在mouseout上淡出
- 让文本输入幻灯片显示输入时的新文本输入?然后向后滑动
- 使用电话间隙在Android应用程序中显示SQL Lite的数据
- 显示5秒后隐藏潜水
- 画廊图像未显示
- 不显示带有本地json文件数据的谷歌地图脚本
- 如何将json数据显示为html
- 谷歌地图不是以HTML显示,而是在JS Fiddle上工作
- Windows8应用程序(html&Javascript):从图片库(除了文件选择器)显示图像的另一种方式
- 高亮显示时编辑文本大小和颜色
- 有时数据是't显示在浏览器中
- 当鼠标悬停在文本中的单词上时显示警报
- 角度图表;t显示在我的页面中
- 使用脚本显示最新推文,而不显示@replies