// ==UserScript== // @name sendToCgeo // @namespace http://send2.cgeo.org/ // @description Add Send to c:geo button to geocaching.com // @include http://www.geocaching.com/seek/cache_details* // @include http://www.geocaching.com/map/beta* // @version 0.24 // ==/UserScript== // Inserts javascript that will be called by the s2cgeo button var s = document.createElement('script'); s.type = 'text/javascript'; s.innerHTML = 'function s2cgeo(code) {' + 'window.open(\'http://send2.cgeo.org/add.html?cache=\'+code,' + '\'cgeo\',\'height=50,width=50\'); }'; document.getElementsByTagName("head")[0].appendChild(s); var map = document.getElementById('cacheDetailsTemplate'); if( map != null ) { var html = 'Log Visit
' + '' + ' ' + 'Send to c:geo'; map.innerHTML = map.innerHTML.replace('Log Visit', html); } else { var d = document.getElementById('Download'); var m = d.children; var last = m.item(m.length-1); var GCElement = document.getElementById('ctl00_ContentBody_CoordInfoLinkControl1_uxCoordInfoCode'); var GCCode = GCElement.innerHTML; var html = '| '; last.innerHTML = last.innerHTML + html; }