現在のスパムの大洪水を修正


Grease Monkeyなどを使用する場合は、このユーザースクリプトを使用して、フィードの現在のスパム投稿をフィルタアウトできます.
// ==UserScript==
// @name     dev.to spam filter
// @version  1
// @include  http*
// @match    *://dev.to/*
// @grant    none
// @run-at   document-end
// ==/UserScript==

const dev_posts = document.body;

const config = { attributes: false, childList: true, subtree: true };

const callback = function(mutationsList, observer) 
{

  for(const mutation of mutationsList) 
  {
    if (mutation.type === 'childList') 
    {
      let posts = document.querySelectorAll('article');

      posts.forEach(post =>
      {
        const title = post.querySelector('.crayons-story__title a');
        if(title.innerHTML.replace(/\n/g, '').match(/customer.*care.*number/i))
        {
          post.parentElement.removeChild(post);
          console.log('removed post')
        }
      });
    }
  }
};


// Create an observer instance linked to the callback function
const observer = new MutationObserver(callback);

// Start observing the target node for configured mutations
observer.observe(dev_posts, config);
賢い人々が本当のスパムフィルタを見ている間、明らかにこれは一時的な仕事です、しかし、私の飼料はブラウズできませんでした:D
あなたがフィルタをキックするためのハードリフレッシュを行う必要があります.
突然変異オブザーバコードのためにMDNに感謝します.