diff options
author | Lars <gc@droescher.eu> | 2013-08-07 06:35:24 -0700 |
---|---|---|
committer | Lars <gc@droescher.eu> | 2013-08-07 06:35:24 -0700 |
commit | dc51dfa76d3826439542374b5d41806bc67b38e3 (patch) | |
tree | 51acc228424b2522dcb97a6be09e33bd86e30074 /send2cgeo | |
parent | dd9004cabdb87e40f40b69204a60c5a5f7fd6499 (diff) | |
parent | 6437556e79e60ab6fe8e0fa96563f7094133c4ff (diff) | |
download | cgeo-dc51dfa76d3826439542374b5d41806bc67b38e3.zip cgeo-dc51dfa76d3826439542374b5d41806bc67b38e3.tar.gz cgeo-dc51dfa76d3826439542374b5d41806bc67b38e3.tar.bz2 |
Merge pull request #3105 from JavaJens/recentlyviewed
Add recently viewed capability
Diffstat (limited to 'send2cgeo')
-rw-r--r-- | send2cgeo/send2cgeo.user.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/send2cgeo/send2cgeo.user.js b/send2cgeo/send2cgeo.user.js index bd20f3a..daf88f2 100644 --- a/send2cgeo/send2cgeo.user.js +++ b/send2cgeo/send2cgeo.user.js @@ -5,6 +5,7 @@ // @include http://www.geocaching.com/seek/cache_details* // @include http://www.geocaching.com/map/* // @include http://www.geocaching.com/geocache/* +// @include http://www.geocaching.com/my/recentlyviewedcaches* // @icon http://send2.cgeo.org/content/images/logo.png // @updateURL http://send2.cgeo.org/send2cgeo.user.js // @version 0.27 @@ -70,7 +71,7 @@ s.textContent = '(' + function() { + '<span>Send to c:geo</span>'; map.innerHTML = map.innerHTML.replace('Log Visit</span>', html); - } else { + } else if(document.getElementById('ctl00_ContentBody_CoordInfoLinkControl1_uxCoordInfoCode') != null){ // geocaching.com cache detail page var GCCode = $('#ctl00_ContentBody_CoordInfoLinkControl1_uxCoordInfoCode') .html(); @@ -83,6 +84,18 @@ s.textContent = '(' + function() { $('#Download p:last').append(html); $('#Download dd:last').append(html); + } else { + // geocaching.com recentlyviewed + $('img[src="/images/icons/16/send_to_gps.png"]').each(function(){ + $(this).attr('alt', "Send to c:geo").attr('title', "Send to c:geo"); + }); + $('a[title="Send to GPS"]').each(function(){ + var text = $(this).parent().parent().find(".Merge").last().find(".small").first().text().split("|"); + var GCCode = text[text.length - 2].trim(); + this.href="javascript:window.s2geo('"+GCCode+"')"; + this.title = "Send to c:geo"; + }); + } } + ')();'; |