extension/script.js
/**
 * Processes an array of feed-style tweets and applies ratio bars if needed.
 * @param {HTMLElement[]} tweets The tweets to process.
 */
Processes an array of feed-style tweets and applies ratio bars if needed.
@param {HTMLElement[]} tweets The tweets to process.
Processes an array of feed - style tweets and applies ratio bars if needed . @param { HTMLElement [] } tweets The tweets to process .
function handleFeed(tweets) {
    tweets.forEach(tweet => {
        tweet.setAttribute(ATTR_TOUCHED, "true"); 
        const tweetContent = tweet.querySelector(TWEET_CONTENT_SELECTOR);
        const ratios = calculateFeedTweetScores(tweet);
        if (ratios.bailout) {
            console.error("Couldn't apply tweet ratios:", ratios.msg);
            return;
        }
        checkAndApplyRatioBar(tweetContent, ratios, OPTIONS.scoring);
    });
}
function handleFeed ( tweets ) { tweets . forEach ( tweet => { tweet . setAttribute ( ATTR_TOUCHED , "true" ) ; const tweetContent = tweet . querySelector ( TWEET_CONTENT_SELECTOR ) ; const ratios = calculateFeedTweetScores ( tweet ) ; if ( ratios . bailout ) { console . error ( "Couldn't apply tweet ratios:" , ratios . msg ) ; return ; } checkAndApplyRatioBar ( tweetContent , ratios , OPTIONS . scoring ) ; } ) ; }
Processes an array of feed-style tweets and applies ratio bars if needed.
Processes an array of feed - style tweets and applies ratio bars if needed .
// Further passes will disregard this tweet now. // Pseudo error handling. // Append element if necessary.