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.
|
- "use strict";
-
- function fa_filter_execute(blacklist) {
- console.log(blacklist);
- const gallery = document.querySelector("#gallery-frontpage-submissions");
- const submissions = gallery.querySelectorAll("figure");
-
- submissions.forEach(sub => {
- const title = sub.querySelector("figcaption > p > a").title.toLowerCase();
-
- if (blacklist.some(word => title.indexOf(word) != -1)) {
- gallery.removeChild(sub);
- } else if (sub.style.display == "none") {
- sub.style.display = "";
- }
-
-
- });
-
- _reflow_gallery(gallery);
- }
|