diff options
author | rsudev <rasch@munin-soft.de> | 2013-10-14 23:21:09 +0200 |
---|---|---|
committer | rsudev <rasch@munin-soft.de> | 2013-10-14 23:21:09 +0200 |
commit | e57ab460c0185cf313036d7fd42f0852c8ce4bda (patch) | |
tree | 5f58e6f757cd1faaffac681540fde7b8df5a8020 /send2cgeo | |
parent | 8b9e65a46c2620ac631f54f5dc4e8b609ba983d3 (diff) | |
download | cgeo-e57ab460c0185cf313036d7fd42f0852c8ce4bda.zip cgeo-e57ab460c0185cf313036d7fd42f0852c8ce4bda.tar.gz cgeo-e57ab460c0185cf313036d7fd42f0852c8ce4bda.tar.bz2 |
Fix #3362, send2cgeo on oc.de not working with new (5digit) cache codes
Diffstat (limited to 'send2cgeo')
-rw-r--r-- | send2cgeo/send2cgeoOc.user.js | 5 |
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" ' |