A little extension to filter out reminder spam from the front page of FA.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

22 lines
609 B

  1. "use strict";
  2. function fa_filter_execute(blacklist) {
  3. console.log(blacklist);
  4. const gallery = document.querySelector("#gallery-frontpage-submissions");
  5. const submissions = gallery.querySelectorAll("figure");
  6. submissions.forEach(sub => {
  7. const title = sub.querySelector("figcaption > p > a").title.toLowerCase();
  8. if (blacklist.some(word => title.indexOf(word) != -1)) {
  9. gallery.removeChild(sub);
  10. } else if (sub.style.display == "none") {
  11. sub.style.display = "";
  12. }
  13. });
  14. _reflow_gallery(gallery);
  15. }