Posted May 12, 2015

mrkgnao
https://www.amazon.com/dp/B00HCZVCTO
Registered: Apr 2009
From United States

JaqFrost
Registered: Nov 2011
From Vietnam

moonshineshadow
Ghost
Registered: Sep 2011
From Switzerland
Posted May 12, 2015
I did not want to open a new thread for this and I think it fits in here.
Anyone knows how to make a script to change the links from the library. Because I was annoyed that the gog downloader links only let me download the complete bundle of goodies. But then I realised that if I just take the url of the browser downloads and replace the first part with "gogdownloader", I can sent them directly to the downloader. So a script to do that would be neat since it also would get rid of always going to the subpage for the downloader link.
Example to explain more clearly:
The url for the browser download looks like this:
https://www.gog.com/downlink/file/game_name/file_name
If I change it to
gogdownloader://game_name/file_name
the file gets sent to the gog downloader.
So any way to make this into a script that automatically can do that?
Anyone knows how to make a script to change the links from the library. Because I was annoyed that the gog downloader links only let me download the complete bundle of goodies. But then I realised that if I just take the url of the browser downloads and replace the first part with "gogdownloader", I can sent them directly to the downloader. So a script to do that would be neat since it also would get rid of always going to the subpage for the downloader link.
Example to explain more clearly:
The url for the browser download looks like this:
https://www.gog.com/downlink/file/game_name/file_name
If I change it to
gogdownloader://game_name/file_name
the file gets sent to the gog downloader.
So any way to make this into a script that automatically can do that?

Ikarugamesh
Priestess Arcana
Registered: Oct 2011
From Spain
Posted May 12, 2015
Just installed this fine script. I love the Quick Post area!

Johny.GOG
☕️
Registered: Dec 2014
From Poland
Posted May 12, 2015
The script would be:
setInterval(function() {
var gameLinks = document.querySelectorAll('.game-link');
for(i=0;i<gameLinks.length;i++) {
var hrefParts = gameLinks[i].href.split('/downlink/file/');
if( hrefParts.length === 1 ) {
hrefParts = gameLinks[i].href.split('/downlink/');
}
if( hrefParts.length > 1 ) {
gameLinks[i].href = 'gogdownloader:\/\/' + hrefParts[1]
}
}
}, 1000)
You can run it in your browsers console. It's checking for URLs every second. Assuming what you have written is true. BUT! It is not. :) Downloader links for game files differ between website and downloader. For example Mount&Blade:
downloaderUrl: "gogdownloader://mount_blade/installer_win_en"
manualUrl: "/downlink/mount_blade/en1installer1"
It will work for extras though.
setInterval(function() {
var gameLinks = document.querySelectorAll('.game-link');
for(i=0;i<gameLinks.length;i++) {
var hrefParts = gameLinks[i].href.split('/downlink/file/');
if( hrefParts.length === 1 ) {
hrefParts = gameLinks[i].href.split('/downlink/');
}
if( hrefParts.length > 1 ) {
gameLinks[i].href = 'gogdownloader:\/\/' + hrefParts[1]
}
}
}, 1000)
You can run it in your browsers console. It's checking for URLs every second. Assuming what you have written is true. BUT! It is not. :) Downloader links for game files differ between website and downloader. For example Mount&Blade:
downloaderUrl: "gogdownloader://mount_blade/installer_win_en"
manualUrl: "/downlink/mount_blade/en1installer1"
It will work for extras though.

moonshineshadow
Ghost
Registered: Sep 2011
From Switzerland
Posted May 12, 2015

downloaderUrl: "gogdownloader://mount_blade/installer_win_en"
manualUrl: "/downlink/mount_blade/en1installer1"
It will work for extras though.
Hmmm... interesting, I did not realise that the links for the game files differ, since I was downloading extras. I need to check that further :D
Post edited May 12, 2015 by moonshineshadow

IAmSinistar
Queso de Espacio
Registered: May 2013
From United States
Posted May 12, 2015
I have to switch it off to respond to Friend requests. Doing so reveals how badly GOG has broken their site over the months. I had forgotten how many basic but useful things were due entirely to this script.

mrkgnao
https://www.amazon.com/dp/B00HCZVCTO
Registered: Apr 2009
From United States

IAmSinistar
Queso de Espacio
Registered: May 2013
From United States

HypersomniacLive
The Reluctant Voter
Registered: Sep 2011
From Vatican City
Posted May 12, 2015
Post edited May 12, 2015 by HypersomniacLive

mrkgnao
https://www.amazon.com/dp/B00HCZVCTO
Registered: Apr 2009
From United States

HypersomniacLive
The Reluctant Voter
Registered: Sep 2011
From Vatican City
Posted May 12, 2015

Under the assumption that the choice is kept in a LocalStorage variable, he could manipulate the variable before calling the common URL.
That is provided he's willing to update the script, looks a lot of work, and I'd totally understand if he drew the line.

mrkgnao
https://www.amazon.com/dp/B00HCZVCTO
Registered: Apr 2009
From United States

Johny.GOG
☕️
Registered: Dec 2014
From Poland

HypersomniacLive
The Reluctant Voter
Registered: Sep 2011
From Vatican City