Skip to content

Instantly share code, notes, and snippets.

@Leeiio
Created December 15, 2011 06:41
Show Gist options
  • Save Leeiio/1480092 to your computer and use it in GitHub Desktop.
Save Leeiio/1480092 to your computer and use it in GitHub Desktop.
Remove your favorite tweets with links
// @name Remove your favorite tweets with links
// @description 因为我本人使用了pinboard服务自动保存带link的fav的tweets功能,所以这样的话保存的东西就重复了。twitter一份pinboard一份,所以我需要移除twitter上的带有链接的tweets。于是有了这个蛋疼的脚本。建议一直下拉到底部等加载完全部的favorite tweets之后再使用。This script can remove all your favorite tweets with links. Enjoy :D
// @author leeiio
//console版本
$(".js-stream-item").each(function(i){
var $this = $(this);
if($this.find('.js-tweet-text .twitter-timeline-link').length)
$this.find('.unfavorite').trigger('click');
})
//如果你想清除所有的 Favorates 而不仅仅只是带有 Link的那么用这个
$(".js-stream-item").each(function(i){
$(this).find('.unfavorite').trigger('click');
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment