diff options
author | rsudev <rasch@munin-soft.de> | 2013-08-21 07:10:24 +0200 |
---|---|---|
committer | rsudev <rasch@munin-soft.de> | 2013-08-21 07:10:24 +0200 |
commit | 318a2a55fab34275964c4e1a74ae27c92a9863eb (patch) | |
tree | 848bd8f0e473191b762501aaf921399199ecae38 /send2cgeo | |
parent | 8767361e68bb0f00e569e5542ba33b15543b08a7 (diff) | |
download | cgeo-318a2a55fab34275964c4e1a74ae27c92a9863eb.zip cgeo-318a2a55fab34275964c4e1a74ae27c92a9863eb.tar.gz cgeo-318a2a55fab34275964c4e1a74ae27c92a9863eb.tar.bz2 |
Fixes #3148, Send2cgeo for opencaching.de does no longer work
Diffstat (limited to 'send2cgeo')
-rw-r--r-- | send2cgeo/send2cgeoOc.user.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/send2cgeo/send2cgeoOc.user.js b/send2cgeo/send2cgeoOc.user.js index abf4707..f4bea85 100644 --- a/send2cgeo/send2cgeoOc.user.js +++ b/send2cgeo/send2cgeoOc.user.js @@ -4,13 +4,11 @@ // @description Add button "Send to c:geo" to opencaching.de // @include http://www.opencaching.de/viewcache.php* // @icon http://send2.cgeo.org/content/images/logo.png -// @version 0.1 +// @version 0.2 // ==/UserScript== // Inserts javascript that will be called by the s2cgeo button. The closure -// look strange, but avoids having to escape the code. Almost everything -// is put into that script element so that geocaching.com's jQuery may be -// accessed. +// look strange, but avoids having to escape the code. var s = document.createElement('script'); s.type = 'text/javascript'; @@ -59,7 +57,7 @@ document.getElementsByTagName("head")[0].appendChild(s); document.getElementsByTagName("body")[0].appendChild(b); // Append to send2cgeo links/buttons ///////////////////////////////////////// - var oc = document.getElementById('SendToGPS').parentNode.parentNode; + var oc = document.getElementsByClassName('exportbutton')[0].parentNode.parentNode; if(oc !== null) { @@ -70,9 +68,9 @@ document.getElementsByTagName("head")[0].appendChild(s); + '<a class="send-to-gps" ' + 'href="#" ' + 'onclick="s2cgeo(\''+occode+'\'); return false;" >' - + '<input id="SendToGPS" type="button" value="An c:geo senden"' + + '<input class="exportbutton" type="button" value="An c:geo senden"' + 'name="SendToCgeo" /></a> ' - + '<br><br>'; + + '</p>'; - oc.innerHTML = oc.innerHTML.replace('<br><br>', html); + oc.innerHTML = oc.innerHTML.replace('</p>', html); }; |