Here's a script to hide threads

For anyone interested, I have written a Greasemonkey/Tampermonkey script to hide selected threads. You can install it from Greasy Fork. I wrote the script so I could hide long-running threads in which I have no interest. I realize some people are quite passionate about threads they think should be moved/hidden/done away with*, but this thread isn’t the place to discuss that. I hope everyone will respect that and limit discussion to the script.

I welcome all comments and suggestions regarding the script, although I don’t promise to actually do anything with them. Please feel free to modify it on your own or snag parts of the code for your own projects.

More details: the script will add a “Hide” link to every thread in the forum display and search results pages (including New Posts). Clicking the link hides the thread immediately and in any subsequent load of the page. The script also includes a configuration page, reachable by the “Hidden Threads” link added at the end of the SDMB toolbar. On this page, you can check a box to hide all threads with [GAME] at the start of the title. The page also shows a list of all hidden threads and allows you to edit the list if desired. It was intended for the SDMB, but will work with any compatible vBulletin board - just add the domain/pages to the User Includes.

Note that I have not tested the script with large numbers of hidden threads to determine if and when there will be performance issues. I observed no issues with up to at least 300 threads hidden. The script is intended for hiding long-running threads that clutter up the display; it is not intended for hiding every thread in which you have no interest.

And the disclaimer: this is an independent, third-party effort and is not sponsored, supported, or endorsed by the SDMB.

** I was going to hold off on posting this until the mods announced a decision on Game threads, but decided it probably has value for some people beyond that limited scope.*

I’ve been wanting something like this since pretty much one, thanks for making it. I’ll give it a try at home this weekend.

This is awesome, my single most desired feature in forum software.

How do you retain perm? I looked into this once and access to perm storage was limited (maybe it was cookies, or Firefox had some extension for saving data).

Another message board I frequent, (I won’t mention its name here) has this feature installed. You can also ignore entire forums if you want. It runs the exact same version of vBulletin as the Dope. I don’t know if its a built-in function or a plug in. If its a default function of vB, it should be trivially easy to activate it. I can understand why TPTB would be reluctant to install it if it’s a plug in, though.

It uses GM_setValue and GM_getValue for persistence. These functions write the data to a SQLite database. Here’s from the Greasemonkey wiki, and a more detailed answer including the Chrome implementation. The storage is script-specific so you don’t have to worry about conflicts between scripts.

I know essentially nothing about vBulletin - I figured out this script by inspecting the page source (and borrowing code snippets off the web). I did see some references to third-party vBulletin plug-ins to do this, so I’m guessing the other board is using this approach rather than something built in to vBulletin.

Probably. And I know TPTBs attitude toward plug ins is “It might break something,” so I can understand why they don’t want to overtax the hamsters.

Will this work with Chrome? Chrome refuses to install it from the link on the page.

Props to TroutMan

I get an error

‘location’ is undefined
Code 800A11391

Any suggestions?

Chrome has become persnickety about installing anything that’s not from the Google Play Store. But if you install Tampermonkey, which is essentially ‘Greasemonkey for Chrome’, you can install the script there.

This. I wish they would turn on the thread ignore function. Some titles are just so unpleasant, or there are threads I’ve unsubscribed to but seeing the thread drags me back into a fight I’m trying to avoid.

I’ll try the script.

Thank you. And in just a few clicks, The Game Room becomes readable again.

Thank you very much. With the mods avoiding dealing with the problem of the [Game] threads in The Game Room, it’s good to have this.

Thanks for the effort TroutMan, works great.

For script newcomers, this works in Firefox or Chrome (and I guess Opera if there are still actually Opera users). For Firefox, you first need to install the Greasemonkey extension; for Chrome, install the Tampermonkey extension. With those running, you can simply click Install This Script from the Greasy Fork site.

This is the error from Internet Explorer. There are supposedly some add-ons that will allow you to run user scripts in IE, but I’m not aware of any that work consistently. If anyone has any luck with one, post it here.

Thank you *very *much, Troutman!

Well done. Thanks, Troutman.

I am a big fan of this script. Troutman is a gentleman, a scholar, and apparently a pretty decent HTML guy.

Can someone please flesh this part out a bit for me? I can’t find the configuration page.

Go to a forum page like ATMB. On the dark blue toolbar with links to User CP, Logout, etc. there should be a new link on the right labeled Hidden Threads. You won’t see it if you’re reading a thread.