diff options
author | JavaJens <javajens@web.de> | 2013-08-04 14:32:38 +0200 |
---|---|---|
committer | JavaJens <javajens@web.de> | 2013-08-04 14:40:07 +0200 |
commit | 6437556e79e60ab6fe8e0fa96563f7094133c4ff (patch) | |
tree | 21abd2d65ac43d662643310e8f078a2da5b1d1c0 | |
parent | 90caba81680a518950cb294b348908ca2aab2250 (diff) | |
download | cgeo-6437556e79e60ab6fe8e0fa96563f7094133c4ff.zip cgeo-6437556e79e60ab6fe8e0fa96563f7094133c4ff.tar.gz cgeo-6437556e79e60ab6fe8e0fa96563f7094133c4ff.tar.bz2 |
Add recently viewed capability
-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"; + }); + } } + ')();'; |