Garry's Mod

Garry's Mod

25 ratings
How to Remove / Hide the News Feed Section of the Main Menu (Outdated as of Oct 2020)
By Piengineer12
Author's Note: This guide is now outdated as of Oct 2020 due to changes made in the HTML document. However, it will be kept for historical purposes, just in case someone somehow got a copy of the game after the Feb 2019 update, but before the Oct 2020 update.

The February 2019 update for Garry's Mod was released on the 20th of February, 2019. Additions introduced in the update included a news feed directly viewable in the main menu. It became clear quite fast that not everyone liked it, as it was fully opaque, unhideable and considerably large. This guide will show you how to permanently, or temporarily, hide the news feed.

   
Award
Favorite
Favorited
Unfavorite
Before We Begin...
First, let's talk about how the main menu works. It is not 100% Lua based, but rather, it is a combination of HTML and JavaScript (JS). Lua is only called from JS context from the HTML.

To edit the HTML, you will need a text editor. You can use Notepad++[notepad-plus-plus.org], Sublime Text[www.sublimetext.com] or Eclipse[www.eclipse.org] or any other similar program to edit the HTML. If you don't have any of the above, Notepad will still work. For the purposes of this guide, I'll be using Notepad++, though the steps will be more or less similar with other text editors.
Step 1: Open the HTML templates folder
In your Games Library, right click on Garry's Mod, then click on 'Properties'.
Navigate to the 'Local Files' tab, then hit the 'Browse Local Files...' button.
You will be in the GarrysMod folder.
Navigate to garrysmod -> html -> template. This folder contains the HTML you need to edit.
Step 2: Edit the HTML
Warning: Please make a backup of main.html first! That way, when you screw up something, you can restore the backup and try again.

Open main.html using one of the text editors mentioned. Don't open the HTML using your browser - it'll just show a broken webpage.

The file should look something like this. There is a lot of text in the file, but you don't need to interact with the whole thing.

At this point, choose whether you want to either hide the news feed, or remove the news feed altogether. Hiding the news feed allows you to easily restore it back, should you want to. Removing the news feed is much easier than hiding the news feed, and much more permanent too.
Warning: If you are using a custom HTML menu, the line numbers might be different! It is strongly recommended to hide the news feed instead of removing it if that is the case.

Option 1: Hiding the News Feed:
First, navigate to line 34 of the file. You will see the following text:
<div class='news' ng-hide="NewsList.length == 0">
Replace "<" with "<!--" in the line so that it looks like this:
<!--div class='news' ng-hide="NewsList.length == 0">
This will cause part of the HTML document to be "commented out", and may be colored differently depending on the text editor that you used.

After that, navigate to line 44 of the file. You will see the following text:
</div>
Replace ">" with "-->" in the line so that it looks like this:
</div-->
This specifies the end of the "commenting out" we are doing, which will cause the </div> at line 46 to be colored differently, depending on the text editor that you used.
After that, you're done. Save and close the file.

This option gives you the advantage of easily unhiding the news feed. To unhide the news feed, navigate to line 34 of the file. You will see the following text:
<!--div class='news' ng-hide="NewsList.length == 0">
Replace "<!--" with "<" in the line so that it looks like this:
<div class='news' ng-hide="NewsList.length == 0">
This will cause part of the HTML document to be colored back to its original color, depending on the text editor that you used. One exception is </div--> at line 44 of the file, which will show the error color.

After that, navigate to line 44 of the file. You will see the following text:
</div-->
Replace "-->" with ">" in the line so that it looks like this:
</div>
This will cause that portion of the HTML document to be colored back to its original color, depending on the text editor that you used.

After that, you're done. Save and close the file.

Option 2: Removing the News Feed:
Simply delete lines 33 to 45 of the file, then save and close the file.
Step 3: Testing the HTML + Extras
Launch Garry's Mod normally. If you don't see the news feed at the top right of your screen, it worked!

If you want the news feed back for whatever reason, just replace the edited main.html with the one you backed up. It should start to show again.

This is the first time I've ever written a guide. Hope it helps!
9 Comments
Nympheon 25 Jan, 2023 @ 9:53pm 
THANK YOU SO MUCH!
EdenianCyclone 24 Jun, 2020 @ 6:26pm 
thank you it worked for me :berserkwitch:
Artëmἱs 🎮 10 Jun, 2020 @ 8:40am 
oh simple and clean, thank you very much!
Piengineer12  [author] 7 Jun, 2020 @ 4:12am 
Thanks!

...Although it's been a long while since I've written this, now the guide doesn't actually look good and well-written in my eyes. I'm not surprised though, I basically wrote this out of anger.

There's better and easier solutions on the workshop now. I might update this guide about it.
Genius Destroyer 6 Jun, 2020 @ 2:18pm 
Two thumbs up!

thank you for making Gmod a better place!
Moonless 27 Dec, 2019 @ 11:31am 
Thank you so freaking much!
Toby55DeadMaster 24 Aug, 2019 @ 12:53am 
Amazing it work! thanks a LOT!
Piengineer12  [author] 7 Apr, 2019 @ 4:22pm 
I'm sure someone who has decent knowledge in HTML can do that. I don't have that knowledge right now, unfortunately.
Xaltra Knight 7 Apr, 2019 @ 2:42pm 
This helped alot thanks, I just wish they made it simpler by adding it in the options to remove it since its a bugger for when I edit the logo of the game and the news feed is just taking most of the space.