Minimizes all posts your friends didn't post (friend liked, friend commented, friend attends...)
< Valutazione su Facebook Filter
Figured out how to edit a post.
Hi, thanks you for your suggestions!
I updated my script with your keywords update, I didn't notice the "link in title" update :-)
As for the other changes, well...
The timeout tweak can sometimes be tricky, as on slow connection your filter can be triggered before the posts are loaded, which I guess you found out, since you added three separate timeouts for the filter... This can severely impact the performance on some machines, so I will not use it...
Political filters - obviously just a personal matter.
And, last but not least, maxScrolled tweak - this can be harmful even, since Facebook can load new posts on top of your page without reloading - so if you scroll back to the top for the new posts, filters will not work for those.
So I'll stick with just the keyword update, which, I admit, is critical.
Thanks once again for your input, it's been fun to do the code review on your version of the script, it's nice to see some active user here :-)
I also left out the "mention", "tag" and "follow" keywords, since I personally want to see those posts, but it's good for others to see this can be done, if anyone wants to filter more post types.
Another keyword change on Facebook. "are now friends".
The .contains(s) function is unnecessary, as .includes(s) does the same thing and is built into javascript.
Also, I fixed the multiple filter. Now instead of scanning everything that was not minimized every time you scroll, it does a maximum of 5 times every 600 milliseconds. 5 times may be more than needed. You can easily change the number of times it filters and the timeout between filters, but filtering once is not enough.
I added code to stop posts related to the user from being filtered. I haven't tested this much, but I didn't like that when people reply to you, it counts as spam.
Accidentally had a space after " now friends".
There was a 'commented on this' post that slipped through the filter because it was placed in a 'div._5g-l' instead of a 'h5'. In both cases, it was others commenting on their own post.
Also filtered out the 'People you may know'.
Modified the script a bit
I noticed that the script does not always filter correctly.
I changed it so that the only posts it does not re-filter are the minimized ones.
Some filters no longer work, e.g. " replied to a comment on this." no longer works because the word "comment" is a link. " replied to a " works fine though.
I added some stuff to the filter e.g. " was mentioned in a ", " followed "...
I modified the filter so that you can filter out certain words from the entire post, not just the "title". E.g. I filter out political U.S. posts.
I removed the Czech stuff, but that can easily be added back in.
Does not work with this other script, https://greasyfork.org/en/scripts/26018-facebook-auto-most-recent-stories