【问题标题】:Remove tweets with less than 3 retweets with Greasemonkey [duplicate]使用 Greasemonkey 删除转发次数少于 3 次的推文 [重复]
【发布时间】:2015-07-09 21:36:33
【问题描述】:

到目前为止,我有这个代码:

$('.js-stream-item:has(span.ProfileTweet-action--retweet:has(span.ProfileTweet-actionCount[data-tweet-stat-count="0"]))').toggle();

它工作正常,但只删除 0 转推的推文,我如何按条件使用属性“data-tweet-stat-count”?

提前致谢。

【问题讨论】:

    标签: greasemonkey


    【解决方案1】:

    我认为你可以这样做:

    $('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();
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-10-25
    • 2015-03-24
    • 2017-03-13
    • 2023-04-05
    • 1970-01-01
    • 2015-12-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多