使用 Greasemonkey 删除转发次数少于 3 次的推文
Remove tweets with less than 3 retweets with Greasemonkey
到目前为止我有这个代码:
$('.js-stream-item:has(span.ProfileTweet-action--retweet:has(span.ProfileTweet-actionCount[data-tweet-stat-count="0"]))').toggle();
它工作正常,但只删除转发为 0 的推文,我如何根据条件使用属性 "data-tweet-stat-count"?
提前致谢。
我想你可以这样做:
$('div.stream-item-footer:has(span.action-retweet:has(span.actionCount))').filter(function() {
return parseInt($(this).find('span.actionCount').attr('data-tweet-stat-count')) >= 3;
}).toggle();
到目前为止我有这个代码:
$('.js-stream-item:has(span.ProfileTweet-action--retweet:has(span.ProfileTweet-actionCount[data-tweet-stat-count="0"]))').toggle();
它工作正常,但只删除转发为 0 的推文,我如何根据条件使用属性 "data-tweet-stat-count"?
提前致谢。
我想你可以这样做:
$('div.stream-item-footer:has(span.action-retweet:has(span.actionCount))').filter(function() {
return parseInt($(this).find('span.actionCount').attr('data-tweet-stat-count')) >= 3;
}).toggle();