aboutsummaryrefslogtreecommitdiffstats
path: root/send2cgeo/send2cgeoOc.user.js
diff options
context:
space:
mode:
Diffstat (limited to 'send2cgeo/send2cgeoOc.user.js')
-rw-r--r--send2cgeo/send2cgeoOc.user.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/send2cgeo/send2cgeoOc.user.js b/send2cgeo/send2cgeoOc.user.js
index f4bea85..9de73ce 100644
--- a/send2cgeo/send2cgeoOc.user.js
+++ b/send2cgeo/send2cgeoOc.user.js
@@ -4,7 +4,7 @@
// @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.2
+// @version 0.3
// ==/UserScript==
// Inserts javascript that will be called by the s2cgeo button. The closure
@@ -62,7 +62,8 @@ document.getElementsByTagName("head")[0].appendChild(s);
if(oc !== null) {
var occode=oc.innerHTML;
- occode = occode.substr(occode.indexOf('wp=')+3,6);
+ var wppos = occode.indexOf('wp=');
+ occode = occode.substring(wppos+3,occode.indexOf("'", wppos+3));
var html = '<img src="resource2/ocstyle/images/viewcache/14x19-gps-device.png" class="icon16" alt="" />'
+ '<a class="send-to-gps" '