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.
 
 
 

27 lines
663 B

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