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";
-
- _fajs.push(['fa_filter_execute']);
-
- function fa_filter_execute() {
- const gallery = document.querySelector("#gallery-frontpage-submissions");
- const submissions = gallery.querySelectorAll("figure");
-
- const blacklist = [
- "reminder",
- ]
-
- 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);
- }
|