It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Perhaps you could integrate this into the script:

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)

It changes the download links for the extras from browser download to sending them to the gog downloader. So that you don't need to download anymore the extras bundle but can decide on your own which extras you want.
avatar
moonshineshadow: Perhaps you could integrate this into the script:

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)

It changes the download links for the extras from browser download to sending them to the gog downloader. So that you don't need to download anymore the extras bundle but can decide on your own which extras you want.
Thanks moon, will do :)
Love the script, thank you for fixing what GOG screwed up.
avatar
Wurzelkraft: Love the script, thank you for fixing what GOG screwed up.
Thanks, glad you like it :)

Also, bump, so more people might see it now the weekend is done.
If there are too many lines to display, they get cut off. http://i.imgur.com/OlBj8Eh.png
avatar
Wurzelkraft: If there are too many lines to display, they get cut off. http://i.imgur.com/OlBj8Eh.png
Hmm. I did think that might be a problem but couldn't find a game where it was an issue.
I'm away for the weekend but I'll have a look and try to fix it when I get back.
Thanks for letting me know.
avatar
Wurzelkraft: If there are too many lines to display, they get cut off. http://i.imgur.com/OlBj8Eh.png
avatar
adaliabooks: Hmm. I did think that might be a problem but couldn't find a game where it was an issue.
I'm away for the weekend but I'll have a look and try to fix it when I get back.
Thanks for letting me know.
Hmmm I'd personally suggest that if there are no links then that subsection is instead removed... That would save the space in this game's case, and probably quite a few where it keeps popping up with notes for the OSX installer when there's no MAC version... etc.
avatar
adaliabooks: Hmm. I did think that might be a problem but couldn't find a game where it was an issue.
I'm away for the weekend but I'll have a look and try to fix it when I get back.
Thanks for letting me know.
avatar
rtcvb32: Hmmm I'd personally suggest that if there are no links then that subsection is instead removed... That would save the space in this game's case, and probably quite a few where it keeps popping up with notes for the OSX installer when there's no MAC version... etc.
Yeah, that's certainly the first step, I'll just need to figure ou how best to do it as there's no real link between the headers and their links... but I presume it should be possible to remove them somehow.
avatar
adaliabooks: Bump so people don't miss this.
OMG, thank you. I totally missed it, so thanks to the lovely people who bumped the thread by posting in it. =P This script is a new must-have for me.
avatar
HypersomniacLive: @GOG

In your next Q&A, if you ever do one again, don't forget to mention adaliabooks and mrkgnao along with Barefoot_Monkey as the tireless community members who do things that actually adds functionality to the site, and enhance our GOG experience.
I honestly don't know that I would be visiting the site any longer without the functionality that mrkgnao and Barefoot_Monkey put back into it. It's just a nuisance without MaGog and Barefoot Essentials. =/
avatar
adaliabooks: Yeah, that's certainly the first step, I'll just need to figure ou how best to do it as there's no real link between the headers and their links... but I presume it should be possible to remove them somehow.
I'd assume you'd use regex perhaps as a final step...

Consider this source code:
[code] <span style="font-size: 14px;">Tyrian 2000 - Windows - lang pack:</span> <ul> </ul> [/code]

There's a slot for a language pack, but not having one. You could probably search for open/close span, immediately followed by open/close unlinked lists, and remove those in bulk, perhaps as a single line at the end...

If i were writing it it would probably be something akin to:
[code] txt = txt.replace(/<span.*?<\/span> <ul> <\/ul>/gi, ""); [/code]

But that's a rough guess... It's very likely once it works for one of them, it will work with all of them...
avatar
adaliabooks: Yeah, that's certainly the first step, I'll just need to figure ou how best to do it as there's no real link between the headers and their links... but I presume it should be possible to remove them somehow.
That's sadly very true. I don't recall what game it is, but there's at least one where the Windows download is listed under the Mac OS X header.
avatar
rtcvb32: snip
That sounds about right. Thanks, I'm not great with regex so I'll nick that and work on it.

avatar
adaliabooks: Yeah, that's certainly the first step, I'll just need to figure ou how best to do it as there's no real link between the headers and their links... but I presume it should be possible to remove them somehow.
avatar
HypersomniacLive: That's sadly very true. I don't recall what game it is, but there's at least one where the Windows download is listed under the Mac OS X header.
Ouch, didn't realise it was quite so broken... not much I can do about that unfortunately...
avatar
adaliabooks: [...]

Ouch, didn't realise it was quite so broken... not much I can do about that unfortunately...
No worries, I didn't mention it because I expect you to do anything about it; the community is already doing a lot, way more than they should be doing. :-)

The only reason I noticed it is that I was trying to locate the Windows download (which I shouldn't have to, right?), and when I finally did I was like "Huh?". I guess it just reflects the minimum effort that went into this and how little they care about the GOG Downloader links.
Post edited September 04, 2015 by HypersomniacLive
avatar
adaliabooks: That sounds about right. Thanks, I'm not great with regex so I'll nick that and work on it.
Hmmm i've tried to give a little go at it, but i am getting stuck since it merely tells me it's an object type, and not any other information. JS isn't exactly my preferred languages of choice (and haven't used it for 5 years or any of the new features), so the whole source looks like garbage to me... :(
avatar
rtcvb32: Hmmm I'd personally suggest that if there are no links then that subsection is instead removed... That would save the space in this game's case, and probably quite a few where it keeps popping up with notes for the OSX installer when there's no MAC version... etc.
avatar
adaliabooks: Yeah, that's certainly the first step, I'll just need to figure ou how best to do it as there's no real link between the headers and their links... but I presume it should be possible to remove them somehow.
Can't you simply take all the links:
<a href="gogdownloader://SOMETHING">SOMETHING ELSE</a>
And discard everything else?

I don't think the headers are really that useful.