MarkoH01: Well, I tried to find it but without any luck. I even doubt I could do this if I would be pointed in the "right direction". Still I would be curious to examine it a bit. So if you should find the time to "point" (and only then) and if you would not mind, please tell me :)
Yeah... thinking about it it is literally the most complicated part of the script as it encompasses the manual sorting and the extra games per page system.
The code starts at line 3311 and ends at about 4084. There's quite a few functions in there but the main one you'd need to look at is gamesPerPageOption() on line 3527.
There should be some stuff in there about whether gog's sort, manual sort or last updated sort is being used.
You'd need to create a new function to do the actual sorting, following the style of the manual and last updated sort functions (manualSortProducts() and lastUpdatedSortProducts()).
As I said, it's complicated but I hope that helps a bit :)