magma1447 / greasemonkey-geocaching-projectgc

Adds links and data to Geocaching.com to make it collaborate with Project-GC.com
MIT License
18 stars 14 forks source link

Decrypt hint #82

Closed magma1447 closed 4 years ago

magma1447 commented 4 years ago

The code to Decrypt hint has recently start to fail, and stopped further processing from the script.

Old code: unsafeWindow.dht();

I have tried different tricks to replace the code, but this far failed. My attempts has included variants from Generate Click Events, but for some reason it seems to trigger something else, and the browser leaves the cache page.

If anyone can figure something smart out, either a pull request or a code snippet is welcome. Maybe there are other user-scripts to look at, to see how they do it.

GeekNJ commented 4 years ago

HQ added some cookie authorization and cookiebot.com is the cause of the issue for PGC as well as other plugins/add-ons. If you block *.cookiebot.com everything is fine.

capoaira commented 4 years ago

I use the GClh. (https://github.com/2Abendsegler/GClh) There is also a function to decrypt hint. Here is an code snippet:

 if ($('#ctl00_ContentBody_EncryptionKey')[0] && $('#ctl00_ContentBody_lnkDH')[0]) {
    document.getElementById('ctl00_ContentBody_lnkDH').click();
    var decryptKey = $('#dk')[0];
    if (decryptKey) decryptKey.parentNode.removeChild(decryptKey);
}