Tool Others Userscript: Followed Games / Update Checker

LenAnderson

New Member
Dec 15, 2017
12
22
Yet another update checker...

I did not want to install software just to get a list of updated games that I'm playing so I decided to write a userscript and keep everything in the browser.


With the userscript enabled you will find a Follow/Unfollow button at the top right of a game's thread.
OG6iJ2ihB3.png
Followed games show up at https://f95zone.to/followed-games where the current version can be marked as played.
chrome_LZC6NZ5kAX.png
 

MeTop

New Member
Jul 24, 2017
2
0
Since last update 1.6.2 it doesn't work anymore for me.
Was using 1.6.0 but that one got broken too. Downgraded to 1.5.0 and now it works fine, any plans to support the new layout?
 

thug73

Newbie
Jan 20, 2017
73
44
I just double checked and I'm running 1.6.0 just fine. Perhaps the site skin affects things? I'm using UI.X Dark.
 

thug73

Newbie
Jan 20, 2017
73
44
OK, I just had it fail on me too. Don't know why it took a while for me to see the error!

Fix is easy though. Edit the script in TamperMonkey or whatever you're using. Line 1563 should read:

JavaScript:
['Nutaku', 'LiveSexCams', 'LiveCamGirls'].forEach(it=>$(`[data-nav-id="${it}"]`).closest('li').remove());
Either comment this line out, like so:

JavaScript:
//['Nutaku', 'LiveSexCams', 'LiveCamGirls'].forEach(it=>$(`[data-nav-id="${it}"]`).closest('li').remove());
Or change the third item in the array, like to:

JavaScript:
['Nutaku', 'LiveSexCams', 'mfslanging'].forEach(it=>$(`[data-nav-id="${it}"]`).closest('li').remove());
This code removes the unnecessary menu entries. The menu has changed, so the script crashes. Obviously if you comment the line out then none of the menu entries get removed. Changing the line makes it behave as before, but covering the new menu item.

Cheers
 
  • Like
Reactions: MeTop

MeTop

New Member
Jul 24, 2017
2
0
Thanks a lot.

Updated to 1.6.2 again and tried modifying the script but it was still broken, commenting the line fixed it.

I'm using the old layout too, on the new one, the follow button doesn't work.
 

sexybastardo

Member
Modder
Jul 15, 2017
129
418
LenAnderson This doesn't work for me at least.

After adding some games and marked them as played, other games got unfollowed - this is not usable.

Additionally I get the following error message in the console:
caught TypeError: event.cancelBubble is not a function
at HTMLDocument.bringBackDefault (new_rightclick.js:87:31)

I'm using the newest version of brave.
 

LenAnderson

New Member
Dec 15, 2017
12
22
LenAnderson This doesn't work for me at least.

After adding some games and marked them as played, other games got unfollowed - this is not usable.

Additionally I get the following error message in the console:
caught TypeError: event.cancelBubble is not a function
at HTMLDocument.bringBackDefault (new_rightclick.js:87:31)

I'm using the newest version of brave.
Never experienced games getting unfollowed unintentionally. Can you reproduce this?

The console error does not look like it has anything to do with this userscript. A cursory google search for the script that's throwing the exception suggests that this is a common issue with some "allow right-click" browser extension.
 

Mario4don

Your Mother's Lover
Donor
Dec 16, 2018
5,499
6,414
LenAnderson I have a question for you.
Normally when we want to add or remove a game to our "FOLLOWED GAMES" list we do it in the game's thread by clicking the "Follow" or "Unfollow" button but is it possible to remove a game that was suddenly deleted and therefore probably banned from f95zone and now this game always shows up as first on my "FOLLOWED GAMES" list as "GAME MISSING" ?

1704352326409.png

Specifically I'm talking about the game "Crazy Son" which a few days ago was normally available on f95zone but now it is no longer available and game was available at this link
https://f95zone.to/threads/.142116/
 

thug73

Newbie
Jan 20, 2017
73
44
Hey Len,

I came across a situation the other day where the script resulted in a badly formatted result because the game had no "version". The game was Ren'Py - Innocent Au-pair: Restart [v0.25] [D&D visual] | F95zone. The problem is the "info block" doesn't contain an info line for the version, even though it's there in the title. This means this line in your script:

JavaScript:
this.version = post.textContent.replace(/^.+?Version\s*:\s*([^\r\n]+).+$/s, '$1');
...doesn't make a match. You'd *think* this would result in a null or blank being returned, but no, Javascript returns *everything*, the entire post.textContent string, which means the "Followed Games" table gets a big bunch of junk in it and the formatting goes bad.

I just added a quick check for this situation like so:

JavaScript:
this.version = post.textContent.replace(/^.+?Version\s*:\s*([^\r\n]+).+$/s, '$1');
if (this.version == post.textContent) {
    this.version = '!!! Version not found';
}
Somebody with better Javascript skills than me might know of a better way, but the above does work.

Cheers
 

Mario4don

Your Mother's Lover
Donor
Dec 16, 2018
5,499
6,414
LenAnderson I don't know what happened but since yesterday your script stopped working and now it only shows something like this.
1730806220931.png

Can you check what happened and if possible fix it because your script is really helpful in use and it would be a shame to lose such a useful tool.
Thank you very much in advance for your help.
 

thug73

Newbie
Jan 20, 2017
73
44
I'm getting similar, but not for *all* followed games, just a large number of them.

F95 will have changed something so that the "extraction" of the data is no longer making the expected matches. I know a bit of javascript, but debugging this sort of stuff is painful - doubly so if it's not your own code! So I'm going to give Len a chance to fix it before I try.
 

cykablat69

New Member
May 19, 2020
3
0
Also experiencing a similar issue. The games that show up as "GAME MISSING" change on reload, as well as the amount of them. Sometimes it's only a handful, other times its over half of my followed games. All of the links to the game threads are valid.

Maybe it is some type of throttling issue with retrieving game information from F95?
 

thug73

Newbie
Jan 20, 2017
73
44
Can confirm it's a throttling issue. Console log shows Error 429 "Too many requests" messages.

There's a "wait" function in the code, but it's not being used, and I'm not good enough at JavaScript to know where the best place is to add the delay. It does appear to do the requests all in one hit as there's a single "Promise.all" command which launches all the requests, but I don't know the best way to stagger those requests by introducing a varying delay before the actual "HTML get" statement. You can't just say "wait 2 seconds" because then all the requests will wait two seconds and then run together after the delay!

Len, we need your help!