Upvote Upvoted 16 Downvote Downvoted
Better TF2Center (Desktop Notifications + Other)
1
#1
0 Frags +

Hey all, people have said others will find this useful so I'm gonna release it. It's a modified script for Tf2Center's site which has a few different features. Namely, it implements desktop notifications when a lobby gets created that matches your filters. This desktop notification can then be clicked and it will open a new tab to that specific lobby page. It also removes the debugging spam sent to the developer console. Here is a screenshot of the notifications, may not be exact depending upon updates, check bottom of post for update notes:

https://i.gyazo.com/eca034e3fd938c6fe2a098268ad86286.png

The script works by overriding tf2center's default script with my modified version, this can be accomplished by using a web request redirect to change the path from their server to a remote server. This is done easiest using a browser extension or a desktop application such as Fiddler, but I've found 'Requestly' a chrome extension or 'PourBico' a firefox addon works very well and is simple to setup. I'll detail how to use both extensions below.

Requestly method:

  1. Install Requestly here
  2. Click icon added to menu bar, in new window click the green and white + icon (top right)
  3. Select Redirect Request tile
  4. Type a name for the rule and make sure the drop down menu says 'Contains'
  5. Paste 'assets/javascript/script.min.js' into the Source URL textbox minus the quotes
  6. Paste 'https://pastebin.com/raw/751PYfiJ' into the Destination textbox
  7. Click Save and make sure it is set to active
  8. You are done, go to tf2center, should work!

PourBico method:

  1. Install PourBico here
  2. Click the penguin (?) icon added to the menu bar
  3. A popup window will open with all the GET/POST requests made since opening the popup (if any)
  4. Click clear and load tf2center in a tab, wait for the site to fully load
  5. Scroll down the list until you find a GET request that contains 'https://tf2center.com/assets/javascript/script.min.js'
  6. Click the down arrow beside that request and select 'Replace with URL'
  7. Paste 'https://pastebin.com/raw/751PYfiJ' into the textbox that appears and click outside of the textbox to save
  8. You can close this popup window now and it should work!

It's as simple as that. You should now get desktop notifications upon a lobby being created, you will also get notifications when you first loading the page for all current lobbies. Firefox is a bit buggy though and sometimes won't show the lobbies upon loading the page, but the rest of the functionality works.

There is other things you can do by modifying the script such as removing the 'players online list' as tf2center spams your client everytime a user logs in/logs out even if you are not on the main page, should reduce network usage a bit (very minor), you can also increase the 'ready up timer' from 3 minutes to virtually anything. I won't say how to do those unless its highly requested as I don't think Tf2Center would appreciate me removing/editing core features of their site.

Edit: Added more information + Screenshot..

Quick reminder about any updates I make, since it works by using pastebin, I will just update the same pastebin each time. Therefore you will receive updates as soon as you refresh your page.

V1.0.1:

  • Added Country to notification

V1.0.2:

  • Added notifications for sub slots
Hey all, people have said others will find this useful so I'm gonna release it. It's a modified script for Tf2Center's site which has a few different features. Namely, it implements desktop notifications when a lobby gets created that matches your filters. This desktop notification can then be clicked and it will open a new tab to that specific lobby page. It also removes the debugging spam sent to the developer console. Here is a screenshot of the notifications, may not be exact depending upon updates, check bottom of post for update notes:

[img]https://i.gyazo.com/eca034e3fd938c6fe2a098268ad86286.png[/img]

The script works by overriding tf2center's default script with my modified version, this can be accomplished by using a web request redirect to change the path from their server to a remote server. This is done easiest using a browser extension or a desktop application such as Fiddler, but I've found 'Requestly' a chrome extension or 'PourBico' a firefox addon works very well and is simple to setup. I'll detail how to use both extensions below.

Requestly method:
[olist]
[*] Install Requestly [url=https://chrome.google.com/webstore/detail/requestly/mdnleldcmiljblolnjhpnblkcekpdkpa?hl=en]here[/url]
[*] Click icon added to menu bar, in new window click the green and white + icon (top right)
[*] Select Redirect Request tile
[*] Type a name for the rule and make sure the drop down menu says 'Contains'
[*] Paste 'assets/javascript/script.min.js' into the Source URL textbox minus the quotes
[*] Paste 'https://pastebin.com/raw/751PYfiJ' into the Destination textbox
[*] Click Save and make sure it is set to active
[*] You are done, go to tf2center, should work!
[/olist]

PourBico method:
[olist]
[*] Install PourBico [url=https://addons.mozilla.org/en-us/firefox/addon/pourbico/]here[/url]
[*] Click the penguin (?) icon added to the menu bar
[*] A popup window will open with all the GET/POST requests made since opening the popup (if any)
[*] Click clear and load tf2center in a tab, wait for the site to fully load
[*] Scroll down the list until you find a GET request that contains 'https://tf2center.com/assets/javascript/script.min.js'
[*] Click the down arrow beside that request and select 'Replace with URL'
[*] Paste 'https://pastebin.com/raw/751PYfiJ' into the textbox that appears and click outside of the textbox to save
[*] You can close this popup window now and it should work!
[/olist]

It's as simple as that. You should now get desktop notifications upon a lobby being created, you will also get notifications when you first loading the page for all current lobbies. Firefox is a bit buggy though and sometimes won't show the lobbies upon loading the page, but the rest of the functionality works.

There is other things you can do by modifying the script such as removing the 'players online list' as tf2center spams your client everytime a user logs in/logs out even if you are not on the main page, should reduce network usage a bit (very minor), you can also increase the 'ready up timer' from 3 minutes to virtually anything. I won't say how to do those unless its highly requested as I don't think Tf2Center would appreciate me removing/editing core features of their site.

Edit: Added more information + Screenshot..

Quick reminder about any updates I make, since it works by using pastebin, I will just update the same pastebin each time. Therefore you will receive updates as soon as you refresh your page.

[b]V1.0.1:[/b]
[list]
[*] Added Country to notification
[/list]
[b]V1.0.2:[/b]
[list]
[*] Added notifications for sub slots
[/list]
2
#2
7 Frags +

WHO IS NOT READY

WHO IS NOT READY
3
#3
0 Frags +

neat

neat
4
#4
0 Frags +
janedoeWHO IS NOT READY

I can't hear anymore because of that being so loud.
rip my ability to hear flanking scouts.

[quote=janedoe]WHO IS NOT READY[/quote]
I can't hear anymore because of that being so loud.
rip my ability to hear flanking scouts.
5
#5
0 Frags +

Anybody have a preference between Requestly and PourBico?

I'm trying to keep my Chrome usage low

Anybody have a preference between Requestly and PourBico?

I'm trying to keep my Chrome usage low
6
#6
0 Frags +
drakAnybody have a preference between Requestly and PourBico?

I'm trying to keep my Chrome usage low

Both achieve the same thing, use whichever browser you prefer.

[quote=drak]Anybody have a preference between Requestly and PourBico?

I'm trying to keep my Chrome usage low[/quote]

Both achieve the same thing, use whichever browser you prefer.
Please sign in through STEAM to post a comment.