|
|
|
@@ -1,20 +1,6 @@ |
|
|
|
"use strict"; |
|
|
|
|
|
|
|
const gallery = document.querySelector("#gallery-frontpage-submissions"); |
|
|
|
const submissions = gallery.querySelectorAll("figure"); |
|
|
|
|
|
|
|
const blacklist = [ |
|
|
|
"ych", |
|
|
|
"adopt", |
|
|
|
"reminder", |
|
|
|
"auction" |
|
|
|
] |
|
|
|
|
|
|
|
submissions.forEach(sub => { |
|
|
|
const title = sub.querySelector("figcaption > p > a").title.toLowerCase(); |
|
|
|
console.log(title); |
|
|
|
|
|
|
|
if (blacklist.some(word => title.indexOf(word) != -1)) { |
|
|
|
gallery.removeChild(sub); |
|
|
|
} |
|
|
|
}); |
|
|
|
const script = document.createElement("script"); |
|
|
|
script.src = chrome.extension.getURL("inject.js"); |
|
|
|
(document.head || document.documentElement).appendChild(script); |
|
|
|
script.onload = script.remove; |