• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Hide Forum Threads - A Tampermonkey script for hiding unwanted GAF threads

terrisus

Member
Well, I currently have 50% of the threads on the main Off Topic page hidden...
Yeah, this thing is pretty amazing.
 

JeTmAn81

Member
Well, I currently have 50% of the threads on the main Off Topic page hidden...
Yeah, this thing is pretty amazing.

Heh, I need to get it to pull threads from additional pages so you don't end up with a hugely reduced thread count. It's just a question of how to do it without slowing down the page load too much.
 

terrisus

Member
Heh, I need to get it to pull threads from additional pages so you don't end up with a hugely reduced thread count. It's just a question of how to do it without slowing down the page load too much.

Honestly, it's not even that big a deal.
(Although that would be handy as well)

Just, not having to deal with all that clutter is amazing.
 

dofry

That's "Dr." dofry to you.
Now I really want the mobile version because when I use it after browsing on a laptop, the main pages are so cluttered with threads.

I am using iPhone so I hope there is a way to get the code working there too. I plan on buying an Android phone some time next year, so if the mobile version is for that, I'm all good.

For Firefox:
1. Install GreaseMonkey https://addons.mozilla.org/fI/firefox/addon/greasemonkey/
2. Click Tools -> Greasemonkey -> New User Script
3. Give it a name e.g. 'Hide Forum Threads' and click OK.
4. Copy-paste code from OP to the new window.
5. Restart browser. Voila.
6. Thank OP for his great work
 

lednerg

Member
Thought I'd share an alternate concept for the placement of the hide links I played around with while logged out.

http://abload.de/img/democapturepzr17.gif

See the Stylish userstyle here. it's not linked to the Javascript so it's only for display tests, but it could be nice.

I just whipped up a similar thing that puts an 'x' link in the top left corner. It's only visible when hovering nearby. It can't differentiate between Hide or Show, though, since it only looks at the id of the link. Everybody is welcome to use/modify this.

Code:
.threadbit > td > a[id^="RemoveThread"]:before {
  content: "x";
  font-size: 10pt;
}
.threadbit > td > a[id^="RemoveThread"] {
  position: absolute !important;
  margin-left: -11px;
  margin-top: -38px;
  font-size: 0pt;
  visibility: hidden !important;
}
.threadbit > td:hover > a[id^="RemoveThread"] {
 visibility: visible !important; 
}
 

terrisus

Member
Random suggestion: A "recently hid" option which would show, say, the past 10 threads that you hid.

Don't know how feasible it is, but it would make it much easier to unhide threads that you accidentally hid.
 

terrisus

Member
And right now there are only 12/40 threads (30%) visible on the front page of OT



These comments aren't to say anything needs to be changed - I know it's been mentioned about pulling threads from the next page to populate the first page... I really don't care too much about that, I don't mind clicking onto the other page.

These comments are to highlight how awesome this script is, because there's just so much useless/pointless stuff that stays on the main boards, and this actually lets one browse just seeing the stuff that's actually interesting, without having to wade through all that other stuff.

I love this =)
 

Schrade

Member
Any chance you could tack the "Hide" text onto the beginning or end of the Subject rather than somewhere where it affects the layout?
 

Rest

All these years later I still chuckle at what a fucking moron that guy is.
This looks like it could be very good. I'll keep an eye on this thread for further developments.
 

JeTmAn81

Member
About to post an update that pulls threads from additional pages and offers some setting toggles, will look into adding the option to change the hide link position and anything else that makes sense. I'm encouraged by the positive feedback and change suggestions.
 

terrisus

Member
Awesome. That'll make things even better.

I've had times when the main page of OT is down to like 10 threads. It makes browsing GAF so much easier not having to wade through 30/40 threads not being of interest.
Being able to have 40/40 threads actually be interesting will be even better.

I really love this thing.
 

GK86

Homeland Security Fail
This needs to made into a gaf feature. Or at least when you block someone, you block their threads as well. There are three people right now I would block because of their constants threads based on every fucking random thought they have.
 

JeTmAn81

Member
This is great if only I knew how to use it :(

I'll update the OP with the instructions for various browsers which have been posted.

This needs to made into a gaf feature. Or at least when you block someone, you block their threads as well. There are three people right now I would block because of their constants threads based on every fucking random thought they have.

I'll look into that.
 

JeTmAn81

Member
You might want to look into putting the script on a site such as http://openuserjs.org or http://greasyfork.org. It'll make it more convenient for people to install as well as allowing for automatic updates.

I'll definitely do this.

Why do I feel certain people will use this to block educational threads and then pop up in the usual threads with the usual ignorance...

With any luck they'll hide by keyword and then both the education and the ignorant response opportunity will pass them by.
 
maybe it's because i'm using firefox and your script is made for chrome, but the word filter doesn't seem to actually filter any words that i add to the filter list :/

maybe it has to do with whatever the difference between plain text and regular expression means?
 

HolyCheck

I want a tag give me a tag
Hmm...

Only works with the newer version of Opera...

Maybe I should consider updating >.>





Because that would make way too much sense, of course.


12? Don't do it.

I did because reddit enhancement suite stopped working for opera 12. It was a tough decision and I miss opera 12.

I miss being able to double click the title bar to add a new tab (no need to think about where I'm clicking)

I miss being able to hit ctrl enter on a log in screen and either it entering my username and pword if I only have one, or if I have multiple it would pull up a list of usernames and you could select!

And the options / customisations! All gone :(


I should go back to it, I barely touch reddit these days.
 
There's always a large number of OT megathreads in the Off-Topic front page that I can finally get rid of. Thank you so much, JeTmAn!
 

JeTmAn81

Member
Version 0.3 released, OP updated with details and link to script at GreasyFork host (]https://greasyfork.org/en/scripts/7106-hide-forum-threads). I await feedback.

maybe it's because i'm using firefox and your script is made for chrome, but the word filter doesn't seem to actually filter any words that i add to the filter list :/

maybe it has to do with whatever the difference between plain text and regular expression means?

The word filter should be working in Firefox, or at least it does when I test. I'd say stay away from regular expressions, you should be just fine with plain text filtering. Just put in any word you don't want to see threads about and it will check thread titles for that word.
 
oh, it only filters thread titles? sorry, I thought it filtered words inside of threads

it's probably working as intended then!

does anyone know of any browser plugins/scripts that do block words within web pages?
 

Foaloal

Member
V 0.3 seems to be working great on Nightly (Firefox).

I don't personally think I'll be using a word filter, but the control panel seems great and easy to use.

When the extra threads are pulled it's very slightly visible when they are added but it's really not a big deal and I'm not sure if it would be possible to prevent.

I also really like the choice to host it on a website with one click installs and everything. Should be easy enough that anybody can use it now, even if they couldn't figure out how to copy/paste a script into greasemonkey/etc. before.

Overall this is a dangerously useful script as it will make browsing GAF that much easier.
 

tcrunch

Member
After a few days of testing I have determined that this script is too useful.

MG4GzyR.png


:(
 

terrisus

Member
Question - where is the list of hidden threads saved?
Specifically, what would one have to do to transfer it onto another device/what would one had to do to ensure it doesn't get erased when reinstalling?
 

terrisus

Member
This is probably just me missing something obvious, but where's the Hide option on 0.3?

I see a small X-like thing appear a decent distance away from my mouse pointer when hovering over the GAF logo/"newest post" button by a thread, but it disappears as soon as I move toward it. Not sure if that's anything to do with it.

 

Schrade

Member
Version 0.3 released, OP updated with details and link to script at GreasyFork host (]https://greasyfork.org/en/scripts/7106-hide-forum-threads). I await feedback.



The word filter should be working in Firefox, or at least it does when I test. I'd say stay away from regular expressions, you should be just fine with plain text filtering. Just put in any word you don't want to see threads about and it will check thread titles for that word.

Any progress on moving where the Hide shows up? Or just add an X (Close link/button) to the beginning/end of a subject? Putting Hide below the NeoGAF ball increases the spacing of the thread list vertically. (I remove a lot of the white space/padding from the standard theme)
 

JeTmAn81

Member
Question - where is the list of hidden threads saved?
Specifically, what would one have to do to transfer it onto another device/what would one had to do to ensure it doesn't get erased when reinstalling?

It's stored in local storage in your browser. All modern browsers should support it (and if they don't, the script won't work). There are probably different ways of getting to local storage but in Chrome you can hit the F12 key to open up developer tools, then click Resources and there will be something on the left called Local Storage. You can expand that out to see the local storage values for Neogaf. The IgnoreList and WordList values are in there and you could just paste them in there if you installed the script on another browser.

This is probably just me missing something obvious, but where's the Hide option on 0.3?

I see a small X-like thing appear a decent distance away from my mouse pointer when hovering over the GAF logo/"newest post" button by a thread, but it disappears as soon as I move toward it. Not sure if that's anything to do with it.

Any progress on moving where the Hide shows up? Or just add an X (Close link/button) to the beginning/end of a subject? Putting Hide below the NeoGAF ball increases the spacing of the thread list vertically. (I remove a lot of the white space/padding from the standard theme)

In Firefox, it's still a Hide link because the hover X thing wasn't working correctly. In Chrome and other browsers, the X should pop up right by the GAF logo in the same row as the thread, and it shouldn't be difficult to click. Terrisus, which browser are you using?
 

terrisus

Member
In Firefox, it's still a Hide link because the hover X thing wasn't working correctly. In Chrome and other browsers, the X should pop up right by the GAF logo in the same row as the thread, and it shouldn't be difficult to click. Terrisus, which browser are you using?

Opera 12.17

Also of note I usually browse on 150% zoom.
I tried reducing it to standard 100% zoom to check and still couldn't get it to work though.

I would think just having the X at the end would work better than a "hidden, hover to show" X anyway.
 

JeTmAn81

Member
Opera 12.17

Also of note I usually browse on 150% zoom.
I tried reducing it to standard 100% zoom to check and still couldn't get it to work though.

I would think just having the X at the end would work better than a "hidden, hover to show" X anyway.

Right, I haven't tested in Opera so I'd guess it has the same problem as Firefox. I'm going to add to the settings an option to change the hide link display type to try to avoid browser differences.
 

terrisus

Member
Right, I haven't tested in Opera so I'd guess it has the same problem as Firefox. I'm going to add to the settings an option to change the hide link display type to try to avoid browser differences.

Sounds good.
Thanks for the continued awesomeness with this =)
 

JeTmAn81

Member
Sorry Terrisus, I'm having trouble getting it to detect Opera correctly so it will be awhile before I can fix it (holidays and everything). This seems to not be an issue in the latest version of Opera (the one I just downloaded), so if you're dying to keep using it in the meantime you could install that or another browser. Of course, you'd have to copy over your local storage values, but it would be doable.
 
Top Bottom