aboutsummaryrefslogtreecommitdiffstats
path: root/send2cgeo
diff options
context:
space:
mode:
authorJavaJens <javajens@web.de>2013-08-04 14:32:38 +0200
committerJavaJens <javajens@web.de>2013-08-04 14:40:07 +0200
commit6437556e79e60ab6fe8e0fa96563f7094133c4ff (patch)
tree21abd2d65ac43d662643310e8f078a2da5b1d1c0 /send2cgeo
parent90caba81680a518950cb294b348908ca2aab2250 (diff)
downloadcgeo-6437556e79e60ab6fe8e0fa96563f7094133c4ff.zip
cgeo-6437556e79e60ab6fe8e0fa96563f7094133c4ff.tar.gz
cgeo-6437556e79e60ab6fe8e0fa96563f7094133c4ff.tar.bz2
Add recently viewed capability
Diffstat (limited to 'send2cgeo')
-rw-r--r--send2cgeo/send2cgeo.user.js15
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";
+ });
+
}
} + ')();';