From e57ab460c0185cf313036d7fd42f0852c8ce4bda Mon Sep 17 00:00:00 2001 From: rsudev Date: Mon, 14 Oct 2013 23:21:09 +0200 Subject: Fix #3362, send2cgeo on oc.de not working with new (5digit) cache codes --- send2cgeo/send2cgeoOc.user.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'send2cgeo') 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 = '' + '