From 318a2a55fab34275964c4e1a74ae27c92a9863eb Mon Sep 17 00:00:00 2001 From: rsudev Date: Wed, 21 Aug 2013 07:10:24 +0200 Subject: Fixes #3148, Send2cgeo for opencaching.de does no longer work --- send2cgeo/send2cgeoOc.user.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'send2cgeo') 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); + '' - + ' ' - + '

'; + + '

'; - oc.innerHTML = oc.innerHTML.replace('

', html); + oc.innerHTML = oc.innerHTML.replace('

', html); }; -- cgit v1.1