nie dzia艂a
czemu?
// ==UserScript==
// @name Hide posts and topics from user on kafeteria.pl
// @description Hides posts and topics from a specified user on kafeteria.pl forum.
// @version 0.1
// @grant GM_addStyle
// @match https://*.kafeteria.pl/*
// ==/UserScript==
(function() {
// Get the user ID of the user whose posts and topics you want to hide.
var userId = "antyle偶ak";
// Function to hide posts and topics.
function hidePostsAndTopics() {
var posts = document.querySelectorAll('.cPost[data-author="' + userId + '"]');
var topics = document.querySelectorAll('.ipsDataItem[data-author="' + userId + '"]');
// Hide posts by the user.
for (var i = 0; i < posts.length; i++) {
posts[i].style.display = "none";
}
// Hide topics started by the user.
for (var j = 0; j < topics.length; j++) {
topics[j].style.display = "none";
}
}
// Check if the page has finished loading and run the hide function.
if (document.readyState === "complete") {
hidePostsAndTopics();
} else {
window.addEventListener("load", hidePostsAndTopics);
}
// Add custom styles to hide the elements visually.
GM_addStyle(`
.cPost[data-author="${userId}"], .ipsDataItem[data-author="${userId}"] {
display: none !important;
}
`);
})();